Commit 389a8fe6 authored by Robert Lyon's avatar Robert Lyon Committed by Cecilia Vela Gurovic

Bug 1798931: Show user role on access dropdown

When viewing via view index page

behatnotneeded

Change-Id: I77b0ba0f7eaad878bfaae651a11cf089a2b64ba1
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
(cherry picked from commit 77e6c19c)
parent f3d5d10b
......@@ -4273,6 +4273,9 @@ class View {
foreach ($accesslist as $ak => $av) {
if ($av->usr) {
$av->displayname = display_name($av->usr);
if (!empty($av->role)) {
$av->roledisplay = get_string($av->role, 'view');
}
}
else if ($av->group) {
$av->displayname = $av->groupname;
......
......@@ -81,7 +81,7 @@
<span class="link-text">{$accessitem->displayname}</span>
{elseif $accessitem->usr}
<span class="icon icon-user left" role="presentation" aria-hidden="true"></span>
<span class="link-text">{$accessitem->displayname}</span>
<span class="link-text">{$accessitem->displayname}{if $accessitem->role} ({$accessitem->roledisplay}){/if} </span>
{elseif $accessitem->token}
<span class="icon icon-globe left" role="presentation" aria-hidden="true"></span>
<span class="link-text">{str tag="token" section="view"}</span>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment