Commit 446335f7 authored by Cecilia Vela Gurovic's avatar Cecilia Vela Gurovic

Bug 1848959: peer assessment: dont display 'Details' button for peer only roles

behatnotneeded

Change-Id: I5380cddc0871cb1faa849eed9b4f91b1b646dbde
(cherry picked from commit 947f3f89)
parent d2bf336b
......@@ -1424,6 +1424,8 @@ class BlockInstance {
$smarty->assign('justdetails', true);
}
$smarty->assign('peerroleonly', $USER->has_peer_role_only($this->get_view()));
return $smarty->fetch('view/blocktypecontainerviewing.tpl');
}
......
<div class="pageactions">
<div class="btn-group-vertical">
{if !$peerroleonly}
{* Assess button that will show/ hide comments and details in block-comments-details-header.tpl *}
<button id="details-btn" type="button" class="btn btn-secondary" title="{str tag=detailslinkalt section=view}">
<span class="icon icon-lg icon-search-plus left" role="presentation" aria-hidden="true" ></span>
<span class="sr-only">{str tag=detailslinkalt section=view}</span>
</button>
{/if}
{if $editurl}{strip}
<a title="{str tag=editthisview section=view}" href="{$editurl}" class="btn btn-secondary">
......
<div class="bt-{$blocktype} gridstackblock card card-secondary {$cardicontype} clearfix {if $retractable}collapsible{/if}" id="blockinstance_{$id}">
{if !$editing && $blockheader && !$versioning}
{if !$editing && $blockheader && !$versioning && !$peerroleonly}
{include file='header/block-comments-details-header.tpl' artefactid=$artefactid blockid=$blockid commentcount=$commentcount}
{/if}
{if $title}
......
......@@ -564,6 +564,7 @@ $smarty->assign('viewtype', $viewtype);
$smarty->assign('feedback', $feedback);
$smarty->assign('owner', $owner);
$smarty->assign('peerhidden', $peerhidden);
$smarty->assign('peerroleonly', $USER->has_peer_role_only($view));
list($tagcount, $alltags) = $view->get_all_tags_for_view(10);
$smarty->assign('alltags', $alltags);
$smarty->assign('moretags', ($tagcount > sizeof($alltags) ? true : false));
......
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