Skip to content

Commit e874db2

Browse files
committed
pkp/pkp-lib#10766 Remove old workflow code
1 parent f929cfd commit e874db2

File tree

7 files changed

+0
-321
lines changed

7 files changed

+0
-321
lines changed

controllers/tab/workflow/ReviewRoundTabHandler.php

-52
This file was deleted.

controllers/tab/workflow/WorkflowTabHandler.php

-89
This file was deleted.

pages/workflow/WorkflowHandler.php

-127
Original file line numberDiff line numberDiff line change
@@ -18,31 +18,14 @@
1818

1919
use APP\components\forms\publication\PublishForm;
2020
use APP\core\Application;
21-
use APP\decision\types\Accept;
22-
use APP\decision\types\SkipExternalReview;
2321
use APP\facades\Repo;
2422
use APP\file\PublicFileManager;
2523
use APP\publication\Publication;
26-
use APP\submission\Submission;
2724
use APP\template\TemplateManager;
2825
use PKP\components\forms\publication\TitleAbstractForm;
2926
use PKP\context\Context;
30-
use PKP\decision\types\BackFromCopyediting;
31-
use PKP\decision\types\BackFromProduction;
32-
use PKP\decision\types\CancelReviewRound;
33-
use PKP\decision\types\Decline;
34-
use PKP\decision\types\InitialDecline;
35-
use PKP\decision\types\RecommendAccept;
36-
use PKP\decision\types\RecommendDecline;
37-
use PKP\decision\types\RecommendRevisions;
38-
use PKP\decision\types\RequestRevisions;
39-
use PKP\decision\types\RevertDecline;
40-
use PKP\decision\types\RevertInitialDecline;
41-
use PKP\decision\types\SendExternalReview;
42-
use PKP\decision\types\SendToProduction;
4327
use PKP\notification\Notification;
4428
use PKP\pages\workflow\PKPWorkflowHandler;
45-
use PKP\plugins\Hook;
4629
use PKP\security\Role;
4730

4831
class WorkflowHandler extends PKPWorkflowHandler
@@ -58,12 +41,9 @@ public function __construct()
5841
[Role::ROLE_ID_SUB_EDITOR, Role::ROLE_ID_MANAGER, Role::ROLE_ID_SITE_ADMIN, Role::ROLE_ID_ASSISTANT],
5942
[
6043
'access', 'index', 'submission',
61-
'editorDecisionActions', // Submission & review
6244
'externalReview', // review
6345
'editorial',
6446
'production',
65-
'submissionHeader',
66-
'submissionProgressBar',
6747
]
6848
);
6949
}
@@ -211,113 +191,6 @@ protected function getEditorAssignmentNotificationTypeByStageId($stageId)
211191
return null;
212192
}
213193

214-
protected function _getRepresentationsGridUrl($request, $submission)
215-
{
216-
return $request->getDispatcher()->url(
217-
$request,
218-
Application::ROUTE_COMPONENT,
219-
null,
220-
'grid.articleGalleys.ArticleGalleyGridHandler',
221-
'fetchGrid',
222-
null,
223-
[
224-
'submissionId' => $submission->getId(),
225-
'publicationId' => '__publicationId__',
226-
]
227-
);
228-
}
229-
230-
protected function getStageDecisionTypes(int $stageId): array
231-
{
232-
$submission = $this->getAuthorizedContextObject(Application::ASSOC_TYPE_SUBMISSION);
233-
$request = Application::get()->getRequest();
234-
$reviewRoundId = (int) $request->getUserVar('reviewRoundId');
235-
236-
switch ($stageId) {
237-
case WORKFLOW_STAGE_ID_SUBMISSION:
238-
$decisionTypes = [
239-
new SendExternalReview(),
240-
new SkipExternalReview(),
241-
];
242-
if ($submission->getData('status') === Submission::STATUS_DECLINED) {
243-
$decisionTypes[] = new RevertInitialDecline();
244-
} elseif ($submission->getData('status') === Submission::STATUS_QUEUED) {
245-
$decisionTypes[] = new InitialDecline();
246-
}
247-
break;
248-
case WORKFLOW_STAGE_ID_EXTERNAL_REVIEW:
249-
$decisionTypes = [
250-
new RequestRevisions(),
251-
new Accept(),
252-
];
253-
$cancelReviewRound = new CancelReviewRound();
254-
if ($cancelReviewRound->canRetract($submission, $reviewRoundId)) {
255-
$decisionTypes[] = $cancelReviewRound;
256-
}
257-
if ($submission->getData('status') === Submission::STATUS_DECLINED) {
258-
$decisionTypes[] = new RevertDecline();
259-
} elseif ($submission->getData('status') === Submission::STATUS_QUEUED) {
260-
$decisionTypes[] = new Decline();
261-
}
262-
break;
263-
case WORKFLOW_STAGE_ID_EDITING:
264-
$decisionTypes = [
265-
new SendToProduction(),
266-
new BackFromCopyediting(),
267-
];
268-
break;
269-
case WORKFLOW_STAGE_ID_PRODUCTION:
270-
$decisionTypes = [
271-
new BackFromProduction(),
272-
];
273-
break;
274-
}
275-
276-
Hook::call('Workflow::Decisions', [&$decisionTypes, $stageId]);
277-
278-
return $decisionTypes;
279-
}
280-
281-
protected function getStageRecommendationTypes(int $stageId): array
282-
{
283-
switch ($stageId) {
284-
case WORKFLOW_STAGE_ID_EXTERNAL_REVIEW:
285-
$decisionTypes = [
286-
new RecommendRevisions(),
287-
new RecommendAccept(),
288-
new RecommendDecline(),
289-
];
290-
break;
291-
default:
292-
$decisionTypes = [];
293-
}
294-
295-
296-
Hook::call('Workflow::Recommendations', [$decisionTypes, $stageId]);
297-
298-
return $decisionTypes;
299-
}
300-
301-
protected function getPrimaryDecisionTypes(): array
302-
{
303-
return [
304-
SendExternalReview::class,
305-
Accept::class,
306-
SendToProduction::class,
307-
];
308-
}
309-
310-
protected function getWarnableDecisionTypes(): array
311-
{
312-
return [
313-
InitialDecline::class,
314-
Decline::class,
315-
CancelReviewRound::class,
316-
BackFromCopyediting::class,
317-
BackFromProduction::class,
318-
];
319-
}
320-
321194
protected function getTitleAbstractForm(string $latestPublicationApiUrl, array $locales, Publication $latestPublication, Context $context): TitleAbstractForm
322195
{
323196
$section = Repo::section()->get($latestPublication->getData('sectionId'), $context->getId());

pages/workflow/index.php

-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,5 @@
2424
case 'externalReview':
2525
case 'editorial':
2626
case 'production':
27-
case 'editorDecisionActions':
28-
case 'submissionProgressBar':
2927
return new APP\pages\workflow\WorkflowHandler();
3028
}

registry/minifiedScripts.txt

-2
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,10 @@ lib/pkp/js/controllers/grid/representations/form/RepresentationFormHandler.js
9191
lib/pkp/js/controllers/grid/settings/user/form/UserDetailsFormHandler.js
9292
lib/pkp/js/controllers/grid/settings/roles/form/UserGroupFormHandler.js
9393
lib/pkp/js/controllers/grid/notifications/NotificationsGridHandler.js
94-
lib/pkp/js/controllers/tab/workflow/WorkflowTabHandler.js
9594
lib/pkp/js/controllers/informationCenter/NotesHandler.js
9695
lib/pkp/js/controllers/dashboard/form/DashboardTaskFormHandler.js
9796
lib/pkp/js/pages/header/HeaderHandler.js
9897
lib/pkp/js/pages/header/TasksHandler.js
99-
lib/pkp/js/pages/workflow/WorkflowHandler.js
10098
lib/pkp/js/controllers/grid/users/UserGridHandler.js
10199
lib/pkp/js/controllers/grid/users/reviewer/AdvancedReviewerSearchHandler.js
102100
lib/pkp/js/controllers/grid/users/reviewer/form/EditReviewFormHandler.js

templates/controllers/tab/authorDashboard/production.tpl

-18
This file was deleted.

templates/controllers/tab/workflow/production.tpl

-31
This file was deleted.

0 commit comments

Comments
 (0)