Skip to content

Commit

Permalink
Merge branch 'main' of github.com:MrRob100/omp
Browse files Browse the repository at this point in the history
# Conflicts:
#	lib/pkp
#	lib/ui-library
  • Loading branch information
MrRob100 committed Nov 18, 2024
2 parents 32e973d + 708e51c commit 36426f7
Show file tree
Hide file tree
Showing 28 changed files with 96 additions and 57 deletions.
12 changes: 8 additions & 4 deletions classes/submission/maps/Schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,13 @@ protected function getAvailableEditorialDecisions(int $stageId, Submission $subm
];

if ($submission->getData('status') === Submission::STATUS_DECLINED) {
$decisionTypes[] = new RevertInitialDecline();
// when the submission is declined, allow only reverting declined status
$decisionTypes = [new RevertInitialDecline()];
} elseif ($submission->getData('status') === Submission::STATUS_QUEUED) {
$decisionTypes[] = new InitialDecline();
$decisionTypes[] = new SendInternalReview();

}
$decisionTypes[] = new SendInternalReview();
break;
case WORKFLOW_STAGE_ID_INTERNAL_REVIEW:
$decisionTypes = [
Expand All @@ -185,7 +187,8 @@ protected function getAvailableEditorialDecisions(int $stageId, Submission $subm
}

if ($submission->getData('status') === Submission::STATUS_DECLINED) {
$decisionTypes[] = new RevertDeclineInternal();
// when the submission is declined, allow only reverting declined status
$decisionTypes = [new RevertDeclineInternal()];
} elseif ($submission->getData('status') === Submission::STATUS_QUEUED) {
$decisionTypes[] = new DeclineInternal();
}
Expand All @@ -201,7 +204,8 @@ protected function getAvailableEditorialDecisions(int $stageId, Submission $subm
$decisionTypes[] = $cancelReviewRound;
}
if ($submission->getData('status') === Submission::STATUS_DECLINED) {
$decisionTypes[] = new RevertDecline();
// when the submission is declined, allow only reverting declined status
$decisionTypes = [new RevertDecline()];
} elseif ($submission->getData('status') === Submission::STATUS_QUEUED) {
$decisionTypes[] = new Decline();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ public function initialize($request, $args = null)
new AjaxModal(
$router->url($request, null, null, 'addCode', null, $actionArgs),
__('grid.action.addCode'),
'modal_add_item'
),
__('grid.action.addCode'),
'add_item'
Expand Down
3 changes: 1 addition & 2 deletions controllers/grid/catalogEntry/IdentificationCodeGridRow.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ public function initialize($request, $template = null)
new AjaxModal(
$router->url($request, null, null, 'editCode', null, $actionArgs),
__('grid.action.edit'),
'modal_edit'
),
__('grid.action.edit'),
'edit'
Expand All @@ -88,7 +87,7 @@ public function initialize($request, $template = null)
__('common.confirmDelete'),
__('common.delete'),
$router->url($request, null, null, 'deleteCode', null, $actionArgs),
'modal_delete'
'negative'
),
__('grid.action.delete'),
'delete'
Expand Down
1 change: 0 additions & 1 deletion controllers/grid/catalogEntry/MarketsGridHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ public function initialize($request, $args = null)
new AjaxModal(
$router->url($request, null, null, 'addMarket', null, $actionArgs),
__('grid.action.addMarket'),
'modal_add_item'
),
__('grid.action.addMarket'),
'add_item'
Expand Down
3 changes: 1 addition & 2 deletions controllers/grid/catalogEntry/MarketsGridRow.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ public function initialize($request, $template = null)
new AjaxModal(
$router->url($request, null, null, 'editMarket', null, $actionArgs),
__('grid.action.edit'),
'modal_edit'
),
__('grid.action.edit'),
'edit'
Expand All @@ -89,7 +88,7 @@ public function initialize($request, $template = null)
__('common.confirmDelete'),
__('common.delete'),
$router->url($request, null, null, 'deleteMarket', null, $actionArgs),
'modal_delete'
'negative'
),
__('grid.action.delete'),
'delete'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ public function initialize($request, $args = null)
new AjaxModal(
$router->url($request, null, null, 'addDate', null, $actionArgs),
__('grid.action.addDate'),
'modal_add_item'
),
__('grid.action.addDate'),
'add_item'
Expand Down
3 changes: 1 addition & 2 deletions controllers/grid/catalogEntry/PublicationDateGridRow.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ public function initialize($request, $template = null)
new AjaxModal(
$router->url($request, null, null, 'editDate', null, $actionArgs),
__('grid.action.edit'),
'modal_edit'
),
__('grid.action.edit'),
'edit'
Expand All @@ -91,7 +90,7 @@ public function initialize($request, $template = null)
__('common.confirmDelete'),
__('common.delete'),
$router->url($request, null, null, 'deleteDate', null, $actionArgs),
'modal_delete'
'negative'
),
__('grid.action.delete'),
'delete'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ public function initialize($request, $template = null)
new AjaxModal(
$router->url($request, null, null, 'editFormat', null, $actionArgs),
__('grid.action.edit'),
'modal_edit'
),
__('grid.action.edit'),
'edit'
Expand All @@ -112,7 +111,7 @@ public function initialize($request, $template = null)
__('common.confirmDelete'),
__('common.delete'),
$router->url($request, null, null, 'deleteFormat', null, $actionArgs),
'modal_delete'
'negative'
),
__('grid.action.delete'),
'delete'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ public function getCellActions($request, $row, $column, $position = GridHandler:
'publicationId' => $data->getData('publicationId'),
]
),
'modal_approve'
$data->getIsAvailable() ? 'negative' : 'primary'
),
$data->getIsAvailable() ? __('grid.catalogEntry.isAvailable') : __('grid.catalogEntry.isNotAvailable'),
$data->getIsAvailable() ? 'complete' : 'incomplete',
Expand Down Expand Up @@ -230,7 +230,6 @@ public function getCellActions($request, $row, $column, $position = GridHandler:
]
),
__('grid.catalogEntry.approvedRepresentation.title'),
'modal_approve'
),
$data->getIsApproved() ? __('submission.complete') : __('submission.incomplete'),
$data->getIsApproved() ? 'complete' : 'incomplete',
Expand Down Expand Up @@ -261,7 +260,6 @@ public function getCellActions($request, $row, $column, $position = GridHandler:
'representationId' => $submissionFile->getData('assocId'),
]),
__('editor.monograph.approvedProofs.edit'),
'edit'
),
__($salesTypeString),
$salesType
Expand All @@ -288,7 +286,6 @@ public function getCellActions($request, $row, $column, $position = GridHandler:
]
),
$title,
'modal_approve'
),
$submissionFile->getViewable() ? __('grid.catalogEntry.availableRepresentation.approved') : __('grid.catalogEntry.availableRepresentation.notApproved'),
$submissionFile->getViewable() ? 'complete' : 'incomplete',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@ public function initialize($request, $args = null)
new AjaxModal(
$router->url($request, null, null, 'addFormat', null, $actionArgs),
__('grid.action.addFormat'),
'modal_add_item'
),
__('grid.action.addFormat'),
'add_item'
Expand Down
1 change: 0 additions & 1 deletion controllers/grid/catalogEntry/PublicationFormatGridRow.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ public function initialize($request, $template = 'controllers/grid/gridRow.tpl')
]
)),
__('submission.dependentFiles'),
'modal_edit'
),
__('submission.dependentFiles'),
'edit'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ public function initialize($request, $args = null)
new AjaxModal(
$router->url($request, null, null, 'addRepresentative', null, $actionArgs),
__('grid.action.addRepresentative'),
'modal_add_item'
),
__('grid.action.addRepresentative'),
'add_item'
Expand Down
3 changes: 1 addition & 2 deletions controllers/grid/catalogEntry/RepresentativesGridRow.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ public function initialize($request, $template = null)
new AjaxModal(
$router->url($request, null, null, 'editRepresentative', null, $actionArgs),
__('grid.action.edit'),
'modal_edit'
),
__('grid.action.edit'),
'edit'
Expand All @@ -83,7 +82,7 @@ public function initialize($request, $template = null)
__('common.confirmDelete'),
__('common.delete'),
$router->url($request, null, null, 'deleteRepresentative', null, $actionArgs),
'modal_delete'
'negative'
),
__('grid.action.delete'),
'delete'
Expand Down
1 change: 0 additions & 1 deletion controllers/grid/catalogEntry/SalesRightsGridHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ public function initialize($request, $args = null)
new AjaxModal(
$router->url($request, null, null, 'addRights', null, $actionArgs),
__('grid.action.addRights'),
'modal_add_item'
),
__('grid.action.addRights'),
'add_item'
Expand Down
3 changes: 1 addition & 2 deletions controllers/grid/catalogEntry/SalesRightsGridRow.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ public function initialize($request, $template = null)
new AjaxModal(
$router->url($request, null, null, 'editRights', null, $actionArgs),
__('grid.action.edit'),
'modal_edit'
),
__('grid.action.edit'),
'edit'
Expand All @@ -83,7 +82,7 @@ public function initialize($request, $template = null)
__('common.confirmDelete'),
__('common.delete'),
$router->url($request, null, null, 'deleteRights', null, $actionArgs),
'modal_delete'
'negative'
),
__('grid.action.delete'),
'delete'
Expand Down
6 changes: 4 additions & 2 deletions controllers/grid/settings/series/SeriesGridCellProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ public function getCellActions($request, $row, $column, $position = GridHandler:
'activateSeries',
null,
['seriesKey' => $row->getId()]
)
),
'primary'
)
)];
} else {
Expand All @@ -87,7 +88,8 @@ public function getCellActions($request, $row, $column, $position = GridHandler:
'deactivateSeries',
null,
['seriesKey' => $row->getId()]
)
),
'negative'
)
)];
}
Expand Down
1 change: 0 additions & 1 deletion controllers/grid/settings/series/SeriesGridHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ public function initialize($request, $args = null)
new AjaxModal(
$router->url($request, null, null, 'addSeries', null, ['gridId' => $this->getId()]),
__('grid.action.addSeries'),
'modal_manage'
),
__('grid.action.addSeries'),
'add_category'
Expand Down
3 changes: 1 addition & 2 deletions controllers/grid/settings/series/SeriesGridRow.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ public function initialize($request, $template = null)
new AjaxModal(
$router->url($request, null, null, 'editSeries', null, ['seriesId' => $seriesId]),
__('grid.action.edit'),
'modal_edit',
true
),
__('grid.action.edit'),
Expand All @@ -62,7 +61,7 @@ public function initialize($request, $template = null)
__('common.confirmDelete'),
__('grid.action.delete'),
$router->url($request, null, null, 'deleteSeries', null, ['seriesId' => $seriesId]),
'modal_delete'
'negative'
),
__('grid.action.delete'),
'delete'
Expand Down
2 changes: 1 addition & 1 deletion controllers/grid/users/chapter/ChapterGridCategoryRow.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public function initialize($request, $template = null)
__('common.confirmDelete'),
__('common.delete'),
$router->url($request, null, null, 'deleteChapter', null, $actionArgs),
'modal_delete'
'negative'
),
__('common.delete'),
'delete'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ public function getCellActions($request, $row, $column, $position = GridHandler:
new AjaxModal(
$router->url($request, null, null, 'editChapter', null, $actionArgs),
__('submission.chapter.editChapter'),
'modal_edit'
),
htmlspecialchars($chapter->getLocalizedTitle())
)
Expand Down
1 change: 0 additions & 1 deletion controllers/grid/users/chapter/ChapterGridHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ public function initialize($request, $args = null)
new AjaxModal(
$router->url($request, null, null, 'addChapter', null, $actionArgs),
__('submission.chapter.addChapter'),
'modal_add_item'
),
__('submission.chapter.addChapter'),
'add_item'
Expand Down
2 changes: 1 addition & 1 deletion plugins/blocks/browse/BrowseBlockPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public function getActions($request, $actionArgs)
'settings',
new AjaxModal(
$router->url($request, null, null, 'manage', null, array_merge($actionArgs, ['verb' => 'settings'])),
$this->getDisplayName()
$this->getDisplayName(),
),
__('manager.plugins.settings'),
null
Expand Down
Loading

0 comments on commit 36426f7

Please sign in to comment.