2022-03-11 13:57:53 +01:00
|
|
|
- if hidden_by_administration
|
2022-10-06 14:03:02 +02:00
|
|
|
= link_to restore_instructeur_dossier_path(procedure_id, dossier_id), method: :patch, class: "fr-btn fr-btn--secondary" do
|
2022-03-11 13:57:53 +01:00
|
|
|
= t('views.instructeurs.dossiers.restore')
|
|
|
|
- elsif close_to_expiration || Dossier::TERMINE.include?(state)
|
2023-01-06 14:26:59 +01:00
|
|
|
= render Dropdown::MenuComponent.new(wrapper: :li, button_options: { class: ['fr-mb-0']}, menu_options: { id: "dossier_#{dossier_id}_actions_menu", class: 'user-dossier-actions' }) do |menu|
|
|
|
|
- menu.with_button_inner_html do
|
2021-06-16 16:03:57 +02:00
|
|
|
Actions
|
2023-01-06 14:26:59 +01:00
|
|
|
|
|
|
|
- if close_to_expiration
|
|
|
|
- menu.with_item do
|
|
|
|
= link_to(repousser_expiration_instructeur_dossier_path(procedure_id, dossier_id), method: :post, role: 'menuitem') do
|
|
|
|
%span.icon.standby
|
|
|
|
%span.dropdown-description= t('instructeurs.dossiers.header.banner.button_delay_expiration')
|
|
|
|
|
|
|
|
- if archived
|
|
|
|
- menu.with_item do
|
|
|
|
= link_to( unarchive_instructeur_dossier_path(procedure_id, dossier_id), role: 'menuitem', method: :patch) do
|
|
|
|
%span.icon.unarchive
|
|
|
|
%span.dropdown-description
|
|
|
|
Désarchiver le dossier
|
|
|
|
|
|
|
|
- else
|
|
|
|
- menu.with_item do
|
|
|
|
= link_to( archive_instructeur_dossier_path(procedure_id, dossier_id), method: :patch, role: 'menuitem') do
|
|
|
|
%span.icon.archive
|
|
|
|
%span.dropdown-description
|
|
|
|
Archiver le dossier
|
|
|
|
|
|
|
|
- menu.with_item(class: 'danger') do
|
|
|
|
= link_to(instructeur_dossier_path(procedure_id, dossier_id), method: :delete, role: 'menuitem') do
|
|
|
|
%span.icon.delete
|
|
|
|
%span.dropdown-description
|
|
|
|
= t('views.instructeurs.dossiers.delete_dossier')
|
|
|
|
|
2021-06-16 16:03:57 +02:00
|
|
|
|
|
|
|
- elsif Dossier::EN_CONSTRUCTION_OU_INSTRUCTION.include?(state)
|
2017-07-31 18:35:34 +02:00
|
|
|
- if dossier_is_followed
|
2022-10-06 14:03:02 +02:00
|
|
|
= 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')
|
2017-07-11 15:58:31 +02:00
|
|
|
- else
|
2022-10-06 14:03:02 +02:00
|
|
|
= 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')
|