2024-06-12 16:32:42 +02:00
|
|
|
- if hidden_by_administration && hidden_by_expired
|
2024-06-11 15:54:54 +02:00
|
|
|
%li
|
2024-08-12 17:11:03 +02:00
|
|
|
= button_to repousser_expiration_and_restore_instructeur_dossier_path(procedure_id, dossier_id), method: :post, class: "fr-btn fr-icon-refresh-line" do
|
2024-06-11 15:54:54 +02:00
|
|
|
= t('views.instructeurs.dossiers.restore_and_extend')
|
|
|
|
|
|
|
|
- elsif hidden_by_administration
|
2023-02-14 17:57:50 +01:00
|
|
|
%li
|
2023-04-07 10:43:21 +02:00
|
|
|
= button_to restore_instructeur_dossier_path(procedure_id, dossier_id), method: :patch, class: "fr-btn fr-icon-refresh-line" do
|
2023-02-14 17:57:50 +01:00
|
|
|
= t('views.instructeurs.dossiers.restore')
|
2024-06-11 15:54:54 +02:00
|
|
|
|
2022-03-11 13:57:53 +01:00
|
|
|
- elsif close_to_expiration || Dossier::TERMINE.include?(state)
|
2023-04-07 10:43:21 +02:00
|
|
|
%li
|
2023-01-06 14:26:59 +01:00
|
|
|
- if close_to_expiration
|
2023-04-07 10:43:21 +02:00
|
|
|
= button_to repasser_en_instruction_instructeur_dossier_path(procedure_id, dossier_id), method: :post, class: 'fr-btn fr-btn--secondary fr-icon-edit-line', form: { data: { turbo: turbo ? 'true' : 'false' } } do
|
2023-02-27 17:57:46 +01:00
|
|
|
Repasser en instruction
|
|
|
|
|
2023-04-07 10:43:21 +02:00
|
|
|
= button_to repousser_expiration_instructeur_dossier_path(procedure_id, dossier_id), method: :post, class: "fr-btn" do
|
2023-02-14 17:57:50 +01:00
|
|
|
= t('instructeurs.dossiers.header.banner.button_delay_expiration')
|
2023-01-06 14:26:59 +01:00
|
|
|
|
2023-02-23 16:55:46 +01:00
|
|
|
- elsif archived
|
2023-04-07 10:43:21 +02:00
|
|
|
= button_to unarchive_instructeur_dossier_path(procedure_id, dossier_id), method: :patch, class: "fr-btn fr-icon-upload-2-line" do
|
2023-02-14 17:57:50 +01:00
|
|
|
Désarchiver le dossier
|
2023-01-06 14:26:59 +01:00
|
|
|
|
2023-04-07 10:43:21 +02:00
|
|
|
= button_to instructeur_dossier_path(procedure_id, dossier_id), method: :delete, class: 'fr-btn fr-btn--secondary fr-icon-delete-line icon-only danger', title: t('views.instructeurs.dossiers.delete_dossier') do
|
|
|
|
= ""
|
2023-02-23 16:55:46 +01:00
|
|
|
|
2023-01-06 14:26:59 +01:00
|
|
|
- else
|
2024-11-20 11:34:40 +01:00
|
|
|
= button_to repasser_en_instruction_instructeur_dossier_path(procedure_id, dossier_id, statut: params[:statut]), method: :post, class: 'fr-btn fr-btn--secondary fr-icon-edit-line', form: { data: { turbo: turbo ? 'true' : 'false' } } do
|
2023-02-14 17:57:50 +01:00
|
|
|
Repasser en instruction
|
|
|
|
|
2024-11-20 11:34:40 +01:00
|
|
|
= button_to archive_instructeur_dossier_path(procedure_id, dossier_id, statut: params[:statut]), method: :patch, class: 'fr-btn fr-icon-folder-2-line' do
|
2023-02-14 17:57:50 +01:00
|
|
|
Archiver le dossier
|
2023-01-06 14:26:59 +01:00
|
|
|
|
2024-11-20 11:34:40 +01:00
|
|
|
= button_to instructeur_dossier_path(procedure_id, dossier_id, statut: params[:statut]), method: :delete, class: 'fr-btn fr-btn--secondary fr-icon-delete-line icon-only danger', title: t('views.instructeurs.dossiers.delete_dossier') do
|
2023-04-07 10:43:21 +02:00
|
|
|
= ""
|
2023-01-06 14:26:59 +01:00
|
|
|
|
2021-06-16 16:03:57 +02:00
|
|
|
- elsif Dossier::EN_CONSTRUCTION_OU_INSTRUCTION.include?(state)
|
2023-04-18 18:16:02 +02:00
|
|
|
- if dossier_is_followed
|
|
|
|
%li
|
2024-11-20 11:34:40 +01:00
|
|
|
= button_to unfollow_instructeur_dossier_path(procedure_id, statut: params[:statut], dossier_id:), method: :patch, class: 'fr-btn fr-btn--secondary fr-icon-star-fill' do
|
2023-04-18 18:16:02 +02:00
|
|
|
= t('views.instructeurs.dossiers.stop_follow')
|
|
|
|
- else
|
|
|
|
%li
|
2024-11-20 11:34:40 +01:00
|
|
|
= button_to follow_instructeur_dossier_path(procedure_id, statut: params[:statut], dossier_id:), method: :patch, class: 'fr-btn fr-btn--secondary fr-icon-star-line' do
|
2023-04-18 18:16:02 +02:00
|
|
|
= t('views.instructeurs.dossiers.follow_file')
|
|
|
|
|
2023-04-18 18:06:24 +02:00
|
|
|
- if with_menu
|
|
|
|
%li.en-construction-menu{ 'data-turbo': turbo ? 'true' : 'false' }
|
|
|
|
= render Instructeurs::EnConstructionMenuComponent.new(dossier:)
|
|
|
|
|
2023-02-14 17:57:50 +01:00
|
|
|
- if Dossier.states[:en_construction] == state
|
2023-04-07 10:43:21 +02:00
|
|
|
%li{ 'data-turbo': turbo ? 'true' : 'false' }
|
2024-11-20 11:34:40 +01:00
|
|
|
= button_to passer_en_instruction_instructeur_dossier_path(procedure_id, statut: params[:statut], dossier_id:), method: :post, class: 'fr-btn fr-icon-edit-line',
|
2023-12-18 12:32:27 +01:00
|
|
|
disabled: has_blocking_pending_correction, "aria-describedby" => has_blocking_pending_correction ? "tooltip-passer-en-instruction" : nil do
|
2023-12-07 17:32:39 +01:00
|
|
|
= t('views.instructeurs.dossiers.passer_en_instruction')
|
|
|
|
|
2023-12-18 12:32:27 +01:00
|
|
|
- if has_blocking_pending_correction
|
2023-12-07 17:32:39 +01:00
|
|
|
%span#tooltip-passer-en-instruction.fr-tooltip.fr-placement{ role: :tooltip, "aria-hidden" => "true" }
|
|
|
|
= t('views.instructeurs.dossiers.passer_en_instruction_blocked_by_pending_correction')
|
|
|
|
|
2023-06-06 14:41:47 +02:00
|
|
|
- elsif Dossier.states[:en_instruction] == state && !with_menu && !sva_svr
|
2023-04-07 10:43:21 +02:00
|
|
|
%li{ 'data-turbo': turbo ? 'true' : 'false' }
|
2024-11-20 11:34:40 +01:00
|
|
|
= button_to repasser_en_construction_instructeur_dossier_path(procedure_id, statut: params[:statut], dossier_id:), method: :post, class: 'fr-btn fr-btn--secondary fr-icon-draft-line' do
|
2023-12-07 17:32:39 +01:00
|
|
|
= t('views.instructeurs.dossiers.repasser_en_construction')
|