diff --git a/controllers/grid/settings/series/SeriesGridHandler.inc.php b/controllers/grid/settings/series/SeriesGridHandler.inc.php index d428f6328b9..7d87546360f 100644 --- a/controllers/grid/settings/series/SeriesGridHandler.inc.php +++ b/controllers/grid/settings/series/SeriesGridHandler.inc.php @@ -256,10 +256,6 @@ function deleteSeries($args, $request) { $activeSeriesCount++; } } - if ($activeSeriesCount < 1) { - return new JSONMessage(false, __('manager.series.confirmDeactivateSeries.error')); - return false; - } $seriesDao->deleteObject($series); return DAO::getDataChangedEvent($series->getId()); @@ -284,33 +280,18 @@ function deactivateSeries($args, $request) { // Get series object $seriesDao = DAORegistry::getDAO('SeriesDAO'); /* @var $seriesDao SeriesDAO */ - // Validate if it can be inactive - $seriesIterator = $seriesDao->getByContextId($context->getId(),null,false); - $activeSeriesCount = 0; - while ($series = $seriesIterator->next()) { - if (!$series->getIsInactive()) { - $activeSeriesCount++; - } - } - if ($activeSeriesCount > 1) { - $series = $seriesDao->getById($seriesId, $context->getId()); - if ($request->checkCSRF() && isset($series) && !$series->getIsInactive()) { - $series->setIsInactive(1); - $seriesDao->updateObject($series); + $series = $seriesDao->getById($seriesId, $context->getId()); - // Create the notification. - $notificationMgr = new NotificationManager(); - $user = $request->getUser(); - $notificationMgr->createTrivialNotification($user->getId()); + if ($request->checkCSRF() && isset($series) && !$series->getIsInactive()) { + $series->setIsInactive(1); + $seriesDao->updateObject($series); - return DAO::getDataChangedEvent($seriesId); - } - } else { // Create the notification. $notificationMgr = new NotificationManager(); $user = $request->getUser(); - $notificationMgr->createTrivialNotification($user->getId(), NOTIFICATION_TYPE_ERROR, array('contents' => __('manager.series.confirmDeactivateSeries.error'))); + $notificationMgr->createTrivialNotification($user->getId()); + return DAO::getDataChangedEvent($seriesId); } diff --git a/controllers/grid/settings/series/form/SeriesForm.inc.php b/controllers/grid/settings/series/form/SeriesForm.inc.php index 7f2fe58d714..0cdcd55d2b7 100644 --- a/controllers/grid/settings/series/form/SeriesForm.inc.php +++ b/controllers/grid/settings/series/form/SeriesForm.inc.php @@ -112,25 +112,6 @@ function validate($callHooks = true) { } } - // Validate if it can be inactive - if ($this->getData('isInactive')) { - $request = Application::get()->getRequest(); - $context = $request->getContext(); - $seriesId = $this->getSeriesId(); - - $seriesDao = DAORegistry::getDAO('SeriesDAO'); /* @var $seriesDao SeriesDAO */ - $seriesIterator = $seriesDao->getByContextId($context->getId()); - $activeSeriesCount = 0; - while ($series = $seriesIterator->next()) { - if (!$series->getIsInactive() && ($seriesId != $series->getId())) { - $activeSeriesCount++; - } - } - if ($activeSeriesCount < 1 && $this->getData('isInactive')) { - $this->addError('isInactive', __('manager.series.confirmDeactivateSeries.error')); - } - } - return parent::validate($callHooks); } diff --git a/templates/frontend/pages/submissions.tpl b/templates/frontend/pages/submissions.tpl new file mode 100644 index 00000000000..d0e7c4f1f7c --- /dev/null +++ b/templates/frontend/pages/submissions.tpl @@ -0,0 +1,102 @@ +{** + * templates/frontend/pages/submissions.tpl + * + * 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. + * + * @brief Display the page to view the editorial team. + * + * @uses $currentContext Journal|Press The current press + * @uses $submissionChecklist array List of requirements for submissions + *} +{include file="frontend/components/header.tpl" pageTitle="about.submissions"} + +
+ {include file="frontend/components/breadcrumbs.tpl" currentTitleKey="about.submissions"} +

+ {translate key="about.submissions"} +

+ +
+ {if $currentContext->getData('disableSubmissions')} + {translate key="author.submit.notAccepting"} + {else} + {if $isUserLoggedIn} + {capture assign="newSubmission"}{translate key="about.onlineSubmissions.newSubmission"}{/capture} + {capture assign="viewSubmissions"}{translate key="about.onlineSubmissions.viewSubmissions"}{/capture} + {translate key="about.onlineSubmissions.submissionActions" newSubmission=$newSubmission viewSubmissions=$viewSubmissions} + {else} + {capture assign="login"}{translate key="about.onlineSubmissions.login"}{/capture} + {capture assign="register"}{translate key="about.onlineSubmissions.register"}{/capture} + {translate key="about.onlineSubmissions.registrationRequired" login=$login register=$register} + {/if} + {/if} +
+ + {if $submissionChecklist} +
+

+ {translate key="about.submissionPreparationChecklist"} + {include file="frontend/components/editLink.tpl" page="management" op="settings" path="workflow" anchor="submission/submissionChecklist" sectionTitleKey="about.submissionPreparationChecklist"} +

+ {translate key="about.submissionPreparationChecklist.description"} + +
+ {/if} + + {if $currentContext->getLocalizedData('authorGuidelines')} +
+

+ {translate key="about.authorGuidelines"} + {include file="frontend/components/editLink.tpl" page="management" op="settings" path="workflow" anchor="submission/authorGuidelines" sectionTitleKey="about.authorGuidelines"} +

+ {$currentContext->getLocalizedData('authorGuidelines')} +
+ {/if} + + {foreach from=$sections item="section"} + {if $section->getLocalizedPolicy()} +
+

{$section->getLocalizedTitle()|escape}

+ {$section->getLocalizedPolicy()} + {if $isUserLoggedIn} + {capture assign="sectionSubmissionUrl"}{url page="submission" op="wizard" sectionId=$section->getId()}{/capture} +

+ {translate key="about.onlineSubmissions.submitToSection" name=$section->getLocalizedTitle()|escape url=$sectionSubmissionUrl} +

+ {/if} +
+ {/if} + {/foreach} + + {if $currentContext->getLocalizedData('copyrightNotice')} + + {/if} + + {if $currentContext->getLocalizedData('privacyStatement')} +
+

+ {translate key="about.privacyStatement"} + {include file="frontend/components/editLink.tpl" page="management" op="settings" path="website" anchor="setup/privacy" sectionTitleKey="about.privacyStatement"} +

+ {$currentContext->getLocalizedData('privacyStatement')} +
+ {/if} + +
+ +{include file="frontend/components/footer.tpl"}