]> git.agnieray.net Git - galette.git/commitdiff
Hide useless links to members
authorGuillaume AGNIERAY <dev@agnieray.net>
Fri, 29 Sep 2023 08:57:11 +0000 (10:57 +0200)
committerJohan Cwiklinski <johan@x-tnd.be>
Sat, 30 Sep 2023 07:05:40 +0000 (09:05 +0200)
galette/templates/default/pages/contributions_list.html.twig
galette/templates/default/pages/transactions_list.html.twig

index d54d31cd783aee86b7b56d6f29882191195f5187..71818398b345a161006179c0396be3c2c37f9a92 100644 (file)
             <div class="ui compact vertically fitted segment">
             <div class="ui horizontal list">
             <span class="ui primary ribbon label">
-            <a
+            {% if login.isAdmin() or login.isStaff() or member.hasChildren() %}
+                <a
                     href="{{ url_for("contributions", {"type": "contributions", "option": "member", "value": "all"}) }}"
-            >
-                        <i class="icon times tooltip"></i>
-                        <span class="ui special popup">{{ _T("Show all members contributions") }}</span>
-                    </a>
+                >
+                    <i class="icon times tooltip"></i>
+                    <span class="ui special popup">{{ _T("Show all members contributions") }}</span>
+                </a>
+            {% endif %}
         {% endif %}
         {{ member.sname }}{% if not member.isActive() %} ({{ _T("Inactive") }}){% endif %}
         </span>
index 7b678423ccc1121589f3017398b19b32d04f3b9d..bc7e1dada9eb53d1806274e0173d8147c17aeba3 100644 (file)
                 <div class="ui compact vertically fitted segment">
                 <div class="ui horizontal list">
                 <span class="ui primary ribbon label">
-                <a
+                {% if login.isAdmin() or login.isStaff() or member.hasChildren() %}
+                    <a
                         href="{{ url_for("contributions", {"type": "transactions", "option": "member", "value": "all"}) }}"
-                >
-                        <i class="icon eraser tooltip"></i>
+                    >
+                        <i class="icon times tooltip"></i>
                         <span class="ui special popup">{{ _T("Show all members transactions") }}</span>
                     </a>
+                {% endif %}
             {% endif %}
             {{ member.sname }}{% if not member.isActive() %} ({{ _T("Inactive") }}){% endif %}
             </span>