forked from pkp/ui-library
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pkp/pkp-lib#6528 Bulk delete - Adjust permissions and the UI for impr…
…oved accessibility
- Loading branch information
1 parent
b182fad
commit 33a2903
Showing
8 changed files
with
111 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<template> | ||
<DropdownActions | ||
v-if="actions.length" | ||
:label="t('common.moreActions')" | ||
:display-as-ellipsis="true" | ||
:actions="actions" | ||
direction="right" | ||
@action="handleAction" | ||
/> | ||
</template> | ||
<script setup> | ||
import {computed} from 'vue'; | ||
import DropdownActions from '@/components/DropdownActions/DropdownActions.vue'; | ||
import {useLocalize} from '@/composables/useLocalize'; | ||
const {t} = useLocalize(); | ||
const actions = computed(() => { | ||
const _actions = []; | ||
if (dashboardStore.bulkDeleteDisplayDeleteButton) { | ||
_actions.push({ | ||
label: t('admin.submissions.incomplete.bulkDelete.button'), | ||
name: 'bulkDeleteSelectionEnable', | ||
isWarnable: true, | ||
icon: 'Cancel', | ||
}); | ||
} | ||
return _actions; | ||
}); | ||
import {useDashboardPageStore} from '../dashboardPageStore'; | ||
const dashboardStore = useDashboardPageStore(); | ||
function handleAction(actionName, actionArgs = {}) { | ||
dashboardStore[actionName](actionArgs); | ||
} | ||
</script> |
16 changes: 4 additions & 12 deletions
16
src/pages/dashboard/components/DashboardBulkDeleteButton.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters