2016-12-05 19:18:03 +00:00
|
|
|
{% extends "core/base.jinja" %}
|
2017-06-07 14:43:50 +00:00
|
|
|
{% from 'core/macros.jinja' import paginate %}
|
2016-12-05 19:18:03 +00:00
|
|
|
|
|
|
|
{% block title %}
|
2016-12-20 15:03:26 +00:00
|
|
|
{%- trans %}Election list{% endtrans %}
|
|
|
|
{%- endblock %}
|
|
|
|
|
|
|
|
{% block head %}
|
|
|
|
{{ super() -}}
|
|
|
|
<style type="text/css">
|
|
|
|
small {
|
|
|
|
font-size: smaller;
|
|
|
|
}
|
2016-12-20 20:15:40 +00:00
|
|
|
|
|
|
|
time {
|
|
|
|
font-weight: bolder;
|
|
|
|
}
|
2016-12-20 15:03:26 +00:00
|
|
|
</style>
|
|
|
|
{%- endblock %}
|
2016-12-05 19:18:03 +00:00
|
|
|
|
|
|
|
{% block content %}
|
2016-12-20 15:03:26 +00:00
|
|
|
<h3>{% trans %}Current elections{% endtrans %}</h3>
|
|
|
|
{%- for election in object_list %}
|
2016-12-20 20:15:40 +00:00
|
|
|
<hr>
|
|
|
|
<section>
|
|
|
|
<h4>
|
|
|
|
<a href="{{ url('election:detail', election_id=election.id) }}">{{ election }}</a>
|
|
|
|
</h4>
|
|
|
|
<p>
|
2016-12-25 23:10:41 +00:00
|
|
|
{% trans %}Applications open from{% endtrans %}
|
|
|
|
<time datetime="{{ election.start_candidature }}">{{ election.start_candidature|localtime|date(DATETIME_FORMAT) }}</time>
|
|
|
|
{% trans %} at {% endtrans %}<time>{{ election.start_candidature|localtime|time(DATETIME_FORMAT) }}</time>
|
|
|
|
{% trans %}to{% endtrans %}
|
|
|
|
<time datetime="{{ election.end_candidature }}">{{ election.end_candidature|localtime|date(DATETIME_FORMAT) }}</time>
|
|
|
|
{% trans %} at {% endtrans %}<time>{{ election.end_candidature|time(DATETIME_FORMAT) }}</time>
|
2016-12-20 20:15:40 +00:00
|
|
|
</p>
|
2016-12-20 15:03:26 +00:00
|
|
|
<p>
|
2016-12-25 23:10:41 +00:00
|
|
|
{% trans %}Polls open from{% endtrans %}
|
|
|
|
<time datetime="{{ election.start_date }}">{{ election.start_date|localtime|date(DATETIME_FORMAT) }}</time>
|
|
|
|
{% trans %} at {% endtrans %}<time>{{ election.start_date|localtime|time(DATETIME_FORMAT) }}</time>
|
|
|
|
{% trans %}to{% endtrans %}
|
|
|
|
<time datetime="{{ election.end_date }}">{{ election.end_date|localtime|date(DATETIME_FORMAT) }}</time>
|
|
|
|
{% trans %} at {% endtrans %}<time>{{ election.end_date|localtime|time(DATETIME_FORMAT) }}</time>
|
2016-12-20 15:03:26 +00:00
|
|
|
</p>
|
2016-12-20 20:15:40 +00:00
|
|
|
<p>{{ election.description }}</p>
|
|
|
|
</section>
|
2016-12-20 15:03:26 +00:00
|
|
|
{%- endfor %}
|
2017-06-07 14:43:50 +00:00
|
|
|
{% if is_paginated %}
|
|
|
|
{{ paginate(page_obj, paginator) }}
|
|
|
|
{% endif %}
|
2016-12-25 23:10:41 +00:00
|
|
|
{%- endblock %}
|
|
|
|
|