Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bring back archive, restore and delete actions #3415

Merged
merged 2 commits into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading