Merge pull request #10245 from demarches-simplifiees/US/fix-attestation-link
correctif(lien.attestation): ETQ expert, je souhaite avoir accès à l'attestation même si je ne suis pas instructeur
This commit is contained in:
commit
84f0891a8b
8 changed files with 62 additions and 49 deletions
|
@ -17,12 +17,6 @@ module Instructeurs
|
|||
after_action :mark_avis_as_read, only: [:avis, :create_avis]
|
||||
after_action :mark_annotations_privees_as_read, only: [:annotations_privees, :update_annotations]
|
||||
|
||||
def attestation
|
||||
if dossier.attestation.pdf.attached?
|
||||
redirect_to dossier.attestation.pdf.url, allow_other_host: true
|
||||
end
|
||||
end
|
||||
|
||||
def extend_conservation
|
||||
dossier.extend_conservation(1.month)
|
||||
flash[:notice] = t('views.instructeurs.dossiers.archived_dossier')
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
- c.with_value do
|
||||
= simple_format dossier.motivation
|
||||
|
||||
- if dossier.attestation.present?
|
||||
- if dossier.attestation.present? && dossier.attestation.pdf.attached?
|
||||
= render Dossiers::RowShowComponent.new(label: "Attestation") do |c|
|
||||
- c.with_value do
|
||||
= link_to('Voir l’attestation', attestation_instructeur_dossier_path(dossier.procedure, dossier), **external_link_attributes)
|
||||
= render Dsfr::DownloadComponent.new(attachment: dossier.attestation.pdf, name: t(:download_attestation, scope: [:views, :shared, :dossiers, :form]))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue