add user cards to group pages

This commit is contained in:
Hugh Rundle
2021-09-24 21:24:06 +10:00
parent 264d9b2f3c
commit 86a60d58e5
2 changed files with 23 additions and 19 deletions

View File

@ -13,19 +13,34 @@
</div>
{% endif %}
{% if not members.object_list.exists %}
{% if not group.members.exists %}
<p>{% trans "This group has no members" %}</p>
{% else %}
<ol start="{{ members.start_index }}" class="ordered-list">
{% for member in members %}
<h2 class="heading">Group Members</h2>
<ul start="{{ members.start_index }}" class="ordered-list">
{% for member in group.members.all %}
<li class="block mb-5">
<div class="column is-one-third">
{% include 'directory/user_card.html' %}
</div>
</li>
{% endfor %}
</ul>
{% endif %}
{% if not group.lists.exists %}
<p>{% trans "This group has no lists" %}</p>
{% else %}
<h2 class="heading">Lists</h2>
<ul start="{{ lists.start_index }}" class="ordered-list">
{% for list in group.lists.all %}
<li class="block mb-5">
<!-- TODO: make these proper list cards -->
<div class="card">
<p>member.username</p>
</div>
<a href={{ member.local_path }}>{{ list.name }}</a>
</div>
</li>
{% endfor %}
</ol>
</ul>
{% endif %}
{% include "snippets/pagination.html" with page=items %}
</section>