Skip to content
Snippets Groups Projects

Resolve "Show also group ownerships on person detail page"

Files
2
@@ -241,18 +241,36 @@
{% endif %}
{% has_perm 'core.view_person_groups_rule' user person as can_view_groups %}
{% if can_view_groups and groups %}
{% if can_view_groups and groups.count or can_view_groups and person.owner_of_recursive.count or can_view_groups and person.owner_of_recursive.count and groups.count %}
<div class="col s12 m6 l4">
<h2>{% blocktrans %}Groups{% endblocktrans %}</h2>
<div class="card-panel">
<div class="collection">
{% for group in groups %}
<a href="{{ group.get_absolute_url }}" class="collection-item">
{{ group.name }} ({{ group.school_term }})
</a>
{% endfor %}
{% if groups.count %}
<div>
<h2>{% blocktrans %}Groups{% endblocktrans %}</h2>
<div class="card-panel">
<div class="collection">
{% for group in groups %}
<a href="{{ group.get_absolute_url }}" class="collection-item">
{{ group.name }} ({{ group.school_term }})
</a>
{% endfor %}
</div>
</div>
</div>
</div>
{% endif %}
{% if person.owner_of_recursive.count %}
<div>
<h2>{% blocktrans %}Group ownership{% endblocktrans %}</h2>
<div class="card-panel">
<div class="collection">
{% for group in person.owner_of_recursive.all %}
<a href="{{ group.get_absolute_url }}" class="collection-item">
{{ group.name }} ({{ group.school_term }})
</a>
{% endfor %}
</div>
</div>
</div>
{% endif %}
</div>
{% endif %}
</div>
Loading