Commit 77e6c19c authored by Robert Lyon's avatar Robert Lyon
Browse files

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>
parent 4b53c003
...@@ -4273,6 +4273,9 @@ class View { ...@@ -4273,6 +4273,9 @@ class View {
foreach ($accesslist as $ak => $av) { foreach ($accesslist as $ak => $av) {
if ($av->usr) { if ($av->usr) {
$av->displayname = display_name($av->usr); $av->displayname = display_name($av->usr);
if (!empty($av->role)) {
$av->roledisplay = get_string($av->role, 'view');
}
} }
else if ($av->group) { else if ($av->group) {
$av->displayname = $av->groupname; $av->displayname = $av->groupname;
......
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
<span class="link-text">{$accessitem->displayname}</span> <span class="link-text">{$accessitem->displayname}</span>
{elseif $accessitem->usr} {elseif $accessitem->usr}
<span class="icon icon-user left" role="presentation" aria-hidden="true"></span> <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} {elseif $accessitem->token}
<span class="icon icon-globe left" role="presentation" aria-hidden="true"></span> <span class="icon icon-globe left" role="presentation" aria-hidden="true"></span>
<span class="link-text">{str tag="token" section="view"}</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