forked from pkp/ui-library
-
Notifications
You must be signed in to change notification settings - Fork 0
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#5502 Migrate change language functionality to new workflo…
…w page
- Loading branch information
1 parent
346ecd0
commit 42c40fe
Showing
8 changed files
with
144 additions
and
27 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
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
39 changes: 39 additions & 0 deletions
39
...dashboard/SubmissionSummaryModal/publicationControls/WorkflowChangeSubmissionLanguage.vue
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,39 @@ | ||
<template> | ||
<div> | ||
<span class="text-lg-normal"> | ||
{{ t('submission.list.changeSubmissionLanguage.currentLanguage') }} | ||
</span> | ||
<span class="text-lg-bold">{{ languageLabel }}</span> | ||
<PkpButton | ||
v-if="canChangeSubmissionLanguage" | ||
is-link | ||
@click="handleChangeLanguage" | ||
> | ||
{{ t('submission.list.changeSubmissionLanguage.buttonLabel') }} | ||
</PkpButton> | ||
</div> | ||
</template> | ||
|
||
<script setup> | ||
import {computed} from 'vue'; | ||
import {useLocalize} from '@/composables/useLocalize'; | ||
import PkpButton from '@/components/Button/Button.vue'; | ||
import {useSubmissionSummaryStore} from '../submissionSummaryStore'; | ||
const {t} = useLocalize(); | ||
const props = defineProps({ | ||
submission: {type: Object, required: true}, | ||
canChangeSubmissionLanguage: {type: Boolean, required: true}, | ||
}); | ||
const languageLabel = computed( | ||
() => props.submission.metadataLocales[props.submission.locale], | ||
); | ||
const store = useSubmissionSummaryStore(); | ||
function handleChangeLanguage() { | ||
store.workflowChangeSubmissionLanguage(); | ||
} | ||
</script> |
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