election/doc/source/_exts/events.jinja
Tristan Cacqueray df232c3074 Refactor all parameters to configuration.yaml
This change moves parameter from utils.py and index.rst to the
configuration.yaml. Moreover this change does:

* Use ISO 8601 dateformat in configuration
* Change events extension to use datetime instead of calendar
* Add a configuration extension to render doc substitutions

Change-Id: Ie35cb9ae2c334814afaa36b3afd606c8bcf62616
2016-11-09 03:24:26 +00:00

22 lines
1.0 KiB
Django/Jinja

.. raw:: html
<span id="eventname"></span>
<span id="eventtimer"></span>
<script>
var events_timeline = [
{% for event in events %}
{ start: "{{ event['start_iso'] }}", end: "{{ event['end_iso'] }}", name: "{{ event['name'] }}" },
{% endfor %}
];
</script>
<br /><br />
+------------------------------------+------------------------------------+------------------------------------+-----------+
| Events | Start Date | End Date | Status |
+====================================+====================================+====================================+===========+
{% for event in events %}
| {{ "%29s" % event['name_str'] }} | {{ "%29s" % event['start_str'] }} | {{ "%29s" % event['end_str'] }} | {{ "%7s" % event['status'] }} |
+------------------------------------+------------------------------------+------------------------------------+-----------+
{% endfor %}