From 08c7d26024b49ebf088e185e38eb1408eeff914d Mon Sep 17 00:00:00 2001 From: moodler Date: Sun, 18 Feb 2007 13:01:15 +0000 Subject: [PATCH] Merged fixes from 1.8 stable for role menu fixes MDL-8558 --- admin/roles/manage.html | 9 ++++++--- admin/roles/manage.php | 19 ++++++++----------- lang/en_utf8/role.php | 1 + theme/standard/styles_layout.css | 8 ++++++++ 4 files changed, 23 insertions(+), 14 deletions(-) diff --git a/admin/roles/manage.html b/admin/roles/manage.html index 7401712c64..7a21c67396 100755 --- a/admin/roles/manage.html +++ b/admin/roles/manage.html @@ -12,11 +12,14 @@ $submitlabel = get_string('savechanges'); } + if ($action == 'view') { ?> - -
- +
+
+
diff --git a/admin/roles/manage.php b/admin/roles/manage.php index 99c55d3588..87745efdc4 100755 --- a/admin/roles/manage.php +++ b/admin/roles/manage.php @@ -334,18 +334,15 @@ break; } - echo '
'; + echo '
'; if ($action == 'view') { - echo get_string('selectrole', 'role').': '; - echo ''; - echo ''; - choose_from_menu ($roleoptions, 'roleid', $roleid, get_string('listallroles', 'role').'...', $script='switchrole.submit()'); - echo ''; - echo '
'; - echo ''; - echo ''; - echo ''; - echo '
'; + popup_form('manage.php?action=view&roleid=', $roleoptions, 'switchrole', $roleid, '', '', '', + false, 'self', get_string('selectrole', 'role').': '); + + $options = array(); + $options['roleid'] = $roleid; + $options['action'] = 'edit'; + print_single_button('manage.php', $options, get_string('edit')); } echo '
'; diff --git a/lang/en_utf8/role.php b/lang/en_utf8/role.php index 71f0c12190..3c5421f398 100644 --- a/lang/en_utf8/role.php +++ b/lang/en_utf8/role.php @@ -49,6 +49,7 @@ $string['currentrole'] = 'Current role'; $string['defaultrole'] = 'Default role'; $string['defineroles'] = 'Define roles'; $string['deleterolesure'] = 'Are you sure that you want to delete role \"$a->name ($a->shortname)\"?

Currently this role is assigned to $a->count users.'; +$string['duplicaterole'] = 'Duplicate this role'; $string['editrole'] = 'Edit role'; $string['errorbadrolename'] = 'Incorrect role name'; $string['errorbadroleshortname'] = 'Incorrect role name'; diff --git a/theme/standard/styles_layout.css b/theme/standard/styles_layout.css index f727cde7a9..95451ab7aa 100644 --- a/theme/standard/styles_layout.css +++ b/theme/standard/styles_layout.css @@ -738,6 +738,10 @@ body#admin-blocks table#incompatible th.c0 { margin-top: 1em; } +#admin-roles-manage .duplicaterole { + text-align: right; +} + #admin-roles-manage .singlebutton, #admin-roles-allowoverride .singlebutton, #admin-roles-allowassign .singlebutton { @@ -745,6 +749,10 @@ body#admin-blocks table#incompatible th.c0 { text-align:center; } +#admin-roles-manage .selector { + text-align:center; +} + .rolecap .inherit, .rolecap .allow, .rolecap .prevent, -- 2.39.5