Merge pull request #10559 from demarches-simplifiees/change-button-print-to-download-for-user-ldu
ETQ usager, je veux pouvoir télécharger mon dossier sans avoir à passer par le bouton "imprimer"
This commit is contained in:
commit
337689333e
8 changed files with 15 additions and 18 deletions
|
@ -20,7 +20,7 @@
|
||||||
- if procedure.active_dossier_submitted_message
|
- if procedure.active_dossier_submitted_message
|
||||||
%p.fr-m-2= procedure.active_dossier_submitted_message.message_on_submit_by_usager
|
%p.fr-m-2= procedure.active_dossier_submitted_message.message_on_submit_by_usager
|
||||||
%p.justify-center.flex.fr-mb-5w.fr-mt-2w
|
%p.justify-center.flex.fr-mb-5w.fr-mt-2w
|
||||||
= link_to "#{t('views.users.dossiers.merci.download_dossier')} (PDF)", dossier ? dossier_path(dossier, format: :pdf) : "#", download: "Mon dossier", target: "_blank", rel: "noopener", title: t('views.users.dossiers.show.header.print_dossier'), class: 'fr-btn fr-btn--secondary fr-mx-2w fr-btn--icon-left fr-icon-download-line'
|
= render(partial: 'users/dossiers/show/download_dossier', locals: { dossier: dossier })
|
||||||
= link_to t('views.users.dossiers.merci.acces_dossier'), dossier ? dossier_path(dossier) : "#dossier" , class: 'fr-btn fr-mx-2w'
|
= link_to t('views.users.dossiers.merci.acces_dossier'), dossier ? dossier_path(dossier) : "#dossier" , class: 'fr-btn fr-mx-2w'
|
||||||
|
|
||||||
%hr.fr-hr
|
%hr.fr-hr
|
||||||
|
|
|
@ -17,4 +17,4 @@
|
||||||
= t('users.dossiers.header.banner.contact_service_html', service_name: dossier.procedure.service.nom, service_phone_number: Phonelib.parse(dossier.procedure.service.telephone_url).full_national, service_email: dossier.procedure.service.email)
|
= t('users.dossiers.header.banner.contact_service_html', service_name: dossier.procedure.service.nom, service_phone_number: Phonelib.parse(dossier.procedure.service.telephone_url).full_national, service_email: dossier.procedure.service.email)
|
||||||
|
|
||||||
- if !dossier.brouillon?
|
- if !dossier.brouillon?
|
||||||
= render(partial: 'users/dossiers/show/print_dossier', locals: { dossier: dossier })
|
= render(partial: 'users/dossiers/show/download_dossier', locals: { dossier: dossier })
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
= link_to "#{t('views.users.dossiers.merci.download_dossier')} (PDF)", dossier ? dossier_path(dossier, format: :pdf) : "#", download: "Mon dossier", target: "_blank", rel: "noopener", class: 'fr-btn fr-btn--secondary fr-btn--icon-left fr-icon-download-line'
|
|
@ -14,12 +14,13 @@
|
||||||
- if dossier.show_procedure_state_warning?
|
- if dossier.show_procedure_state_warning?
|
||||||
= render(partial: 'users/dossiers/procedure_removed_banner', locals: { dossier: dossier })
|
= render(partial: 'users/dossiers/procedure_removed_banner', locals: { dossier: dossier })
|
||||||
- elsif current_user.owns?(dossier)
|
- elsif current_user.owns?(dossier)
|
||||||
.header-actions
|
.header-actions.fr-mb-3w
|
||||||
|
= render(partial: 'users/dossiers/show/download_dossier', locals: { dossier: dossier })
|
||||||
|
.ml-auto
|
||||||
= render partial: 'invites/dropdown', locals: { dossier: dossier, morphing: false }
|
= render partial: 'invites/dropdown', locals: { dossier: dossier, morphing: false }
|
||||||
- if dossier.can_be_updated_by_user? && !current_page?(modifier_dossier_path(dossier))
|
- if dossier.can_be_updated_by_user? && !current_page?(modifier_dossier_path(dossier))
|
||||||
= link_to t('views.users.dossiers.demande.edit_dossier'), modifier_dossier_path(dossier), class: 'fr-btn fr-btn-sm',
|
= link_to t('views.users.dossiers.demande.edit_dossier'), modifier_dossier_path(dossier), class: 'fr-btn fr-btn-sm fr-ml-1w',
|
||||||
title: t('views.users.dossiers.demande.edit_dossier_title')
|
title: t('views.users.dossiers.demande.edit_dossier_title')
|
||||||
= render(partial: 'users/dossiers/show/print_dossier', locals: { dossier: dossier })
|
|
||||||
|
|
||||||
%nav.fr-tabs
|
%nav.fr-tabs
|
||||||
%ul.fr-tabs__list{ role: 'tablist' }
|
%ul.fr-tabs__list{ role: 'tablist' }
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
= link_to t('views.users.dossiers.show.header.print'), dossier_path(dossier, format: :pdf), target: "_blank", rel: "noopener", title: t('views.users.dossiers.show.header.print_dossier'), class: 'fr-btn fr-icon-printer-line fr-btn--tertiary'
|
|
|
@ -472,8 +472,6 @@ en:
|
||||||
dossier_number: "File n. %{dossier_id}"
|
dossier_number: "File n. %{dossier_id}"
|
||||||
created_date: "- Draft on %{date_du_dossier}"
|
created_date: "- Draft on %{date_du_dossier}"
|
||||||
submit_date: "- Submit on %{date_du_dossier}"
|
submit_date: "- Submit on %{date_du_dossier}"
|
||||||
print: "print"
|
|
||||||
print_dossier: "All the file"
|
|
||||||
status_overview:
|
status_overview:
|
||||||
status_draft: draft
|
status_draft: draft
|
||||||
status_in_progress: in progress
|
status_in_progress: in progress
|
||||||
|
|
|
@ -471,8 +471,6 @@ fr:
|
||||||
dossier_number: "Dossier nº %{dossier_id}"
|
dossier_number: "Dossier nº %{dossier_id}"
|
||||||
created_date: "- En brouillon depuis le %{date_du_dossier}"
|
created_date: "- En brouillon depuis le %{date_du_dossier}"
|
||||||
submit_date: "- Déposé le %{date_du_dossier}"
|
submit_date: "- Déposé le %{date_du_dossier}"
|
||||||
print: "imprimer"
|
|
||||||
print_dossier: "Tout le dossier"
|
|
||||||
status_overview:
|
status_overview:
|
||||||
status_draft: brouillon
|
status_draft: brouillon
|
||||||
status_in_progress: en construction
|
status_in_progress: en construction
|
||||||
|
|
|
@ -47,7 +47,7 @@ describe 'users/dossiers/show/header', type: :view do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'can download the dossier' do
|
it 'can download the dossier' do
|
||||||
expect(rendered).to have_selector('a[title="Tout le dossier"]')
|
expect(rendered).to have_text('Télécharger mon dossier')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@ describe 'users/dossiers/show/header', type: :view do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'can download the dossier' do
|
it 'can download the dossier' do
|
||||||
expect(rendered).to have_selector('a[title="Tout le dossier"]')
|
expect(rendered).to have_text('Télécharger mon dossier')
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'does not display a new procedure link' do
|
it 'does not display a new procedure link' do
|
||||||
|
@ -88,7 +88,7 @@ describe 'users/dossiers/show/header', type: :view do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'can download the dossier' do
|
it 'can download the dossier' do
|
||||||
expect(rendered).to have_selector('a[title="Tout le dossier"]')
|
expect(rendered).to have_text('Télécharger mon dossier')
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'displays a new procedure link' do
|
it 'displays a new procedure link' do
|
||||||
|
@ -125,7 +125,7 @@ describe 'users/dossiers/show/header', type: :view do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'can download the dossier' do
|
it 'can download the dossier' do
|
||||||
expect(rendered).to have_selector('a[title="Tout le dossier"]')
|
expect(rendered).to have_text('Télécharger mon dossier')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -144,7 +144,7 @@ describe 'users/dossiers/show/header', type: :view do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'can not download the dossier' do
|
it 'can not download the dossier' do
|
||||||
expect(rendered).not_to have_selector('a[title="Tout le dossier"]')
|
expect(rendered).not_to have_text('Télécharger mon dossier')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue