Skip to content

Commit

Permalink
Merge pull request #2864 from MTES-MCT/fix/2863-display-visite-button…
Browse files Browse the repository at this point in the history
…-not-done

[BO - Signalement] Afficher le bouton de rapport de visite même quand elle n'a pas été effectuée
  • Loading branch information
numew authored Jul 26, 2024
2 parents f5f2a16 + 47434ab commit a16b8e7
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
{% endif %}
{% endif %}
{% elseif intervention.status is same as constant('App\\Entity\\Intervention::STATUS_DONE') %}
{% if signalement.interventions is empty or intervention.files is empty or intervention.getRapportDeVisite is empty%}
{% if signalement.interventions is empty or intervention.files is empty or intervention.getRapportDeVisite is empty %}
{% if is_granted('SIGN_ADD_VISITE', intervention.signalement) %}
<button
class="fr-btn fr-fi-file-fill"
Expand Down Expand Up @@ -60,6 +60,16 @@
Ajouter les photos de la visite
</button>
{% endif %}
{% elseif intervention.status is same as constant('App\\Entity\\Intervention::STATUS_NOT_DONE') %}
{% if intervention.getRapportDeVisite is not empty %}
<a href="{{ asset('_up/'~intervention.getRapportDeVisite.first.filename)~'/' ~ signalement.uuid }}"
class="fr-btn"
title="Afficher le document"
rel="noopener"
target="_blank">
<span aria-hidden="true" class="fr-fi-file-line fr-icon--sm"></span> Voir le rapport de visite
</a>
{% endif %}
{% else %}
&nbsp;
{% endif %}
Expand Down

0 comments on commit a16b8e7

Please sign in to comment.