Skip to content
Snippets Groups Projects
Unverified Commit 415bb542 authored by Tom Teichler's avatar Tom Teichler :beers:
Browse files

Merge branch 'master' into issue43

parents 8ab91e44 656c3526
No related branches found
No related tags found
1 merge request!21Add menu to footer. Closes #43.
Subproject commit a0c50e1881df1c19cbbccc472f24b0012b2fa482
Subproject commit b9a8c04ec8cc5527ccf18f8f37c7ee0f9e7d8088
......@@ -20,11 +20,14 @@
</tr>
</table>
<h3>Members</h3>
{% render_table persons_table %}
<h3>{% blocktrans %}Owners{% endblocktrans %}</h3>
{% render_table owners_table %}
<h3>{% blocktrans %}Members{% endblocktrans %}</h3>
{% render_table members_table %}
{% else %}
<h2>{% blocktrans %}Person not found{% endblocktrans %}</h2>
<h2>{% blocktrans %}Group not found{% endblocktrans %}</h2>
<p>
{% blocktrans %}
......
......@@ -89,12 +89,20 @@ def group(request: HttpRequest, id_: int, template: str) -> HttpResponse:
group = Group.objects.get(pk=id_)
# Get members
persons = group.members.all()
members = group.members.all()
# Build table
persons_table = PersonsTable(persons)
RequestConfig(request).configure(persons_table)
context['persons_table'] = persons_table
members_table = PersonsTable(members)
RequestConfig(request).configure(members_table)
context['members_table'] = members_table
# Get owners
owners = group.owners.all()
# Build table
owners_table = PersonsTable(owners)
RequestConfig(request).configure(owners_table)
context['owners_table'] = owners_table
return render(request, 'core/group_%s.html' % template, context)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment