diff sat_templates/templates/bulma/photo/item.html @ 257:1a68c078a233

bulma (photo/item): only show delete icon if user is owner of the item
author Goffi <goffi@goffi.org>
date Sat, 01 Aug 2020 17:01:31 +0200
parents a0e889d73bad
children a50075db625c
line wrap: on
line diff
--- a/sat_templates/templates/bulma/photo/item.html	Sat Aug 01 17:01:31 2020 +0200
+++ b/sat_templates/templates/bulma/photo/item.html	Sat Aug 01 17:01:31 2020 +0200
@@ -8,9 +8,11 @@
         <div class="card-content" onclick="clicked_mh_fix('{{'comments_panel'|next_gidx}}')">
             <div class="level">
                 <div class="level-left">
-                    <div class="level-item is-size-7 x-is-hoverable-primary action_delete">
-                        {{ icon('trash-empty', cls='icon is-small') }}
-                    </div>
+                    {% if file.affiliation == 'owner' %}
+                        <div class="level-item is-size-7 x-is-hoverable-primary action_delete">
+                            {{ icon('trash-empty', cls='icon is-small') }}
+                        </div>
+                    {% endif %}
                 </div>
                 <div class="level-right">
                     <div class="level-item is-size-7">