|
6 | 6 | <template> |
7 | 7 | <div> |
8 | 8 | <NcListItem |
9 | | - :active="isActive" |
10 | | - :actions-aria-label="t('forms', 'Form actions')" |
11 | | - :counter-number="form.submissionCount" |
12 | | - compact |
13 | | - :force-display-actions="forceDisplayActions" |
14 | | - :name="formTitle" |
15 | | - :to="{ |
16 | | - name: routerTarget, |
17 | | - params: { hash: form.hash }, |
18 | | - }" |
19 | | - @click="mobileCloseNavigation"> |
20 | | - <template #icon> |
21 | | - <NcLoadingIcon v-if="loading" :size="16" /> |
22 | | - <IconCheck v-else-if="isExpired" :size="16" /> |
23 | | - <FormsIcon v-else :size="16" /> |
24 | | - </template> |
25 | | - <template v-if="hasSubtitle" #subname> |
26 | | - {{ formSubtitle }} |
27 | | - </template> |
28 | | - <template |
29 | | - v-if="!loading && (!readOnly || canEdit || canSeeResults)" |
30 | | - #actions> |
31 | | - <NcActionRouter |
32 | | - v-if="!isArchived && canEdit" |
33 | | - close-after-click |
34 | | - :disabled="isFormLocked" |
35 | | - exact |
36 | | - :to="{ name: 'edit', params: { hash: form.hash } }" |
37 | | - @click="mobileCloseNavigation"> |
38 | | - <template #icon> |
39 | | - <IconPencil :size="20" /> |
40 | | - </template> |
41 | | - {{ t('forms', 'Edit form') }} |
42 | | - </NcActionRouter> |
43 | | - <NcActionButton |
44 | | - v-if="!isArchived && !readOnly" |
45 | | - close-after-click |
46 | | - @click="onShareForm"> |
47 | | - <template #icon> |
48 | | - <IconShareVariant :size="20" /> |
49 | | - </template> |
50 | | - {{ t('forms', 'Share form') }} |
51 | | - </NcActionButton> |
52 | | - <NcActionRouter |
53 | | - v-if="canSeeResults" |
54 | | - close-after-click |
55 | | - exact |
56 | | - :to="{ name: 'results', params: { hash: form.hash } }" |
57 | | - @click="mobileCloseNavigation"> |
58 | | - <template #icon> |
59 | | - <IconPoll :size="20" /> |
60 | | - </template> |
61 | | - {{ t('forms', 'Results') }} |
62 | | - </NcActionRouter> |
63 | | - <NcActionButton v-if="canEdit" close-after-click @click="onCloneForm"> |
64 | | - <template #icon> |
65 | | - <IconContentCopy :size="20" /> |
66 | | - </template> |
67 | | - {{ t('forms', 'Copy form') }} |
68 | | - </NcActionButton> |
69 | | - <NcActionSeparator v-if="canEdit && !readOnly" /> |
70 | | - <NcActionButton |
71 | | - v-if="canEdit && !readOnly" |
72 | | - close-after-click |
73 | | - :disabled="isFormLocked" |
74 | | - @click="onToggleArchive"> |
75 | | - <template #icon> |
76 | | - <IconArchiveOff v-if="isArchived" :size="20" /> |
77 | | - <IconArchive v-else :size="20" /> |
78 | | - </template> |
79 | | - {{ |
80 | | - isArchived |
81 | | - ? t('forms', 'Unarchive form') |
82 | | - : t('forms', 'Archive form') |
83 | | - }} |
84 | | - </NcActionButton> |
85 | | - <NcActionButton |
86 | | - v-if="canEdit && !readOnly" |
87 | | - close-after-click |
88 | | - :disabled="isFormLocked" |
89 | | - @click="showDeleteDialog = true"> |
90 | | - <template #icon> |
91 | | - <IconDelete :size="20" /> |
92 | | - </template> |
93 | | - {{ t('forms', 'Delete form') }} |
94 | | - </NcActionButton> |
95 | | - </template> |
| 9 | + :active="isActive" |
| 10 | + :actions-aria-label="t('forms', 'Form actions')" |
| 11 | + :counter-number="form.submissionCount" |
| 12 | + compact |
| 13 | + :force-display-actions="forceDisplayActions" |
| 14 | + :name="formTitle" |
| 15 | + :to="{ |
| 16 | + name: routerTarget, |
| 17 | + params: { hash: form.hash }, |
| 18 | + }" |
| 19 | + @click="mobileCloseNavigation"> |
| 20 | + <template #icon> |
| 21 | + <NcLoadingIcon v-if="loading" :size="16" /> |
| 22 | + <IconCheck v-else-if="isExpired" :size="16" /> |
| 23 | + <FormsIcon v-else :size="16" /> |
| 24 | + </template> |
| 25 | + <template v-if="hasSubtitle" #subname> |
| 26 | + {{ formSubtitle }} |
| 27 | + </template> |
| 28 | + <template |
| 29 | + v-if="!loading && (!readOnly || canEdit || canSeeResults)" |
| 30 | + #actions> |
| 31 | + <NcActionRouter |
| 32 | + v-if="!isArchived && canEdit" |
| 33 | + close-after-click |
| 34 | + :disabled="isFormLocked" |
| 35 | + exact |
| 36 | + :to="{ name: 'edit', params: { hash: form.hash } }" |
| 37 | + @click="mobileCloseNavigation"> |
| 38 | + <template #icon> |
| 39 | + <IconPencil :size="20" /> |
| 40 | + </template> |
| 41 | + {{ t('forms', 'Edit form') }} |
| 42 | + </NcActionRouter> |
| 43 | + <NcActionButton |
| 44 | + v-if="!isArchived && !readOnly" |
| 45 | + close-after-click |
| 46 | + @click="onShareForm"> |
| 47 | + <template #icon> |
| 48 | + <IconShareVariant :size="20" /> |
| 49 | + </template> |
| 50 | + {{ t('forms', 'Share form') }} |
| 51 | + </NcActionButton> |
| 52 | + <NcActionRouter |
| 53 | + v-if="canSeeResults" |
| 54 | + close-after-click |
| 55 | + exact |
| 56 | + :to="{ name: 'results', params: { hash: form.hash } }" |
| 57 | + @click="mobileCloseNavigation"> |
| 58 | + <template #icon> |
| 59 | + <IconPoll :size="20" /> |
| 60 | + </template> |
| 61 | + {{ t('forms', 'Results') }} |
| 62 | + </NcActionRouter> |
| 63 | + <NcActionButton |
| 64 | + v-if="canEdit" |
| 65 | + close-after-click |
| 66 | + @click="onCloneForm"> |
| 67 | + <template #icon> |
| 68 | + <IconContentCopy :size="20" /> |
| 69 | + </template> |
| 70 | + {{ t('forms', 'Copy form') }} |
| 71 | + </NcActionButton> |
| 72 | + <NcActionSeparator v-if="canEdit && !readOnly" /> |
| 73 | + <NcActionButton |
| 74 | + v-if="canEdit && !readOnly" |
| 75 | + close-after-click |
| 76 | + :disabled="isFormLocked" |
| 77 | + @click="onToggleArchive"> |
| 78 | + <template #icon> |
| 79 | + <IconArchiveOff v-if="isArchived" :size="20" /> |
| 80 | + <IconArchive v-else :size="20" /> |
| 81 | + </template> |
| 82 | + {{ |
| 83 | + isArchived |
| 84 | + ? t('forms', 'Unarchive form') |
| 85 | + : t('forms', 'Archive form') |
| 86 | + }} |
| 87 | + </NcActionButton> |
| 88 | + <NcActionButton |
| 89 | + v-if="canEdit && !readOnly" |
| 90 | + close-after-click |
| 91 | + :disabled="isFormLocked" |
| 92 | + @click="showDeleteDialog = true"> |
| 93 | + <template #icon> |
| 94 | + <IconDelete :size="20" /> |
| 95 | + </template> |
| 96 | + {{ t('forms', 'Delete form') }} |
| 97 | + </NcActionButton> |
| 98 | + </template> |
96 | 99 | </NcListItem> |
97 | 100 | <NcDialog |
98 | 101 | :open.sync="showDeleteDialog" |
|
0 commit comments