@@ -516,6 +516,39 @@ export default {
516
516
isModalOrDrawer() {
517
517
return this.isModal || this.isDrawer;
518
518
},
519
+ workItemActionProps() {
520
+ return {
521
+ fullPath: this.workItemFullPath,
522
+ workItemId: this.workItem.id,
523
+ hideSubscribe: this.newTodoAndNotificationsEnabled,
524
+ subscribedToNotifications: this.workItemNotificationsSubscribed,
525
+ workItemType: this.workItemType,
526
+ workItemIid: this.iid,
527
+ projectId: this.workItemProjectId,
528
+ canDelete: this.canDelete,
529
+ canReportSpam: this.canReportSpam,
530
+ canUpdate: this.canUpdate,
531
+ canUpdateMetadata: this.canUpdateMetadata,
532
+ canMove: this.canMove,
533
+ isConfidential: this.workItem.confidential,
534
+ isDiscussionLocked: this.isDiscussionLocked,
535
+ isParentConfidential: this.parentWorkItemConfidentiality,
536
+ workItemReference: this.workItem.reference,
537
+ workItemWebUrl: this.workItem.webUrl,
538
+ workItemCreateNoteEmail: this.workItem.createNoteEmail,
539
+ isModal: this.isModalOrDrawer,
540
+ workItemState: this.workItem.state,
541
+ hasChildren: this.hasChildren,
542
+ hasParent: this.shouldShowAncestors,
543
+ parentId: this.parentWorkItemId,
544
+ workItemAuthorId: this.workItemAuthorId,
545
+ canCreateRelatedItem: this.workItemLinkedItems !== undefined,
546
+ isGroup: this.isGroupWorkItem,
547
+ widgets: this.widgets,
548
+ allowedChildTypes: this.allowedChildTypes,
549
+ namespaceFullName: this.namespaceFullName,
550
+ };
551
+ },
519
552
},
520
553
mounted() {
521
554
addShortcutsExtension(ShortcutsWorkItems);
@@ -825,7 +858,22 @@ export default {
825
858
@workItemStateUpdated="$emit('workItemStateUpdated')"
826
859
@toggleReportAbuseModal="toggleReportAbuseModal"
827
860
@todosUpdated="updateWorkItemCurrentTodosWidgetCache"
828
- />
861
+ >
862
+ <template #actions>
863
+ <work-item-actions
864
+ v-if="workItemPresent"
865
+ v-bind="workItemActionProps"
866
+ @deleteWorkItem="$emit('deleteWorkItem', { workItemType, workItemId: workItem.id })"
867
+ @toggleWorkItemConfidentiality="toggleConfidentiality"
868
+ @error="updateError = $event"
869
+ @promotedToObjective="$emit('promotedToObjective', iid)"
870
+ @workItemStateUpdated="$emit('workItemStateUpdated')"
871
+ @workItemTypeChanged="workItemTypeChanged"
872
+ @toggleReportAbuseModal="toggleReportAbuseModal"
873
+ @workItemCreated="handleWorkItemCreated"
874
+ />
875
+ </template>
876
+ </work-item-sticky-header>
829
877
<section class="work-item-view">
830
878
<component :is="isModalOrDrawer ? 'h2' : 'h1'" v-if="editMode" class="gl-sr-only">{{
831
879
s__('WorkItem|Edit work item')
@@ -906,35 +954,7 @@ export default {
906
954
/>
907
955
<work-item-actions
908
956
v-if="workItemPresent"
909
- :full-path="workItemFullPath"
910
- :work-item-id="workItem.id"
911
- :hide-subscribe="newTodoAndNotificationsEnabled"
912
- :subscribed-to-notifications="workItemNotificationsSubscribed"
913
- :work-item-type="workItemType"
914
- :work-item-iid="iid"
915
- :project-id="workItemProjectId"
916
- :can-delete="canDelete"
917
- :can-report-spam="canReportSpam"
918
- :can-update="canUpdate"
919
- :can-update-metadata="canUpdateMetadata"
920
- :can-move="canMove"
921
- :is-confidential="workItem.confidential"
922
- :is-discussion-locked="isDiscussionLocked"
923
- :is-parent-confidential="parentWorkItemConfidentiality"
924
- :work-item-reference="workItem.reference"
925
- :work-item-web-url="workItem.webUrl"
926
- :work-item-create-note-email="workItem.createNoteEmail"
927
- :is-modal="isModalOrDrawer"
928
- :work-item-state="workItem.state"
929
- :has-children="hasChildren"
930
- :has-parent="shouldShowAncestors"
931
- :parent-id="parentWorkItemId"
932
- :work-item-author-id="workItemAuthorId"
933
- :can-create-related-item="workItemLinkedItems !== undefined"
934
- :is-group="isGroupWorkItem"
935
- :widgets="widgets"
936
- :allowed-child-types="allowedChildTypes"
937
- :namespace-full-name="namespaceFullName"
957
+ v-bind="workItemActionProps"
938
958
@deleteWorkItem="$emit('deleteWorkItem', { workItemType, workItemId: workItem.id })"
939
959
@toggleWorkItemConfidentiality="toggleConfidentiality"
940
960
@error="updateError = $event"
0 commit comments