feat: sort by country on organisation list

This commit is contained in:
James Graham
2021-03-09 12:24:46 +00:00
parent 7e9a6e992a
commit 7d74a99518
5 changed files with 95 additions and 5 deletions

View File

@@ -15,13 +15,11 @@
href="{% url 'people:organisation.create' %}">New Organisation</a>
<table class="table table-borderless">
{% regroup organisation_list.all by current_answers.hq_country as countries %}
<tbody>
{% for country in countries %}
<tr><th>{{ country.grouper.name|default:"Unknown" }}</th></tr>
{% for country, organisations in orgs_by_country.items %}
<tr><th>{{ country }}</th></tr>
{% for organisation in country.list %}
{% for organisation in organisations %}
<tr>
<td>{{ organisation }}</td>
<td>