Skip to content

Commit

Permalink
View Imaging Datasets button permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
CamilleBeau committed Jul 7, 2020
1 parent 4222061 commit 3d7b874
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,15 @@ Class TimePoint_List_ControlPanel extends \Candidate
$this->tpl_data['isDataEntryPerson']
= $user->hasCenterPermission("data_entry", $cand_CenterID);

$this->tpl_data['isImagingPerson'] = $user->hasAnyPermission(
[
'imaging_browser_view_site',
'imaging_browser_view_allsites',
'imaging_browser_phantom_allsites',
'imaging_browser_phantom_ownsite'
]
);

//set the baseurl of the tpl_data
$factory = \NDB_Factory::singleton();
$settings = $factory->settings();
Expand Down
12 changes: 2 additions & 10 deletions modules/timepoint_list/templates/menu_timepoint_list.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,7 @@
</table>

<div class="col-xs-12 row">
<!-- <div class="col-xs-1"> -->
<h3>Actions:&nbsp&nbsp</h3>
<!-- </div> -->
<!-- <div class="col-xs-4"> -->
{$actions}
<a class="btn btn-default" role="button" href="{$baseurl}/imaging_browser/?DCCID={$candID}">
View Imaging datasets</a>

<!-- </div> -->
{$actions}
</div>
<br>
<br>
Expand Down Expand Up @@ -129,7 +121,7 @@
<img alt="Data Missing" src="{$baseurl}/images/help2.gif" border=0>
{/if}
</td>

<td bgColor="{$timePoints[timepoint].feedbackColor}">
{if $timePoints[timepoint].feedbackCount}
{$timePoints[timepoint].feedbackStatus}
Expand Down
16 changes: 13 additions & 3 deletions modules/timepoint_list/templates/timepoint_list_controlpanel.tpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
{if $isDataEntryPerson}
<a class="btn btn-default" role="button" href="{$baseurl}/create_timepoint/?candID={$candID}&identifier={$candID}">Create time point</a>
<a class="btn btn-default" role="button" href="{$baseurl}/candidate_parameters/?candID={$candID}&identifier={$candID}">Candidate Info</a>
{if $isDataEntryPerson || $isImagingPerson}
<!-- <div class="col-xs-1"> -->
<h3>Actions:&nbsp&nbsp</h3>
<!-- </div> -->
<!-- <div class="col-xs-4"> -->
{if $isDataEntryPerson}
<a class="btn btn-default" role="button" href="{$baseurl}/create_timepoint/?candID={$candID}&identifier={$candID}">Create time point</a>
<a class="btn btn-default" role="button" href="{$baseurl}/candidate_parameters/?candID={$candID}&identifier={$candID}">Candidate Info</a>
{/if}
{if $isImagingPerson}
<a class="btn btn-default" role="button" href="{$baseurl}/imaging_browser/?DCCID={$candID}">View Imaging datasets</a>
{/if}
<!-- </div> -->
{/if}

0 comments on commit 3d7b874

Please # to comment.