From 77c49e079f963c84851ced28eca69c1d3a8a95e6 Mon Sep 17 00:00:00 2001 From: simon lehericey Date: Wed, 7 Jun 2023 10:52:24 +0200 Subject: [PATCH] use attached --- app/views/shared/_procedure_description.html.haml | 2 +- app/views/shared/dossiers/_edit.html.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/shared/_procedure_description.html.haml b/app/views/shared/_procedure_description.html.haml index f6845f28b..f68815546 100644 --- a/app/views/shared/_procedure_description.html.haml +++ b/app/views/shared/_procedure_description.html.haml @@ -47,6 +47,6 @@ #accordion-116.fr-collapse.js_description_target_audience = t('shared.procedure_description.estimated_fill_duration_detail', estimated_minutes: estimated_fill_duration_minutes(procedure)) -- if notice_url(procedure).present? +- if procedure.notice.attached? .fr-my-3w = render Dsfr::DownloadComponent.new(attachment: procedure.notice , url: notice_url(procedure), name: t("views.shared.dossiers.edit.notice"), ephemeral_link: administrateur_signed_in?) diff --git a/app/views/shared/dossiers/_edit.html.haml b/app/views/shared/dossiers/_edit.html.haml index f1c585394..682a79d3a 100644 --- a/app/views/shared/dossiers/_edit.html.haml +++ b/app/views/shared/dossiers/_edit.html.haml @@ -16,7 +16,7 @@ - if dossier.brouillon? = t('views.shared.dossiers.edit.autosave') - - if notice_url(dossier.procedure).present? + - if dossier.procedure.notice.attached? = render Dsfr::DownloadComponent.new(attachment: dossier.procedure.notice , url: notice_url(dossier.procedure), name: t("views.shared.dossiers.edit.notice"), ephemeral_link: administrateur_signed_in?) - if dossier.show_groupe_instructeur_selector?