From 5434e0a4d688ba91646a9675f2782bb4eb7992a6 Mon Sep 17 00:00:00 2001 From: Benoit Queyron <72251526+Benoit-MINT@users.noreply.github.com> Date: Fri, 19 Jul 2024 10:02:02 +0200 Subject: [PATCH] remonter bouton nouveau dossier --- .../users/dossiers/_dossier_actions.html.haml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/app/views/users/dossiers/_dossier_actions.html.haml b/app/views/users/dossiers/_dossier_actions.html.haml index 336a5746a..84f965e8d 100644 --- a/app/views/users/dossiers/_dossier_actions.html.haml +++ b/app/views/users/dossiers/_dossier_actions.html.haml @@ -14,6 +14,9 @@ - else = link_to t('views.users.dossiers.dossier_action.edit_dossier'), modifier_dossier_path(dossier), class: 'fr-btn fr-btn--sm fr-btn--tertiary fr-mr-1w' + - if has_new_dossier_action && dossier.termine? + = link_to t('views.users.dossiers.dossier_action.start_other_dossier'), (commencer_url(dossier.procedure.path)), class: 'fr-btn fr-btn--sm fr-btn--tertiary fr-mr-1w' + = render Dropdown::MenuComponent.new(wrapper: :div, wrapper_options: {class: 'invite-user-actions'}, menu_options: {id: dom_id(dossier, :actions_menu)}, button_options: {class: 'fr-btn--sm fr-btn--tertiary'}) do |menu| - menu.with_button_inner_html do - if has_edit_action @@ -29,11 +32,12 @@ = t('views.users.dossiers.dossier_action.transfer_dossier') - if has_new_dossier_action - - menu.with_item do - = link_to(commencer_url(dossier.procedure.path), role: 'menuitem') do - = dsfr_icon('fr-icon-file-fill', :sm) - .dropdown-description - = t('views.users.dossiers.dossier_action.start_other_dossier') + - if !dossier.termine? + - menu.with_item do + = link_to(commencer_url(dossier.procedure.path), role: 'menuitem') do + = dsfr_icon('fr-icon-file-fill', :sm) + .dropdown-description + = t('views.users.dossiers.dossier_action.start_other_dossier') - menu.with_item do = link_to(clone_dossier_path(dossier), method: :post, role: 'menuitem') do