-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extract party list into partial template
- Loading branch information
1 parent
be5f27d
commit cc786dc
Showing
2 changed files
with
29 additions
and
28 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
src/lanpartydb_website/blueprints/party/templates/party/_list.html
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,28 @@ | ||
<table class="table--index table--wide"> | ||
<thead> | ||
<tr> | ||
<th>{{ _('Title') }}</th> | ||
<th></th> | ||
<th>{{ _('Start') }}</th> | ||
<th>{{ _('End') }}</th> | ||
<th class="number">{{ _('Seats') }}</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{%- for party in parties %} | ||
<tr> | ||
<td><a href="{{ url_for('.view', slug=party.slug) }}">{{ party.title }}</a></td> | ||
<td class="centered"> | ||
{%- if party.location %} | ||
{%- with country = countries.get(alpha_2=party.location.country_code) %} | ||
<span title="{{ country.name }}">{{ country.flag }}</span> | ||
{%- endwith %} | ||
{%- endif %} | ||
</td> | ||
<td class="nowrap">{{ party.start_on|dateformat }}</td> | ||
<td class="nowrap">{{ party.end_on|dateformat }}</td> | ||
<td class="number">{{ party.seats }}</td> | ||
</tr> | ||
{%- endfor %} | ||
</tbody> | ||
</table> |
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