imce_admin_theme($form = array())
imce/inc/admin.inc, line 86
Admin form themed.
<?php
function imce_admin_theme($form = array()) {
$u1p = imce_user1_profile();
$header = array(t('User role'), t('Assigned profile'));
$keys = array('name', 'pid');
$rows[0] = array(t('user #1'), $u1p['name']);
$info = '';
if ($form['#weighted']) {
$header[] = t('Weight');
$keys[] = 'weight';
$rows[0][] = t('n/a');
$info = t('For users who have <strong>multiple roles</strong>, <strong>weight</strong> property will determine the assigned profile. Lighter roles that are placed upper will take the precedence. So, an administrator role should be placed over other roles by having a smaller weight, ie. -10.');
}
foreach (element_children($form['roles']) as $rid) {
$cells = array();
foreach ($keys as $key) {
$cells[] = drupal_render($form['roles'][$rid][$key]);
}
$rows[] = $cells;
}
$output = '<h2 class="title">'. t('Role-profile assignments') .'</h2>';
$output .= theme('table', $header, $rows);
$output .= '<div class="form-item"><div class="description">'. t('Assign profiles to user roles.') .' '. $info .'</div></div>';
$output .= drupal_render($form['common']);
$output .= drupal_render($form);
return $output;
}
?>