refactor(instruction): re-organize actions order & primary action
This commit is contained in:
parent
fd4a9a6a2f
commit
0fc09bb42c
1 changed files with 14 additions and 15 deletions
|
@ -29,25 +29,24 @@
|
|||
= ""
|
||||
|
||||
- elsif Dossier::EN_CONSTRUCTION_OU_INSTRUCTION.include?(state)
|
||||
- if with_menu
|
||||
%li.en-construction-menu{ 'data-turbo': turbo ? 'true' : 'false' }
|
||||
= render Instructeurs::EnConstructionMenuComponent.new(dossier:)
|
||||
|
||||
- if Dossier.states[:en_construction] == state
|
||||
%li{ 'data-turbo': turbo ? 'true' : 'false' }
|
||||
= button_to passer_en_instruction_instructeur_dossier_path(procedure_id, dossier_id), method: :post, class: 'fr-btn fr-btn--secondary fr-icon-edit-line' do
|
||||
Passer en instruction
|
||||
- elsif Dossier.states[:en_instruction] == state && !with_menu
|
||||
%li{ 'data-turbo': turbo ? 'true' : 'false' }
|
||||
= button_to repasser_en_construction_instructeur_dossier_path(procedure_id, dossier_id), method: :post, class: 'fr-btn fr-btn--secondary fr-icon-draft-line' do
|
||||
Repasser en construction
|
||||
|
||||
|
||||
- if dossier_is_followed
|
||||
%li
|
||||
= button_to unfollow_instructeur_dossier_path(procedure_id, dossier_id), method: :patch, class: 'fr-btn fr-btn--secondary fr-icon-star-fill' do
|
||||
= t('views.instructeurs.dossiers.stop_follow')
|
||||
- else
|
||||
%li
|
||||
= button_to follow_instructeur_dossier_path(procedure_id, dossier_id), method: :patch, class: 'fr-btn fr-icon-star-line' do
|
||||
= button_to follow_instructeur_dossier_path(procedure_id, dossier_id), method: :patch, class: 'fr-btn fr-btn--secondary fr-icon-star-line' do
|
||||
= t('views.instructeurs.dossiers.follow_file')
|
||||
|
||||
- if with_menu
|
||||
%li.en-construction-menu{ 'data-turbo': turbo ? 'true' : 'false' }
|
||||
= render Instructeurs::EnConstructionMenuComponent.new(dossier:)
|
||||
|
||||
- if Dossier.states[:en_construction] == state
|
||||
%li{ 'data-turbo': turbo ? 'true' : 'false' }
|
||||
= button_to passer_en_instruction_instructeur_dossier_path(procedure_id, dossier_id), method: :post, class: 'fr-btn fr-icon-edit-line' do
|
||||
Passer en instruction
|
||||
- elsif Dossier.states[:en_instruction] == state && !with_menu
|
||||
%li{ 'data-turbo': turbo ? 'true' : 'false' }
|
||||
= button_to repasser_en_construction_instructeur_dossier_path(procedure_id, dossier_id), method: :post, class: 'fr-btn fr-btn--secondary fr-icon-draft-line' do
|
||||
Repasser en construction
|
||||
|
|
Loading…
Add table
Reference in a new issue