Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[timepoint_list] Hiding Candidate Info and View Imaging Datasets buttons #6815

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>
{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}
<a class="btn btn-default" role="button" href="{$baseurl}/candidate_parameters/?candID={$candID}&identifier={$candID}">Candidate Info</a>
2 changes: 1 addition & 1 deletion modules/timepoint_list/test/TestPlan.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
- For a candidate of the same site as your user, there should be up to 3 additional buttons:
1. "Create time point" (links to create_timepoint module for that candidate) if your user has permission `data_entry`
2. "Candidate Info" (links to candidate_parameters module for that candidate) if your user has permission `data_entry`
3. "View Imaging Datasets" (links to the imaging_browser module menu page filtered for that candidate)
3. "View Imaging Datasets" (links to the imaging_browser module menu page filtered for that candidate) if your user has permission `imaging_browser_view_site`, `imaging_browser_view_allsites`, `imaging_browser_phantom_allsites`, or `imaging_browser_phantom_ownsite`
3. **Button links**
- Ensure the "View Imaging datasets" button points to correct place. (imaging_browser module for that candidate)
- Ensure the "Create time point" button points to correct place. (create_timepoint module for that candidate)
Expand Down