election/doc/source/_exts/ptl_archive.jinja
Tony Breeds 4f71656634 Only display an IRC nic if one is provided
Change-Id: Ic1ee11fdaf41bc51ec4fd0e24e46c3ed12f18d7b
2018-08-08 10:27:40 +10:00

49 lines
1.4 KiB
Django/Jinja

{% for i in range(election|length + 4) %}={% endfor%}
{{ election.capitalize() }} PTL
{% for i in range(election|length + 4) %}={% endfor%}
{% for project in projects %}
* {{ project.replace('_', ' ') }}
{% for candidate in candidates[project] %}{% if candidate['elected'] and 'url' in candidate %}
* `{{ candidate['fullname'] }} {% if candidate['ircname'] is not none %}({{ candidate['ircname'] }}){% endif %} <{{ candidate['url'] }}>`__
{% elif candidate['elected'] == 'LEADERLESS' %}
* {{ candidate['statement'] }}
{% elif candidate['elected'] %}
* {{ candidate['fullname'] }} (\{{ candidate['ircname'] }}) {% if candidate['elected'] == 'INCUMBENT-PTL' %}[#IncumbentPTL]_{% else %}[#TCAppointed]_{% endif %}
{% endif %}
{% endfor %}
{% endfor %}
{% if 'TC-APPOINTED' in tags %}
.. [#TCAppointed] By TC Appointment
{% endif %}
{% if 'INCUMBENT-PTL' in tags %}
.. [#IncumbentPTL] Incumbent PTL
{% endif %}
Results
-------
{% for project in projects %}{% if project in elections_results %}
* `{{ project }} <{{ elections_results[project] }}>`_
{% endif %}
{% endfor %}
{{ election.capitalize() }} PTL Candidates
======================
{% for project in projects %}
* {{ project.replace('_', ' ') }}
{% for candidate in candidates[project] %}{% if 'url' in candidate %}
* `{{ candidate['fullname'] }} ({{ candidate['ircname'] }}) <{{ candidate['url'] }}>`_
{% endif %}{% endfor %}
{% endfor %}