Commit c650b1bb authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review
Browse files

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

parents 052e1812 947f3f89
......@@ -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>
{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 $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