Skip to content

Commit

Permalink
Merge pull request #9452 from nibou230/9400
Browse files Browse the repository at this point in the history
#9400 Display competing interests once a reviewer accepts an invitation
  • Loading branch information
jonasraoni authored Nov 13, 2023
2 parents c35ac64 + ac3187f commit 0e30d1f
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,13 @@ public function getTemplateVarsFromRowColumn($row, $column)
return ['label' => __($element->getReviewMethodKey())];

case 'considered':
return ['label' => $this->_getStatusText($this->getCellState($row, $column), $row)];
$statusText = $this->_getStatusText($this->getCellState($row, $column), $row);
$reviewAssignment = $row->getData();
$competingInterests = $reviewAssignment->getCompetingInterests();
if ($competingInterests) {
$statusText .= '<span class="details">' . __('reviewer.competingInterests') . '</span>';
}
return ['label' => $statusText];

case 'actions':
// Only attach actions to this column. See self::getCellActions()
Expand Down
8 changes: 7 additions & 1 deletion controllers/grid/users/reviewer/ReviewerGridCellProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,13 @@ public function getTemplateVarsFromRowColumn($row, $column)
return ['label' => __($element->getReviewMethodKey())];

case 'considered':
return ['label' => $this->_getStatusText($this->getCellState($row, $column), $row)];
$statusText = $this->_getStatusText($this->getCellState($row, $column), $row);
$reviewAssignment = $row->getData();
$competingInterests = $reviewAssignment->getCompetingInterests();
if ($competingInterests) {
$statusText .= '<span class="details">' . __('reviewer.competingInterests') . '</span>';
}
return ['label' => $statusText];

case 'actions':
// Only attach actions to this column. See self::getCellActions()
Expand Down
13 changes: 7 additions & 6 deletions templates/controllers/grid/users/reviewer/readReview.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@
{translate key="editor.review.readConfirmation"}
{/fbvFormSection}

{if $reviewAssignment->getCompetingInterests()}
<h3>{translate key="reviewer.submission.competingInterests"}</h3>
<div class="review_competing_interests">
{$reviewAssignment->getCompetingInterests()|nl2br|strip_unsafe_html}
</div>
{/if}

{if $reviewAssignment->getDateCompleted()}
{fbvFormSection}
<div class="pkp_controllers_informationCenter_itemLastEvent">
Expand Down Expand Up @@ -53,12 +60,6 @@
{include file="controllers/revealMore.tpl" content=$comment->getComments()|strip_unsafe_html}
{/iterate}
{/if}
{if $reviewAssignment->getCompetingInterests()}
<h3>{translate key="reviewer.submission.competingInterests"}</h3>
<div class="review_competing_interests">
{$reviewAssignment->getCompetingInterests()|nl2br|strip_unsafe_html}
</div>
{/if}

{else}
{if $reviewAssignment->getDateCompleted()}
Expand Down

0 comments on commit 0e30d1f

Please sign in to comment.