From d846f0dcdede64bd5f25c727eccd9c566605077b Mon Sep 17 00:00:00 2001 From: Bozana Bokan Date: Tue, 18 Jun 2024 14:35:26 +0200 Subject: [PATCH 1/3] fix editorial masthead locale keys --- classes/components/forms/context/PKPAppearanceMastheadForm.php | 2 +- classes/components/forms/context/PKPMastheadForm.php | 2 +- locale/en/manager.po | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/classes/components/forms/context/PKPAppearanceMastheadForm.php b/classes/components/forms/context/PKPAppearanceMastheadForm.php index 19ba35e4c59..2a23dec51a6 100644 --- a/classes/components/forms/context/PKPAppearanceMastheadForm.php +++ b/classes/components/forms/context/PKPAppearanceMastheadForm.php @@ -63,7 +63,7 @@ public function __construct($action, $locales, $context) $this->addField(new FieldOptions('mastheadUserGroupIds', [ 'label' => __('common.editorialMasthead'), - 'description' => __('manager.setup.editorialMasthead.description'), + 'description' => __('manager.setup.editorialMasthead.order.description'), 'isOrderable' => true, 'value' => array_column($mastheadOptions, 'value'), 'options' => $mastheadOptions, diff --git a/classes/components/forms/context/PKPMastheadForm.php b/classes/components/forms/context/PKPMastheadForm.php index b5f6e1cdbeb..1f33b779081 100644 --- a/classes/components/forms/context/PKPMastheadForm.php +++ b/classes/components/forms/context/PKPMastheadForm.php @@ -90,7 +90,7 @@ public function __construct($action, $locales, $context, $imageUploadUrl) ]) ->addField(new FieldRichTextarea('editorialHistory', [ 'label' => __('common.editorialHistory'), - 'description' => __('manager.setup.editorialMasthead.description'), + 'description' => __('manager.setup.editorialMasthead.editorialHistory.description'), 'isMultilingual' => true, 'groupId' => 'editorialMasthead', 'toolbar' => 'bold italic superscript subscript | link | blockquote bullist numlist | image | code', diff --git a/locale/en/manager.po b/locale/en/manager.po index 91ed0ccc493..cf27e504fc6 100644 --- a/locale/en/manager.po +++ b/locale/en/manager.po @@ -3555,6 +3555,9 @@ msgstr "Require submitting Authors to file a Competing Interest (CI) statement w msgid "manager.setup.masthead" msgstr "Masthead" +msgid "manager.setup.editorialMasthead.order.description" +msgstr "Define the order of masthead roles for public display." + msgid "manager.setup.editorialMasthead.order.reviewers.description" msgstr "Reviewers will be displayed in a standardized format to maintain uniformity and ensure easy discoverability in this section." From 3fb98215f2f14a720a3a0763f5e3a72779333079 Mon Sep 17 00:00:00 2001 From: Bozana Bokan Date: Tue, 18 Jun 2024 14:36:33 +0200 Subject: [PATCH 2/3] pkp/pkp-lib#10080 consider only external reviewers to be listed on the Editorial Masthead page --- classes/submission/reviewAssignment/DAO.php | 5 +++-- classes/submission/reviewAssignment/Repository.php | 6 +++--- pages/about/AboutContextHandler.php | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/classes/submission/reviewAssignment/DAO.php b/classes/submission/reviewAssignment/DAO.php index fa2a06326dc..f252e547d12 100644 --- a/classes/submission/reviewAssignment/DAO.php +++ b/classes/submission/reviewAssignment/DAO.php @@ -180,11 +180,11 @@ public function delete(ReviewAssignment $reviewAssignment) } /** - * Get IDs of the reviewers that have completed a reivew for the given context in the given year. + * Get IDs of the external reviewers that have completed a reivew for the given context in the given year. * * @return Collection */ - public function getReviewerIdsByCompletedYear(int $contextId, string $year): Collection + public function getExternalReviewerIdsByCompletedYear(int $contextId, string $year): Collection { return DB::table($this->table) ->whereIn( @@ -195,6 +195,7 @@ public function getReviewerIdsByCompletedYear(int $contextId, string $year): Col ->where('s.context_id', $contextId) ) ->whereYear('date_completed', $year) + ->where('stage_id', '=', WORKFLOW_STAGE_ID_EXTERNAL_REVIEW) ->pluck('reviewer_id'); } } diff --git a/classes/submission/reviewAssignment/Repository.php b/classes/submission/reviewAssignment/Repository.php index a07157bdddc..946e973f8a3 100644 --- a/classes/submission/reviewAssignment/Repository.php +++ b/classes/submission/reviewAssignment/Repository.php @@ -281,12 +281,12 @@ protected function updateReviewRoundStatus(ReviewAssignment $reviewAssignment): } /** - * @copydoc DAO::getReviewerIdsByCompletedYear() + * @copydoc DAO::getExternalReviewerIdsByCompletedYear() * * @return Collection */ - public function getReviewerIdsByCompletedYear(int $contextId, string $year): Collection + public function getExternalReviewerIdsByCompletedYear(int $contextId, string $year): Collection { - return $this->dao->getReviewerIdsByCompletedYear($contextId, $year); + return $this->dao->getExternalReviewerIdsByCompletedYear($contextId, $year); } } diff --git a/pages/about/AboutContextHandler.php b/pages/about/AboutContextHandler.php index b593eb3badd..5d20218f0b6 100644 --- a/pages/about/AboutContextHandler.php +++ b/pages/about/AboutContextHandler.php @@ -106,7 +106,7 @@ public function editorialMasthead($args, $request) } $previousYear = date('Y') - 1; - $reviewerIds = Repo::reviewAssignment()->getReviewerIdsByCompletedYear($context->getId(), $previousYear); + $reviewerIds = Repo::reviewAssignment()->getExternalReviewerIdsByCompletedYear($context->getId(), $previousYear); $usersCollector = Repo::user()->getCollector(); $reviewers = $usersCollector ->filterByUserIds($reviewerIds->toArray()) From d86c2396e893e53aae027ffaa7969ceaf1ff37d5 Mon Sep 17 00:00:00 2001 From: Bozana Bokan Date: Fri, 12 Jul 2024 11:55:29 +0200 Subject: [PATCH 3/3] pkp/pkp-lib#10080 move manager.setup.editorialMasthead.editorialHistory.description to pkp-lib --- locale/en/manager.po | 3 +++ 1 file changed, 3 insertions(+) diff --git a/locale/en/manager.po b/locale/en/manager.po index cf27e504fc6..c9944d6f150 100644 --- a/locale/en/manager.po +++ b/locale/en/manager.po @@ -3561,5 +3561,8 @@ msgstr "Define the order of masthead roles for public display." msgid "manager.setup.editorialMasthead.order.reviewers.description" msgstr "Reviewers will be displayed in a standardized format to maintain uniformity and ensure easy discoverability in this section." +msgid "manager.setup.editorialMasthead.editorialHistory.description" +msgstr "Please provide the editorial history, including the full name, affiliation, and start and end dates of each editor." + msgid "mailable.changeProfileEmailInvitationNotify.name" msgstr "Change Email Address Invitation"