Skip to content

Commit c1715f7

Browse files
committed
pkp/pkp-lib#10263 Fix file name and errors relax editing metadata on published/posted materials
1 parent 38519f9 commit c1715f7

File tree

8 files changed

+26
-34
lines changed

8 files changed

+26
-34
lines changed

src/components/ListPanel/contributors/ContributorsListPanel.vue

+3-16
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@
1212
<Spinner v-if="isLoading" />
1313
<template #actions>
1414
<PkpButton
15-
v-if="
16-
publication.status !== getConstant('STATUS_PUBLISHED') &&
17-
canEditPublication
18-
"
15+
v-if="canEditPublication"
1916
icon="Sort"
2017
:is-active="isOrdering"
2118
:disabled="isLoading"
@@ -39,11 +36,7 @@
3936
{{ t('contributor.listPanel.preview') }}
4037
</PkpButton>
4138
<PkpButton
42-
v-if="
43-
!isOrdering &&
44-
publication.status !== getConstant('STATUS_PUBLISHED') &&
45-
canEditPublication
46-
"
39+
v-if="!isOrdering && canEditPublication"
4740
:disabled="isLoading"
4841
@click="openAddModal"
4942
>
@@ -65,13 +58,7 @@
6558
{{ localize(item.affiliation) }}
6659
</div>
6760
</template>
68-
<template
69-
v-if="
70-
publication.status !== getConstant('STATUS_PUBLISHED') &&
71-
canEditPublication
72-
"
73-
#item-actions="{item}"
74-
>
61+
<template v-if="canEditPublication" #item-actions="{item}">
7562
<template v-if="isOrdering">
7663
<Orderer
7764
:item-id="item.id"

src/managers/GalleyManager/useGalleyManagerConfig.js

-9
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,6 @@ export function useGalleyManagerConfig() {
8484
function getManagerConfig({submission, publication}) {
8585
const permittedActions = GalleyManagerConfiguration.actions
8686
.filter((action) => {
87-
if (
88-
publication.value.status === pkp.const.STATUS_PUBLISHED &&
89-
GalleyManagerConfiguration.actionsRequiresUnpublishedState.includes(
90-
action,
91-
)
92-
) {
93-
return false;
94-
}
95-
9687
return true;
9788
})
9889
.filter((action) => {

src/pages/workflow/WorkflowPageOJS.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import WorkflowPublicationVersionControl from './components/publication/Workflow
2727
import WorkflowChangeSubmissionLanguage from './components/publication/WorkflowChangeSubmissionLanguage.vue';
2828
import WorkflowPrimaryBasicMetadata from './components/primary/WorkflowPrimaryBasicMetadata.vue';
2929
import WorkflowSubmissionStatus from './components/primary/WorkflowSubmissionStatus.vue';
30-
import WorkflowPublicationEditDisabled from './components/publication/WorkflowPublicationEditDisabled.vue';
30+
import WorkflowPublicationEditWarning from './components/publication/WorkflowPublicationEditWarning.vue';
3131
3232
import {useWorkflowConfigOJS as useWorkflowConfig} from './composables/useWorkflowConfig/useWorkflowConfigOJS';
3333
import {useWorkflowNavigationConfigOJS as useWorkflowNavigationConfig} from './composables/useWorkflowNavigationConfig/useWorkflowNavigationConfigOJS';
@@ -57,7 +57,7 @@ const Components = markRaw({
5757
WorkflowPublicationVersionControl,
5858
WorkflowChangeSubmissionLanguage,
5959
WorkflowSubmissionStatus,
60-
WorkflowPublicationEditDisabled,
60+
WorkflowPublicationEditWarning,
6161
});
6262
6363
const store = useWorkflowStore({

src/pages/workflow/WorkflowPageOMP.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import WorkflowPublicationVersionControl from './components/publication/Workflow
3232
import WorkflowChangeSubmissionLanguage from './components/publication/WorkflowChangeSubmissionLanguage.vue';
3333
import WorkflowPrimaryBasicMetadata from './components/primary/WorkflowPrimaryBasicMetadata.vue';
3434
import WorkflowSubmissionStatus from './components/primary/WorkflowSubmissionStatus.vue';
35-
import WorkflowPublicationEditDisabled from './components/publication/WorkflowPublicationEditDisabled.vue';
35+
import WorkflowPublicationEditWarning from './components/publication/WorkflowPublicationEditWarning.vue';
3636
3737
const props = defineProps({
3838
submissionId: {type: Number, required: true},
@@ -60,7 +60,7 @@ const Components = markRaw({
6060
WorkflowPublicationVersionControl,
6161
WorkflowChangeSubmissionLanguage,
6262
WorkflowSubmissionStatus,
63-
WorkflowPublicationEditDisabled,
63+
WorkflowPublicationEditWarning,
6464
WorkflowMarketingForm,
6565
WorkflowWorkTypeOMP,
6666
});

src/pages/workflow/WorkflowPageOPS.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import WorkflowChangeSubmissionLanguage from './components/publication/WorkflowC
2626
import WorkflowPrimaryBasicMetadata from './components/primary/WorkflowPrimaryBasicMetadata.vue';
2727
import WorkflowPublicationRelationDropdownOPS from './components/publication/WorkflowPublicationRelationDropdownOPS.vue';
2828
import WorkflowSubmissionStatus from './components/primary/WorkflowSubmissionStatus.vue';
29-
import WorkflowPublicationEditDisabled from './components/publication/WorkflowPublicationEditDisabled.vue';
29+
import WorkflowPublicationEditWarning from './components/publication/WorkflowPublicationEditWarning.vue';
3030
3131
const props = defineProps({
3232
submissionId: {type: Number, required: true},
@@ -49,7 +49,7 @@ const Components = markRaw({
4949
WorkflowPublicationVersionControl,
5050
WorkflowChangeSubmissionLanguage,
5151
WorkflowSubmissionStatus,
52-
WorkflowPublicationEditDisabled,
52+
WorkflowPublicationEditWarning,
5353
});
5454
5555
const store = useWorkflowStore({

src/pages/workflow/components/publication/WorkflowPublicationEditDisabled.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<div
33
class="bg -mx-5 -mt-5 bg-attention p-5 text-center text-base-normal text-on-dark"
44
>
5-
{{ t('publication.editDisabled') }}
5+
{{ t('publication.editorEditWarning') }}
66
</div>
77
</template>
88

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!-- file: WorkflowPublicationEditWarning.vue -->
2+
<template>
3+
<div
4+
class="bg -mx-5 -mt-5 bg-attention p-5 text-center text-base-normal text-on-dark"
5+
>
6+
{{ t('publication.editorEditWarning') }}
7+
</div>
8+
</template>
9+
10+
<script setup>
11+
import {useLocalize} from '@/composables/useLocalize';
12+
const {t} = useLocalize();
13+
</script>

src/pages/workflow/composables/useWorkflowConfig/workflowConfigEditorialOJS.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,7 @@ export const PublicationConfig = {
709709
const items = [];
710710
if (selectedPublication.status === pkp.const.STATUS_PUBLISHED) {
711711
items.push({
712-
component: 'WorkflowPublicationEditDisabled',
712+
component: 'WorkflowPublicationEditWarning',
713713
props: {},
714714
});
715715
}
@@ -930,7 +930,7 @@ export const PublicationConfig = {
930930
formName: 'identifier',
931931
submission,
932932
publication: selectedPublication,
933-
canEdit: permissions.canEditPublication,
933+
canEdit: 'true',
934934
},
935935
},
936936
];
@@ -963,6 +963,7 @@ export const PublicationConfig = {
963963
props: {
964964
submission,
965965
publication: selectedPublication,
966+
canEdit: permissions.canEditPublication,
966967
},
967968
},
968969
];

0 commit comments

Comments
 (0)