Skip to content

Commit

Permalink
Merge pull request #1511 from MTES-MCT/hotfix/1509-display-label-no-p…
Browse files Browse the repository at this point in the history
…hoto

[BO - Signalement ] Mention "Aucun document ou photo disponible" alors qu'il y a des photos
  • Loading branch information
hmeneuvrier authored Jul 25, 2023
2 parents 93a5e0f + 7ec6ab4 commit a622fe8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion templates/back/signalement/view/photos-documents.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</p>
</div>

{% if signalement.photos|length == 0 and signalement.documents|length == 0 %}
{% if signalement.files|length == 0 %}
<p class="fr-text--sm">
Aucun document ou photo disponible
</p>
Expand Down
11 changes: 7 additions & 4 deletions templates/front/suivi_signalement.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,17 @@
<h2 class="fr-mb-0">Photo(s) liée(s) à votre signalement</h2>
<p class="fr-hint-text">Ci-dessous, les photos ajoutées lors du dépôt de votre signalement ainsi que celles
ajoutées par le(s) partenaire(s) en charge de votre dossier.</p>
{% for photo in signalement.photos %}
{% for photo in signalement.files|filter(photo => photo.fileType == 'photo') %}
<div class="fr-grid-row fr-grid-row--middle fr-stripped fr-rounded fr-p-5v">
<div class="fr-col-10">
Photos N°{{ loop.index }}
</div>
<div class="fr-col-2 fr-text--right">
<a href="{{ asset('_up/'~photo.file) }}?t={{ csrf_token('suivi_signalement_ext_file_view') }}"
class="fr-btn fr-fi-eye-fill fr-btn--icon-left" title="Afficher la photos">Afficher</a>
<a href="{{ asset('_up/'~photo.filename) }}?t={{ csrf_token('suivi_signalement_ext_file_view') }}"
class="fr-btn fr-fi-eye-fill fr-btn--icon-left"
title="Afficher la photo"
target="_blank"
rel="noopener">Afficher</a>
</div>
</div>
{% else %}
Expand All @@ -131,4 +134,4 @@

{% block javascripts %}
{{ encore_entry_script_tags('app') }}
{% endblock %}
{% endblock %}

0 comments on commit a622fe8

Please sign in to comment.