Merge pull request #10624 from demarches-simplifiees/usager-remonter-bouton-nouveau-dossier
ETQ usager - je veux pouvoir accéder plus facilement au bouton "nouveau dossier"
This commit is contained in:
commit
3493736133
3 changed files with 11 additions and 13 deletions
|
@ -9,10 +9,14 @@
|
||||||
- if has_actions
|
- if has_actions
|
||||||
- if has_edit_action
|
- if has_edit_action
|
||||||
- if dossier.brouillon?
|
- if dossier.brouillon?
|
||||||
= link_to t('views.users.dossiers.dossier_action.edit_draft'), (url_for_dossier(dossier)), class: 'fr-btn fr-btn--sm fr-mr-1w'
|
= link_to t('views.users.dossiers.dossier_action.edit_draft'), (url_for_dossier(dossier)), class: 'fr-btn fr-btn--sm fr-mr-1w fr-icon-draft-line fr-btn--icon-left'
|
||||||
|
|
||||||
- else
|
- 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'
|
= link_to t('views.users.dossiers.dossier_action.edit_dossier'), modifier_dossier_path(dossier), class: 'fr-btn fr-btn--sm fr-mr-1w fr-icon-draft-line fr-btn--icon-left'
|
||||||
|
|
||||||
|
- if has_new_dossier_action
|
||||||
|
= link_to (commencer_url(dossier.procedure.path)), class: 'fr-btn fr-btn--sm fr-btn--tertiary fr-mr-1w fr-icon-file-fill fr-btn--icon-left' do
|
||||||
|
= t('views.users.dossiers.dossier_action.start_other_dossier')
|
||||||
|
|
||||||
= 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|
|
= 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
|
- menu.with_button_inner_html do
|
||||||
|
@ -29,12 +33,6 @@
|
||||||
= t('views.users.dossiers.dossier_action.transfer_dossier')
|
= t('views.users.dossiers.dossier_action.transfer_dossier')
|
||||||
|
|
||||||
- if has_new_dossier_action
|
- 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')
|
|
||||||
|
|
||||||
- menu.with_item do
|
- menu.with_item do
|
||||||
= link_to(clone_dossier_path(dossier), method: :post, role: 'menuitem') do
|
= link_to(clone_dossier_path(dossier), method: :post, role: 'menuitem') do
|
||||||
= dsfr_icon('fr-icon-file-copy-line', :sm)
|
= dsfr_icon('fr-icon-file-copy-line', :sm)
|
||||||
|
|
|
@ -539,7 +539,7 @@ fr:
|
||||||
deleted_badge: Supprimé
|
deleted_badge: Supprimé
|
||||||
dossier_action:
|
dossier_action:
|
||||||
edit_dossier: "Modifier le dossier"
|
edit_dossier: "Modifier le dossier"
|
||||||
start_other_dossier: "Commencer un autre dossier vide"
|
start_other_dossier: "Commencer un nouveau dossier"
|
||||||
clone: "Dupliquer ce dossier"
|
clone: "Dupliquer ce dossier"
|
||||||
delete_dossier: "Supprimer le dossier"
|
delete_dossier: "Supprimer le dossier"
|
||||||
delete_dossier_confirm: "En continuant, vous allez supprimer ce dossier ainsi que les informations qu’il contient. Toute suppression entraîne l’annulation de la démarche en cours.\n\nConfirmer la suppression ?"
|
delete_dossier_confirm: "En continuant, vous allez supprimer ce dossier ainsi que les informations qu’il contient. Toute suppression entraîne l’annulation de la démarche en cours.\n\nConfirmer la suppression ?"
|
||||||
|
|
|
@ -5,7 +5,7 @@ describe 'users/dossiers/dossier_actions', type: :view do
|
||||||
|
|
||||||
subject { render 'users/dossiers/dossier_actions', dossier: dossier, current_user: user }
|
subject { render 'users/dossiers/dossier_actions', dossier: dossier, current_user: user }
|
||||||
|
|
||||||
it { is_expected.to have_link('Commencer un autre dossier', href: commencer_url(path: procedure.path)) }
|
it { is_expected.to have_link('Commencer un nouveau dossier', href: commencer_url(path: procedure.path)) }
|
||||||
it { is_expected.to have_link('Supprimer le dossier', href: dossier_path(dossier)) }
|
it { is_expected.to have_link('Supprimer le dossier', href: dossier_path(dossier)) }
|
||||||
it { is_expected.to have_link('Transférer le dossier', href: transferer_dossier_path(dossier)) }
|
it { is_expected.to have_link('Transférer le dossier', href: transferer_dossier_path(dossier)) }
|
||||||
|
|
||||||
|
@ -16,11 +16,11 @@ describe 'users/dossiers/dossier_actions', type: :view do
|
||||||
|
|
||||||
context 'when the procedure is closed' do
|
context 'when the procedure is closed' do
|
||||||
let(:procedure) { create(:procedure, :closed) }
|
let(:procedure) { create(:procedure, :closed) }
|
||||||
it { is_expected.not_to have_link('Commencer un autre dossier') }
|
it { is_expected.not_to have_link('Commencer un nouveau dossier') }
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'when the procedure is closed and replaced' do
|
context 'when the procedure is closed and replaced' do
|
||||||
let(:procedure) { create(:procedure, :closed, replaced_by_procedure: create(:procedure)) }
|
let(:procedure) { create(:procedure, :closed, replaced_by_procedure: create(:procedure)) }
|
||||||
it { is_expected.to have_link('Commencer un autre dossier') }
|
it { is_expected.to have_link('Commencer un nouveau dossier') }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue