2019-03-26 17:55:40 +01:00
- has_delete_action = dossier.can_be_deleted_by_user?
2019-07-09 14:30:05 +02:00
- has_new_dossier_action = dossier.procedure.accepts_new_dossiers?
2019-03-27 11:43:04 +01:00
- has_actions = has_delete_action || has_new_dossier_action
2019-03-26 17:55:40 +01:00
- if has_actions
2019-11-19 14:22:53 +01:00
.dropdown.user-dossier-actions
2020-09-14 11:28:24 +02:00
%button.button.dropdown-button{ 'aria-expanded' => 'false', 'aria-controls' => 'actions-menu' }
2019-03-26 17:55:40 +01:00
Actions
2020-09-14 11:28:24 +02:00
#actions-menu.dropdown-content.fade-in-down
2019-03-26 17:55:40 +01:00
%ul.dropdown-items
2019-07-17 17:39:45 +02:00
- if !dossier.read_only?
- if dossier.brouillon?
%li
= link_to(url_for_dossier(dossier)) do
%span.icon.edit
.dropdown-description
Modifier le brouillon
- else
%li
= link_to modifier_dossier_path(dossier) do
%span.icon.edit
.dropdown-description
Modifier le dossier
2019-03-27 11:43:04 +01:00
- if has_new_dossier_action
%li
= link_to procedure_lien(dossier.procedure) do
%span.icon.new-folder
.dropdown-description
Commencer un autre dossier
2019-03-26 17:55:40 +01:00
- if has_delete_action
%li.danger
2020-12-16 10:27:46 +01:00
= 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 entraîne l’ annulation de la démarche en cours.\n\nConfirmer la suppression ?" } do
2019-03-26 17:55:40 +01:00
%span.icon.delete
.dropdown-description
Supprimer le dossier