This repository was archived by the owner on Dec 11, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed
src/Controllers/Proposals Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -76,10 +76,9 @@ <h3 class="panel-title">{{ ( 'review-' ~ crit )|message }}
7676 < div class ="panel-heading ">
7777 < h2 class ="panel-title ">
7878 {{ 'proposal-summary'|message }}
79- < a class ="accordion-toggle " data-toggle ="collapse " href ="#summary-body "> </ a >
80- </ h2 >
79+ < a class ="accordion-toggle {% if myreview is empty %}collapsed{% endif %} " data-toggle ="collapse " href ="#summary-body "> </ a > </ h2 >
8180 </ div >
82- < div id ="summary-body " class ="panel-body panel-collapse collapse in ">
81+ < div id ="summary-body " class ="panel-body panel-collapse collapse {% if myreview is not empty %}in{% endif %} ">
8382 < dl class ="dl-horizontal ">
8483 < dt > {{ 'summary-list-reviewers'|message }}</ dt >
8584 < dd > < ul class ="list-inline ">
Original file line number Diff line number Diff line change @@ -47,16 +47,21 @@ protected function handleGet( $id ) {
4747 $ this ->view ->setData ( 'proposal ' , $ proposal );
4848
4949 if ( $ this ->authManager ->isReviewer () ) {
50- // Reviewers can only see reviews after they have reviewed
51- // a proposal themselves
5250 $ myReview = $ this ->reviewsDao ->reviewByUser ( $ id );
5351 if ( $ myReview ) {
5452 $ this ->view ->setData ( 'myreview ' , $ myReview );
55- $ this ->addReviewsToView ( $ id );
5653 } else {
5754 $ this ->view ->setData ( 'myreview ' , array () );
5855 }
56+
57+ // Reviewers can only see reviews after they have reviewed
58+ // the proposal themselves or if they are also an admin
59+ if ( $ myReview || $ this ->authManager ->isAdmin () ) {
60+ $ this ->addReviewsToView ( $ id );
61+ }
5962 } else {
63+ // Non-reviewers always see reviews. The template is responsible for
64+ // showing/hiding information based on the user's permissions.
6065 $ this ->addReviewsToView ( $ id );
6166 }
6267
You can’t perform that action at this time.
0 commit comments