Added date ranges in the elections list view.

This commit is contained in:
Jean-Baptiste Lenglet 2016-12-20 16:03:26 +01:00 committed by klmp200
parent 521b61517b
commit e6b37ef332

View File

@ -1,11 +1,27 @@
{% extends "core/base.jinja" %} {% extends "core/base.jinja" %}
{% block title %} {% block title %}
{% trans %}Election list{% endtrans %} {%- trans %}Election list{% endtrans %}
{% endblock %} {%- endblock %}
{% block head %}
{{ super() -}}
<style type="text/css">
small {
font-size: smaller;
}
</style>
{%- endblock %}
{% block content %} {% block content %}
{% for el in object_list %} <h3>{% trans %}Current elections{% endtrans %}</h3>
<p><a href="{{ url('election:detail', election_id=el.id) }}">{{el}}</a></p> <hr>
{% endfor %} <ul>
{% endblock %} {%- for election in object_list %}
<p>
<a href="{{ url('election:detail', election_id=election.id) }}">{{election}}</a>
<small>{% trans %}From{% endtrans %} {{ election.start_date|date("l d F Y") }} {% trans %}to{% endtrans %} {{ election.end_date|date("l d F Y") }}</small>
</p>
{%- endfor %}
</ul>
{%- endblock %}