';
+ echo '
';
if ($action == 'view') {
- echo get_string('selectrole', 'role').': ';
- 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 71f0c12190d..3c5421f3989 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 f727cde7a92..95451ab7aa4 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,