-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pkp/pkp-lib#5717 Refactor editorial decisions and introduce email com…
…poser UI component
- Loading branch information
Showing
69 changed files
with
566 additions
and
713 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
/** | ||
* @defgroup api_v1_library Email templates API requests | ||
*/ | ||
|
||
/** | ||
* @file api/v1/library/index.php | ||
* | ||
* Copyright (c) 2014-2021 Simon Fraser University | ||
* Copyright (c) 2003-2021 John Willinsky | ||
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING. | ||
* | ||
* @ingroup api_v1_library | ||
* @brief Handle API requests for the publisher and submission library files. | ||
*/ | ||
import('lib.pkp.api.v1._library.PKPLibraryHandler'); | ||
return new PKPLibraryHandler(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?php | ||
|
||
/** | ||
* @defgroup decision Decision | ||
*/ | ||
|
||
/** | ||
* @file classes/decision/Decision.inc.php | ||
* | ||
* Copyright (c) 2014-2021 Simon Fraser University | ||
* Copyright (c) 2000-2021 John Willinsky | ||
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING. | ||
* | ||
* @class Decision | ||
* @ingroup decision | ||
* | ||
* @see DAO | ||
* | ||
* @brief An editorial decision taken on a submission, such as to accept, decline or request revisions. | ||
*/ | ||
|
||
namespace APP\decision; | ||
|
||
use PKP\decision\Decision as BaseDecision; | ||
|
||
class Decision extends BaseDecision | ||
{ | ||
public const EXTERNAL_REVIEW = 8; | ||
public const ACCEPT = 1; | ||
public const DECLINE = 4; | ||
public const PENDING_REVISIONS = 2; | ||
public const RESUBMIT = 3; | ||
public const NEW_ROUND = 16; | ||
} | ||
|
||
if (!PKP_STRICT_MODE) { | ||
define('EXTERNAL_REVIEW', Decision::EXTERNAL_REVIEW); | ||
define('ACCEPT', Decision::ACCEPT); | ||
define('DECLINE', Decision::DECLINE); | ||
define('PENDING_REVISIONS', Decision::PENDING_REVISIONS); | ||
define('RESUBMIT', Decision::RESUBMIT); | ||
define('NEW_ROUND', Decision::NEW_ROUND); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
<?php | ||
/** | ||
* @file classes/decision/Repository.inc.php | ||
* | ||
* Copyright (c) 2014-2021 Simon Fraser University | ||
* Copyright (c) 2000-2021 John Willinsky | ||
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING. | ||
* | ||
* @class decision | ||
* | ||
* @brief A repository to find and manage editorial decisions. | ||
*/ | ||
|
||
namespace APP\decision; | ||
|
||
use APP\notification\Notification; | ||
use Illuminate\Database\Eloquent\Collection; | ||
use PKP\decision\types\Accept; | ||
use PKP\decision\types\BackToCopyediting; | ||
use PKP\decision\types\BackToReview; | ||
use PKP\decision\types\BackToSubmissionFromCopyediting; | ||
use PKP\decision\types\Decline; | ||
use PKP\decision\types\InitialDecline; | ||
use PKP\decision\types\NewExternalReviewRound; | ||
use PKP\decision\types\RecommendAccept; | ||
use PKP\decision\types\RecommendDecline; | ||
use PKP\decision\types\RecommendResubmit; | ||
use PKP\decision\types\RecommendRevisions; | ||
use PKP\decision\types\RequestRevisions; | ||
use PKP\decision\types\Resubmit; | ||
use PKP\decision\types\RevertDecline; | ||
use PKP\decision\types\RevertInitialDecline; | ||
use PKP\decision\types\SendExternalReview; | ||
use PKP\decision\types\SendToProduction; | ||
use PKP\decision\types\SkipReview; | ||
use PKP\plugins\HookRegistry; | ||
|
||
class Repository extends \PKP\decision\Repository | ||
{ | ||
/** The valid decision types */ | ||
protected ?Collection $types; | ||
|
||
/** @copydoc \PKP\decision\Repository::getTypes */ | ||
public function getTypes(): Collection | ||
{ | ||
if (!isset($this->types)) { | ||
$types = new Collection([ | ||
new Accept(), | ||
new BackToCopyediting(), | ||
new BackToReview(), | ||
new BackToSubmissionFromCopyediting(), | ||
new Decline(), | ||
new InitialDecline(), | ||
new NewExternalReviewRound(), | ||
new RecommendAccept(), | ||
new RecommendDecline(), | ||
new RecommendResubmit(), | ||
new RecommendRevisions(), | ||
new Resubmit(), | ||
new RequestRevisions(), | ||
new RevertDecline(), | ||
new RevertInitialDecline(), | ||
new SendExternalReview(), | ||
new SendToProduction(), | ||
new SkipReview(), | ||
]); | ||
HookRegistry::call('Decision::types', [$types]); | ||
$this->types = $types; | ||
} | ||
|
||
return $this->types; | ||
} | ||
|
||
protected function getReviewNotificationTypes(): array | ||
{ | ||
return [Notification::NOTIFICATION_TYPE_PENDING_EXTERNAL_REVISIONS]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.