Skip to content

Commit

Permalink
Change submission language
Browse files Browse the repository at this point in the history
  • Loading branch information
jyhein committed Sep 25, 2024
1 parent ba55143 commit f8370d0
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
7 changes: 7 additions & 0 deletions registry/uiLocaleKeysBackend.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
[
"admin.jobs.failed.action.redispatch",
"admin.jobs.failed.action.redispatch.all",
"author.users.contributor.principalContact",
"author.users.contributor.setPrincipalContact",
"catalog.manage.categoryFeatured",
Expand All @@ -19,6 +21,7 @@
"common.default",
"common.delete",
"common.description",
"common.details",
"common.download",
"common.edit",
"common.editItem",
Expand Down Expand Up @@ -89,6 +92,8 @@
"grid.action.deleteContributor.confirmationMessage",
"grid.action.edit",
"grid.action.saveOrdering",
"grid.action.sort",
"grid.noItems",
"help.help",
"list.collapseAll",
"list.expandAll",
Expand All @@ -111,6 +116,7 @@
"manager.dois.actions.markStale.prompt",
"manager.dois.actions.markUnregistered.label",
"manager.dois.actions.markUnregistered.prompt",
"manager.dois.disabledChaptersDescription",
"manager.dois.filters.doiAssigned",
"manager.dois.filters.doiAssigned.description",
"manager.dois.formatIdentifier.file",
Expand Down Expand Up @@ -216,6 +222,7 @@
"submission.contributors",
"submission.files",
"submission.list.assignEditor",
"submission.list.changeSubmissionLanguage.title",
"submission.list.copyeditsSubmitted",
"submission.list.currentStage",
"submission.list.discussions",
Expand Down
8 changes: 8 additions & 0 deletions templates/authorDashboard/authorDashboard.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@
);
{rdelim});
</script>
<pkp-header class="pkpPublication__header" :is-one-line="false">
<span class="pkp_submission_workflow__changeSubmissionLanguage">
<strong>{translate key="submission.list.changeSubmissionLanguage.currentLanguage"}</strong> {{ currentSubmissionLanguageLabel }}
</span>
</pkp-header>
<div id="stageTabs" class="pkp_controllers_tab">
<ul>
{foreach from=$workflowStages item=stage}
Expand All @@ -76,6 +81,9 @@
<tab id="publication" label="{translate key="submission.publication"}">
<div class="pkpPublication" ref="publication" aria-live="polite">
<pkp-header class="pkpPublication__header" :is-one-line="false">
<span class="pkpPublication__changeSubmissionLanguage">
<strong>{translate key="submission.list.changeSubmissionLanguage.currentLanguage"}</strong> {{ currentSubmissionLanguageLabel }}
</span>
<span class="pkpPublication__status">
<strong>{{ statusLabel }}</strong>
<span v-if="workingPublication.status === getConstant('STATUS_QUEUED') && workingPublication.id === currentPublication.id" class="pkpPublication__statusUnpublished">{translate key="publication.status.unscheduled"}</span>
Expand Down
23 changes: 23 additions & 0 deletions templates/workflow/workflow.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,11 @@
{rdelim});
</script>

<pkp-header class="pkpPublication__header" :is-one-line="false">
<span class="pkp_submission_workflow__changeSubmissionLanguage">
<strong>{translate key="submission.list.changeSubmissionLanguage.currentLanguage"}</strong> {{ currentSubmissionLanguageLabel }}
</span>
</pkp-header>
<div id="submissionWorkflow" class="pkp_submission_workflow">
{include file="controllers/notification/inPlaceNotification.tpl" notificationId="workflowNotification" requestOptions=$workflowNotificationRequestOptions}
{capture assign=submissionProgressBarUrl}{url op="submissionProgressBar" submissionId=$submission->getId() stageId=$requestedStageId contextId="submission" escape=false}{/capture}
Expand All @@ -135,6 +140,18 @@
<tab id="publication" label="{translate key="submission.publication"}">
<div class="pkpPublication" ref="publication" aria-live="polite">
<pkp-header class="pkpPublication__header" :is-one-line="false">
<span class="pkpPublication__changeSubmissionLanguage">
<span>
<strong>{translate key="submission.list.changeSubmissionLanguage.currentLanguage"}</strong> {{ currentSubmissionLanguageLabel }}
</span>
<pkp-button
v-if="canChangeSubmissionLanguage && publicationList.length < 2 && submission.status !== getConstant('STATUS_PUBLISHED')"
@click="openChangeSubmissionLanguageModal"
:is-link="true"
>
{translate key="submission.list.changeSubmissionLanguage.buttonLabel"}
</pkp-button>
</span>
<span class="pkpPublication__status">
<strong>{{ statusLabel }}</strong>
<span v-if="workingPublication.status === getConstant('STATUS_QUEUED') && workingPublication.id === currentPublication.id" class="pkpPublication__statusUnpublished">{translate key="publication.status.unscheduled"}</span>
Expand Down Expand Up @@ -206,6 +223,12 @@
>
{translate key="publication.editDisabled"}
</div>
<div
v-if="workingPublication.status !== getConstant('STATUS_PUBLISHED') && !submissionSupportedLocales.includes(submission.locale)"
class="pkpSubmission__localeNotSupported"
>
{translate key="submission.localeNotSupported" language="{{ currentSubmissionLanguageLabel }}"}
</div>
<tabs class="pkpPublication__tabs" :is-side-tabs="true" :track-history="true" :label="publicationTabsLabel">
<tab id="titleAbstract" label="{translate key="publication.titleAbstract"}">
<pkp-form v-bind="components.{PKP\components\forms\publication\TitleAbstractForm::FORM_TITLE_ABSTRACT}" @set="set" />
Expand Down

0 comments on commit f8370d0

Please sign in to comment.