Skip to content

Commit

Permalink
Merge pull request #3415 from nextcloud/fix/poll-item-actions
Browse files Browse the repository at this point in the history
bring back archive, restore and delete actions
  • Loading branch information
dartcafe authored Apr 4, 2024
2 parents a135987 + 9a0ddc5 commit 33ad558
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Changelog
All notable changes to this project will be documented in this file.
##
## [7.0.3] - tbd
### Fix
- Archive, restore and delete polls in poll list was missing, braught the options back to the action menu
## [7.0.2] - 2024-03-29
### Fix
- Combo view was not usable
Expand Down
14 changes: 5 additions & 9 deletions src/js/components/Navigation/PollNavigationItems.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,39 +21,35 @@
-->

<template>
<NcAppNavigationItem :name="poll.title"
:to="{name: 'vote', params: {id: poll.id}}"
:class="{ closed: closed }">
<NcAppNavigationItem :name="poll.title" :to="{name: 'vote', params: {id: poll.id}}" :class="{ closed: closed }">
<template #icon>
<TextPollIcon v-if="poll.type === 'textPoll'" />
<DatePollIcon v-else />
</template>
<template #actions>
<NcActionButton v-if="isPollCreationAllowed"
:name="t('polls', 'Clone poll')"
@click="$emit('clone-poll')">
<NcActionButton v-if="isPollCreationAllowed" :name="t('polls', 'Clone poll')" @click="$emit('clone-poll')">
<template #icon>
<ClonePollIcon />
</template>
</NcActionButton>

<NcActionButton v-if="poll.allowEdit && !poll.deleted"
<NcActionButton v-if="poll.permissions.edit && !poll.deleted"
:name="t('polls', 'Archive poll')"
@click="$emit('toggle-archive')">
<template #icon>
<ArchivePollIcon />
</template>
</NcActionButton>

<NcActionButton v-if="poll.allowEdit && poll.deleted"
<NcActionButton v-if="poll.permissions.edit && poll.deleted"
:name="t('polls', 'Restore poll')"
@click="$emit('toggle-archive')">
<template #icon>
<RestorePollIcon />
</template>
</NcActionButton>

<NcActionButton v-if="poll.allowEdit && poll.deleted"
<NcActionButton v-if="poll.permissions.edit && poll.deleted"
class="danger"
:name="t('polls', 'Delete poll')"
@click="$emit('delete-poll')">
Expand Down
6 changes: 3 additions & 3 deletions src/js/views/PollList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
</template>
</NcActionButton>

<NcActionButton v-if="poll.allowEdit && !poll.deleted"
<NcActionButton v-if="poll.permissions.edit && !poll.deleted"
:name="t('polls', 'Archive poll')"
close-after-click
@click="toggleArchive(poll.id)">
Expand All @@ -72,7 +72,7 @@
{{ t('polls', 'Archive poll') }}
</NcActionButton>

<NcActionButton v-if="poll.allowEdit && poll.deleted"
<NcActionButton v-if="poll.permissions.edit && poll.deleted"
:name="t('polls', 'Restore poll')"
close-after-click
@click="toggleArchive(poll.id)">
Expand All @@ -82,7 +82,7 @@
{{ t('polls', 'Restore poll') }}
</NcActionButton>

<NcActionButton v-if="poll.allowEdit && poll.deleted"
<NcActionButton v-if="poll.permissions.edit && poll.deleted"
class="danger"
:name="t('polls', 'Delete poll')"
close-after-click
Expand Down

0 comments on commit 33ad558

Please sign in to comment.