changeset 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 2ee4a91f615b
children 5e51ce9376ed
files sat_templates/templates/bulma/photo/item.html
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
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">