chore(titre_identite): render template if exists

This commit is contained in:
Colin Darie 2022-11-23 13:25:41 +01:00
parent 3e617f34ec
commit 920f90d2e3
3 changed files with 11 additions and 7 deletions

View file

@ -4,10 +4,4 @@
= render Attachment::MultipleComponent.new(champ: @champ, attached_file: @champ.piece_justificative_file, user_can_destroy:, user_can_download:, max:) do |c|
- if @champ.type_de_champ.piece_justificative_template&.attached?
- c.with_template do
= render Dsfr::DownloadComponent.new(attachment: @champ.type_de_champ.piece_justificative_template, name: "Modèle à télécharger") do |c|
- if helpers.administrateur_signed_in?
- c.with_right do
%span.fr-ml-2w.fr-text--xs.fr-text-mention--grey.visible-on-previous-hover
%span.fr-text-action-high--blue-france.fr-icon-questionnaire-line{ "aria-hidden": "true" }
= t('shared.ephemeral_link')
= render partial: "shared/piece_justificative_template", locals: { attachment: @champ.type_de_champ.piece_justificative_template }