File tree 8 files changed +26
-34
lines changed
components/ListPanel/contributors
composables/useWorkflowConfig
8 files changed +26
-34
lines changed Original file line number Diff line number Diff line change 12
12
<Spinner v-if =" isLoading" />
13
13
<template #actions >
14
14
<PkpButton
15
- v-if ="
16
- publication.status !== getConstant('STATUS_PUBLISHED') &&
17
- canEditPublication
18
- "
15
+ v-if =" canEditPublication"
19
16
icon =" Sort"
20
17
:is-active =" isOrdering"
21
18
:disabled =" isLoading"
39
36
{{ t('contributor.listPanel.preview') }}
40
37
</PkpButton >
41
38
<PkpButton
42
- v-if ="
43
- !isOrdering &&
44
- publication.status !== getConstant('STATUS_PUBLISHED') &&
45
- canEditPublication
46
- "
39
+ v-if =" !isOrdering && canEditPublication"
47
40
:disabled =" isLoading"
48
41
@click =" openAddModal"
49
42
>
65
58
{{ localize(item.affiliation) }}
66
59
</div >
67
60
</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 } " >
75
62
<template v-if =" isOrdering " >
76
63
<Orderer
77
64
:item-id =" item.id"
Original file line number Diff line number Diff line change @@ -84,15 +84,6 @@ export function useGalleyManagerConfig() {
84
84
function getManagerConfig ( { submission, publication} ) {
85
85
const permittedActions = GalleyManagerConfiguration . actions
86
86
. 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
-
96
87
return true ;
97
88
} )
98
89
. filter ( ( action ) => {
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ import WorkflowPublicationVersionControl from './components/publication/Workflow
27
27
import WorkflowChangeSubmissionLanguage from ' ./components/publication/WorkflowChangeSubmissionLanguage.vue' ;
28
28
import WorkflowPrimaryBasicMetadata from ' ./components/primary/WorkflowPrimaryBasicMetadata.vue' ;
29
29
import WorkflowSubmissionStatus from ' ./components/primary/WorkflowSubmissionStatus.vue' ;
30
- import WorkflowPublicationEditDisabled from ' ./components/publication/WorkflowPublicationEditDisabled .vue' ;
30
+ import WorkflowPublicationEditWarning from ' ./components/publication/WorkflowPublicationEditWarning .vue' ;
31
31
32
32
import {useWorkflowConfigOJS as useWorkflowConfig } from ' ./composables/useWorkflowConfig/useWorkflowConfigOJS' ;
33
33
import {useWorkflowNavigationConfigOJS as useWorkflowNavigationConfig } from ' ./composables/useWorkflowNavigationConfig/useWorkflowNavigationConfigOJS' ;
@@ -57,7 +57,7 @@ const Components = markRaw({
57
57
WorkflowPublicationVersionControl,
58
58
WorkflowChangeSubmissionLanguage,
59
59
WorkflowSubmissionStatus,
60
- WorkflowPublicationEditDisabled ,
60
+ WorkflowPublicationEditWarning ,
61
61
});
62
62
63
63
const store = useWorkflowStore ({
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ import WorkflowPublicationVersionControl from './components/publication/Workflow
32
32
import WorkflowChangeSubmissionLanguage from ' ./components/publication/WorkflowChangeSubmissionLanguage.vue' ;
33
33
import WorkflowPrimaryBasicMetadata from ' ./components/primary/WorkflowPrimaryBasicMetadata.vue' ;
34
34
import WorkflowSubmissionStatus from ' ./components/primary/WorkflowSubmissionStatus.vue' ;
35
- import WorkflowPublicationEditDisabled from ' ./components/publication/WorkflowPublicationEditDisabled .vue' ;
35
+ import WorkflowPublicationEditWarning from ' ./components/publication/WorkflowPublicationEditWarning .vue' ;
36
36
37
37
const props = defineProps ({
38
38
submissionId: {type: Number , required: true },
@@ -60,7 +60,7 @@ const Components = markRaw({
60
60
WorkflowPublicationVersionControl,
61
61
WorkflowChangeSubmissionLanguage,
62
62
WorkflowSubmissionStatus,
63
- WorkflowPublicationEditDisabled ,
63
+ WorkflowPublicationEditWarning ,
64
64
WorkflowMarketingForm,
65
65
WorkflowWorkTypeOMP,
66
66
});
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ import WorkflowChangeSubmissionLanguage from './components/publication/WorkflowC
26
26
import WorkflowPrimaryBasicMetadata from ' ./components/primary/WorkflowPrimaryBasicMetadata.vue' ;
27
27
import WorkflowPublicationRelationDropdownOPS from ' ./components/publication/WorkflowPublicationRelationDropdownOPS.vue' ;
28
28
import WorkflowSubmissionStatus from ' ./components/primary/WorkflowSubmissionStatus.vue' ;
29
- import WorkflowPublicationEditDisabled from ' ./components/publication/WorkflowPublicationEditDisabled .vue' ;
29
+ import WorkflowPublicationEditWarning from ' ./components/publication/WorkflowPublicationEditWarning .vue' ;
30
30
31
31
const props = defineProps ({
32
32
submissionId: {type: Number , required: true },
@@ -49,7 +49,7 @@ const Components = markRaw({
49
49
WorkflowPublicationVersionControl,
50
50
WorkflowChangeSubmissionLanguage,
51
51
WorkflowSubmissionStatus,
52
- WorkflowPublicationEditDisabled ,
52
+ WorkflowPublicationEditWarning ,
53
53
});
54
54
55
55
const store = useWorkflowStore ({
Original file line number Diff line number Diff line change 2
2
<div
3
3
class =" bg -mx-5 -mt-5 bg-attention p-5 text-center text-base-normal text-on-dark"
4
4
>
5
- {{ t('publication.editDisabled ') }}
5
+ {{ t('publication.editorEditWarning ') }}
6
6
</div >
7
7
</template >
8
8
Original file line number Diff line number Diff line change
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>
Original file line number Diff line number Diff line change @@ -709,7 +709,7 @@ export const PublicationConfig = {
709
709
const items = [ ] ;
710
710
if ( selectedPublication . status === pkp . const . STATUS_PUBLISHED ) {
711
711
items . push ( {
712
- component : 'WorkflowPublicationEditDisabled ' ,
712
+ component : 'WorkflowPublicationEditWarning ' ,
713
713
props : { } ,
714
714
} ) ;
715
715
}
@@ -930,7 +930,7 @@ export const PublicationConfig = {
930
930
formName : 'identifier' ,
931
931
submission,
932
932
publication : selectedPublication ,
933
- canEdit : permissions . canEditPublication ,
933
+ canEdit : 'true' ,
934
934
} ,
935
935
} ,
936
936
] ;
@@ -963,6 +963,7 @@ export const PublicationConfig = {
963
963
props : {
964
964
submission,
965
965
publication : selectedPublication ,
966
+ canEdit : permissions . canEditPublication ,
966
967
} ,
967
968
} ,
968
969
] ;
You can’t perform that action at this time.
0 commit comments