- Patch #393406 by michaelfavia, Freso, catch, stBorchert, David_Rothstein, ksenzee: improve role administration page.

merge-requests/26/head
Dries Buytaert 2010-01-06 15:32:23 +00:00
parent c8fd75886e
commit 6a7f341e61
2 changed files with 16 additions and 4 deletions

View File

@ -868,14 +868,14 @@ function theme_user_admin_new_role($variables) {
$header = array(t('Name'), array('data' => t('Operations'), 'colspan' => 2));
foreach (user_roles() as $rid => $name) {
$edit_permissions = l(t('edit permissions'), 'admin/config/people/permissions/' . $rid);
if (!in_array($rid, array(DRUPAL_ANONYMOUS_RID, DRUPAL_AUTHENTICATED_RID))) {
$rows[] = array($name, l(t('edit role'), 'admin/config/people/roles/edit/' . $rid), $edit_permissions);
if (in_array($rid, array(DRUPAL_ANONYMOUS_RID, DRUPAL_AUTHENTICATED_RID))) {
$rows[] = array(t('!name %locked', array('!name' => $name, '%locked' => t('(locked)'))), '', $edit_permissions);
}
else {
$rows[] = array($name, t('locked'), $edit_permissions);
$rows[] = array($name, l(t('edit role'), 'admin/config/people/roles/edit/' . $rid), $edit_permissions);
}
}
$rows[] = array(drupal_render($form['name']), array('data' => drupal_render($form['submit']), 'colspan' => 2));
$rows[] = array(array('data' => drupal_render($form['name']) . drupal_render($form['submit']), 'colspan' => 3, 'class' => 'edit-name'));
$output = drupal_render_children($form);
$output .= theme('table', array('header' => $header, 'rows' => $rows));

View File

@ -29,6 +29,18 @@
padding-bottom: .5em;
}
/**
* Override default textfield float to put the "Add role" button next to
* the input textfield.
*/
#user-admin-new-role td.edit-name {
clear: both;
}
#user-admin-new-role .form-item-name {
float: left;
margin-right: 1em;
}
/* Generated by user.module but used by profile.module: */
.profile {
clear: both;