From 8149e672fcabfbb8774a607066c92b0f43ee8147 Mon Sep 17 00:00:00 2001 From: Lukas Weichelt <lukas.weichelt@teckids.org> Date: Sat, 10 Sep 2022 13:46:33 +0200 Subject: [PATCH] Show also group ownerships on person detail page --- aleksis/core/templates/core/person/full.html | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/aleksis/core/templates/core/person/full.html b/aleksis/core/templates/core/person/full.html index 9a5895111..295b061f2 100644 --- a/aleksis/core/templates/core/person/full.html +++ b/aleksis/core/templates/core/person/full.html @@ -255,5 +255,21 @@ </div> </div> {% endif %} + {% has_perm 'core.view_person_groups_rule' user person as can_view_groups %} + {% if can_view_groups and groups %} + <div class="col s12 m6 l4"> + <h2>{% blocktrans %}Group ownership{% endblocktrans %}</h2> + <div class="card-panel"> + <div class="collection"> + {% for group in person.owner_of_recursive %} + <a href="{{ group.get_absolute_url }}" class="collection-item"> + {{ group.name }} ({{ group.school_term }}) + </a> + {% endfor %} + </div> + </div> + </div> + {% endif %} + </div> {% endblock %} -- GitLab