Feat: Add document delete functionality for admins

This commit is contained in:
Björn Fromme
2023-10-25 16:04:44 +02:00
parent 4e8c8c2c74
commit 2689f93683
2 changed files with 49 additions and 0 deletions
+12
View File
@@ -66,6 +66,18 @@
</td>
<td>
<div class="flex items-center space-x-2 justify-end">
{% if is_granted('DELETE', upload) %}
<button type="button"
class="text-red-500"
{{ stimulus_controller('modal-button', [], [], {'confirmation-modal': '#confirmation-modal'}) }}
{{ stimulus_action('modal-button', 'confirmation', null, {
'title': 'Bist du sicher?',
'content': 'Möchtest du das Dokument wirklich löschen?',
'target-url': path('app_admin_document_delete', { 'uuid': upload.uuid })
}) }}>
{{ icon('delete') }}
</button>
{% endif %}
{% if is_granted('CHECK', upload) %}
<button type="button"
{{ stimulus_controller('modal-button', [], [], {'ajax-modal': '#ajax-modal'}) }}