From 59357f2100a2222950ceddef49515b9ae893b3c5 Mon Sep 17 00:00:00 2001 From: Christophe Robillard Date: Thu, 30 Apr 2020 11:53:17 +0200 Subject: [PATCH] show attestations sociales and fiscales only for instructeurs --- .../dossiers/_identite_entreprise.html.haml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/app/views/shared/dossiers/_identite_entreprise.html.haml b/app/views/shared/dossiers/_identite_entreprise.html.haml index fe840a4e1..f9a3e8ed2 100644 --- a/app/views/shared/dossiers/_identite_entreprise.html.haml +++ b/app/views/shared/dossiers/_identite_entreprise.html.haml @@ -67,15 +67,16 @@ - elsif etablissement.exercices.present? = t('activemodel.models.exercices_summary', count: etablissement.exercices.count) - - if etablissement.entreprise_attestation_sociale.attached? - %tr - %th.libelle Attestation sociale - %td= link_to "Consulter l'attestation", url_for(etablissement.entreprise_attestation_sociale) + - if profile == 'instructeur' + - if etablissement.entreprise_attestation_sociale.attached? + %tr + %th.libelle Attestation sociale + %td= link_to "Consulter l'attestation", url_for(etablissement.entreprise_attestation_sociale) - - if etablissement.entreprise_attestation_fiscale.attached? - %tr - %th.libelle Attestation fiscale - %td= link_to "Consulter l'attestation", url_for(etablissement.entreprise_attestation_fiscale) + - if etablissement.entreprise_attestation_fiscale.attached? + %tr + %th.libelle Attestation fiscale + %td= link_to "Consulter l'attestation", url_for(etablissement.entreprise_attestation_fiscale) - if etablissement.association? %tr