-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP using new area page for area page
- Loading branch information
Showing
4 changed files
with
190 additions
and
288 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{% load humanize %} | ||
{% if dataset.name.lower == "results of last election" %} | ||
<table class="table mb-0"> | ||
<thead> | ||
<tr> | ||
<th scope="col">Party</th> | ||
<th scope="col">Votes</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{% for data in dataset.data.value.results|dictsortreversed:"votes" %} | ||
{% if data.votes != 0 %} | ||
<tr> | ||
<th>{{ data.party }}</th> | ||
<td>{{ data.votes }}</td> | ||
</tr> | ||
{% endif %} | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
{% elif dataset.name.lower == "popular petitions" %} | ||
<table class="table mb-0"> | ||
<thead> | ||
<tr> | ||
<th scope="col">Petition</th> | ||
<th scope="col">Signatures</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{% for petition in dataset.data.value %} | ||
<tr> | ||
<td><a href="{{ petition.url }}">{{ petition.action }}</a></td> | ||
<td class="text-end">{{ petition.signatures }}</td> | ||
</tr> | ||
{% endfor %} | ||
</body> | ||
</table> | ||
{% elif dataset.subcategory == "groups" %} | ||
<h6 class="text-muted fw-bold">{{ dataset.label }}</h6> | ||
<ul class="tag-cloud"> | ||
{% for data in dataset.data.json %} | ||
{% if data.url %} | ||
<li><a href="{{ data.url }}" class="tag" title="{{ dataset.label }}">{{ data.group_name }}</a></li> | ||
{% else %} | ||
<li class="tag">{{ data.group_name }}</li> | ||
{% endif %} | ||
{% endfor %} | ||
</ul> | ||
{% endif %} |
Oops, something went wrong.