function theme_user_permissions_user_admin_new_role in User Permissions 5
Same name and namespace in other branches
- 6 user_permissions.module \theme_user_permissions_user_admin_new_role()
Theme user_permissions_user_admin_new_role
File
- ./
user_permissions.module, line 197
Code
function theme_user_permissions_user_admin_new_role($form) {
$header = array(
t('Name'),
array(
'data' => t('Operations'),
'colspan' => 2,
),
);
foreach (user_roles() as $rid => $name) {
$edit_permissions = l(t('edit permissions'), 'admin/user/access/' . $rid);
if (!in_array($rid, array(
DRUPAL_ANONYMOUS_RID,
DRUPAL_AUTHENTICATED_RID,
))) {
if (strpos($name, '_user_role_') === FALSE) {
$rows[] = array(
$name,
l(t('edit role'), 'admin/user/roles/edit/' . $rid),
$edit_permissions,
);
}
}
else {
$rows[] = array(
$name,
t('locked'),
$edit_permissions,
);
}
}
$rows[] = array(
drupal_render($form['name']),
array(
'data' => drupal_render($form['submit']),
'colspan' => 2,
),
);
$output = drupal_render($form);
$output .= theme('table', $header, $rows);
return $output;
}