demarches-normaliennes/app/views/instructeurs/procedures/_dossier_actions.html.haml

40 lines
2.1 KiB
Text
Raw Normal View History

- if hidden_by_administration
= link_to restore_instructeur_dossier_path(procedure_id, dossier_id), method: :patch, class: "fr-btn fr-btn--secondary" do
= t('views.instructeurs.dossiers.restore')
- elsif close_to_expiration || Dossier::TERMINE.include?(state)
2022-12-02 17:16:29 +01:00
%li.dropdown.user-dossier-actions{ data: { controller: 'menu-button' } }
%button.fr-btn.fr-mb-0.dropdown-button{ data: { menu_button_target: 'button' } }
Actions
.dropdown-content.fade-in-down{ data: { menu_button_target: 'menu' }, id: "dossier_#{dossier_id}_actions_menu" }
%ul.dropdown-items
- if close_to_expiration
%li
= link_to repousser_expiration_instructeur_dossier_path(procedure_id, dossier_id), method: :post do
%span.icon.standby
2022-12-02 17:16:29 +01:00
%span.dropdown-description= t('instructeurs.dossiers.header.banner.button_delay_expiration')
- if archived
%li
= link_to unarchive_instructeur_dossier_path(procedure_id, dossier_id), method: :patch do
%span.icon.unarchive
2022-12-02 17:16:29 +01:00
%span.dropdown-description
Désarchiver le dossier
- else
%li
= link_to archive_instructeur_dossier_path(procedure_id, dossier_id), method: :patch do
%span.icon.archive
2022-12-02 17:16:29 +01:00
%span.dropdown-description
Archiver le dossier
2022-01-27 17:02:02 +01:00
%li.danger
= link_to instructeur_dossier_path(procedure_id, dossier_id), method: :delete do
2022-01-27 17:02:02 +01:00
%span.icon.delete
2022-12-02 17:16:29 +01:00
%span.dropdown-description
2022-01-27 17:02:02 +01:00
= t('views.instructeurs.dossiers.delete_dossier')
- elsif Dossier::EN_CONSTRUCTION_OU_INSTRUCTION.include?(state)
- if dossier_is_followed
= link_to unfollow_instructeur_dossier_path(procedure_id, dossier_id), method: :patch, class: 'fr-btn fr-btn--secondary fr-icon-star-fill' do
2022-04-13 15:44:29 +02:00
= t('views.instructeurs.dossiers.stop_follow')
- else
= link_to follow_instructeur_dossier_path(procedure_id, dossier_id), method: :patch, class: 'fr-btn fr-btn--secondary fr-icon-star-line' do
2022-04-13 15:44:29 +02:00
= t('views.instructeurs.dossiers.follow_file')