b5ed74c09d
Turns out this is confusing for users (some UI elements are present for some procedures, but not for others). Better enable it for everyone.
24 lines
1 KiB
Text
24 lines
1 KiB
Text
- has_delete_action = dossier.can_be_deleted_by_user?
|
||
- has_new_dossier_action = dossier.procedure.accepts_new_dossiers?
|
||
|
||
- has_actions = has_delete_action || has_new_dossier_action
|
||
|
||
- if has_actions
|
||
%span.dropdown.user-dossier-actions
|
||
%button.button.dropdown-button
|
||
Actions
|
||
.dropdown-content.fade-in-down
|
||
%ul.dropdown-items
|
||
- if has_new_dossier_action
|
||
%li
|
||
= link_to procedure_lien(dossier.procedure) do
|
||
%span.icon.new-folder
|
||
.dropdown-description
|
||
Commencer un autre dossier
|
||
|
||
- if has_delete_action
|
||
%li.danger
|
||
= link_to ask_deletion_dossier_path(dossier), method: :post, data: { disable: true, confirm: "En continuant, vous allez supprimer ce dossier ainsi que les informations qu’il contient. Toute suppression entraine l’annulation de la démarche en cours.\n\nConfirmer la suppression ?" } do
|
||
%span.icon.delete
|
||
.dropdown-description
|
||
Supprimer le dossier
|