summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2010-01-06 15:32:23 +0000
committerDries Buytaert <dries@buytaert.net>2010-01-06 15:32:23 +0000
commit6a7f341e6143b4d788492f7d61b8be8a4f4db1f1 (patch)
tree1b569be7f85ca95cd5cb4dc74a6c5467f7cacedf
parentc8fd75886e75229a00981c3206caca8a5b2b287a (diff)
downloadbrdo-6a7f341e6143b4d788492f7d61b8be8a4f4db1f1.tar.gz
brdo-6a7f341e6143b4d788492f7d61b8be8a4f4db1f1.tar.bz2
- Patch #393406 by michaelfavia, Freso, catch, stBorchert, David_Rothstein, ksenzee: improve role administration page.
-rw-r--r--modules/user/user.admin.inc8
-rw-r--r--modules/user/user.css12
2 files changed, 16 insertions, 4 deletions
diff --git a/modules/user/user.admin.inc b/modules/user/user.admin.inc
index b84271d64..a607c9006 100644
--- a/modules/user/user.admin.inc
+++ b/modules/user/user.admin.inc
@@ -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));
diff --git a/modules/user/user.css b/modules/user/user.css
index d79e04e90..769ec1ee1 100644
--- a/modules/user/user.css
+++ b/modules/user/user.css
@@ -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;