Skip to content

Commit

Permalink
PN-348: Matching notification page: Group managers should have the sa…
Browse files Browse the repository at this point in the history
…me options/filters available as global administartors

Done.
  • Loading branch information
veronikaslc committed Nov 8, 2018
1 parent 924d541 commit d8dbb48
Showing 1 changed file with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,14 @@ $xwiki.ssx.use('PhenoTips.Widgets')##
$xwiki.jsx.use('PhenoTips.Widgets')##

{{html clean='false' wiki='true'}}
#set ($isAdminOfGroup = false)
#foreach ($group in $xwiki.wrapDocs($xwiki.rightsmanager.getAllGroupsNamesForMember($xcontext.userReference.toString())))
#set ($groupObj = $group.getObject('PhenoTips.PhenoTipsGroupClass'))
#if (!$groupObj && ($group.documentReference.name.endsWith(' Managers') || $group.documentReference.name.endsWith(' Administrators')))
#set ($isAdminOfGroup = true)
#break
#end
#end
#if($hasAdmin)<input type="hidden" id="isAdmin">#end
##--FILTERS--
<div id="matches-directory" class="entity-directory">
Expand Down Expand Up @@ -122,7 +130,7 @@ $xwiki.jsx.use('PhenoTips.Widgets')##
#end
#end
</li>
<li #if(!$hasAdmin)class="hidden"#end>
<li #if(!$hasAdmin && !$isAdminOfGroup)class="hidden"#end>
<div style="vertical-align: -webkit-baseline-middle;">$escapetool.xml($services.localization.render('phenotips.matchingNotifications.table.showMatches.score.label'))</div>
<input class="score-filter" type="text" name="score" placeholder="$escapetool.xml($services.localization.render('phenotips.matchingNotifications.table.showMatches.average.label'))">
<input class="score-filter" type="text" name="phenotypicScore" placeholder="$escapetool.xml($services.localization.render('phenotips.matchingNotifications.table.showMatches.phenotipicScore.label'))">
Expand All @@ -140,7 +148,7 @@ $xwiki.jsx.use('PhenoTips.Widgets')##
<label><input name="ownership-filter" type="checkbox" value="others" #if(!$hasAdmin)checked#end> $escapetool.xml($services.localization.render('phenotips.matchingNotifications.table.owned_by_other'))</label><br>
<label><input name="ownership-filter" type="checkbox" value="public" > $escapetool.xml($services.localization.render('phenotips.matchingNotifications.table.owned_by_public'))</label>
</li>
<li #if(!$hasAdmin)class="hidden"#end >$escapetool.xml($services.localization.render('phenotips.matchingNotifications.table.geneStatusFilter'))
<li #if(!$hasAdmin && !$isAdminOfGroup)class="hidden"#end >$escapetool.xml($services.localization.render('phenotips.matchingNotifications.table.geneStatusFilter'))
<select id="gene-status-filter">
<option value="all" selected="selected">$escapetool.xml($services.localization.render('phenotips.matchingNotifications.table.filterShowAll'))</option>
<option value="solved_solved" >$escapetool.xml($services.localization.render('phenotips.matchingNotifications.table.filterSolvedSolved'))</option>
Expand Down Expand Up @@ -176,7 +184,7 @@ $xwiki.jsx.use('PhenoTips.Widgets')##
<table id="matchesTable" class="matches-table">
<thead>
<tr class="first-header-row">
#if($hasAdmin)<th colspan="1" ></th>#end
#if($hasAdmin || $isAdminOfGroup)<th colspan="1" ></th>#end
<th colspan="2">$escapetool.xml($services.localization.render('phenotips.matchingNotifications.table.headings.patDetails'))</th>
<th colspan="3">$escapetool.xml($services.localization.render('phenotips.matchingNotifications.table.headings.score'))</th>
<th colspan="1"></th>
Expand Down

0 comments on commit d8dbb48

Please sign in to comment.