]> git.agnieray.net Git - galette.git/commitdiff
Only display default member picture on pdf cards
authorGuillaume AGNIERAY <dev@agnieray.net>
Mon, 13 Mar 2023 15:53:44 +0000 (16:53 +0100)
committerJohan Cwiklinski <johan@x-tnd.be>
Mon, 13 Mar 2023 17:55:11 +0000 (18:55 +0100)
galette/templates/default/components/forms/picture.html.twig
galette/templates/default/elements/member_card.html.twig

index 56aa325112c8c87df46e72fbc64b9f6c7e0866e9..2f861974012ad41181704d7fdb073c03c3b4d8f5 100644 (file)
@@ -1,14 +1,12 @@
 <div class="field ui items">
     <label>{{ _T("Picture:") }}</label>
     <div class="item">
-        <div class="image">
     {% if member.id %}
+        <div class="image">
         {% set photo_id = member.id %}
-    {% else %}
-        {% set photo_id = 0 %}
-    {% endif %}
             <img id="photo_adh" src="{{ url_for("photo", {"id": photo_id, "rand": time}) }}" class="picture" width="{{ member.picture.getOptimalWidth() }}" height="{{ member.picture.getOptimalHeight() }}" alt="{{ _T("Picture") }}"/>
         </div>
+    {% endif %}
         <div class="content">
             <div class="description">
                 <div class="ui file action input">
index 8c548303f384661d1f8f3ddc2dba299f55168d67..98d4508ebd5d437eff257c021eb0c2ffc0427b19 100644 (file)
@@ -1,4 +1,5 @@
 <div class="ui horizontal fluid card">
+    {% if not (member.picture.path ends with '/default/images/default.png') %}
     <div class="image">
         <img
                 src="{{ url_for("photo", {"id": member.id, "rand": time}) }}"
@@ -6,6 +7,7 @@
                 height="{{ member.picture.getOptimalHeight() }}"
                 alt="{{ _T("Picture") }}">
     </div>
+    {% endif %}
     <div class="content">
         <div class="header aligned">
             {{ member.sname }}