From d6846e446d09d378ba38aacc4bbf96efafdfbfe8 Mon Sep 17 00:00:00 2001 From: Tony Breeds Date: Wed, 8 Aug 2018 09:38:39 +1000 Subject: [PATCH] Handle projects that aren't resolved at conclusion of the election This cycle we have a few projects that are leaderless and the haven't been completely closed off during the election window. Add the ability for election officials to provide clarifying text in this case. As each project is likely to be slight different we have opted against a one size fits all statement. Change-Id: I5d82c048e1d38a3d73d8390a98ee9f948e252522 --- doc/source/_exts/candidates.py | 2 ++ doc/source/_exts/ptl_announce.jinja | 2 +- doc/source/_exts/ptl_archive.jinja | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/source/_exts/candidates.py b/doc/source/_exts/candidates.py index 2a355da8..d5d88c02 100644 --- a/doc/source/_exts/candidates.py +++ b/doc/source/_exts/candidates.py @@ -62,6 +62,8 @@ def build_archive(serie, list_type): db['tags']['TC-APPOINTED'] = True elif candidate['elected'] == 'INCUMBENT-PTL': db['tags']['INCUMBENT-PTL'] = True + elif candidate['elected'] == 'LEADERLESS': + db['tags']['LEADERLESS'] = True output = os.path.join(".", "doc", "source", "results", serie, "%s.rst" % list_type) template_name = "%s_archive.jinja" % list_type diff --git a/doc/source/_exts/ptl_announce.jinja b/doc/source/_exts/ptl_announce.jinja index 22c3548e..6666a2bb 100644 --- a/doc/source/_exts/ptl_announce.jinja +++ b/doc/source/_exts/ptl_announce.jinja @@ -6,7 +6,7 @@ Thank you to the electorate, to all those who voted and to all candidates who pu Now for the results of the PTL election process, please join me in extending congratulations to the following PTLs: {% for project in projects %} - * {{ project.replace('_', ' ').ljust(25) }} : {% for candidate in candidates[project] %}{% if candidate['elected'] %}{{ candidate['fullname'].ljust(44) }}{% endif %}{% endfor %} + * {{ project.replace('_', ' ').ljust(25) }} : {% for candidate in candidates[project] %}{% if candidate['elected'] and 'url' in candidate %}{{ candidate['fullname'].ljust(44) }}{% endif %}{% endfor %} {% endfor %} diff --git a/doc/source/_exts/ptl_archive.jinja b/doc/source/_exts/ptl_archive.jinja index b00b25e7..1451481d 100644 --- a/doc/source/_exts/ptl_archive.jinja +++ b/doc/source/_exts/ptl_archive.jinja @@ -9,6 +9,8 @@ {% for candidate in candidates[project] %}{% if candidate['elected'] and 'url' in candidate %} * `{{ candidate['fullname'] }} ({{ candidate['ircname'] }}) <{{ candidate['url'] }}>`__ +{% elif candidate['elected'] == 'LEADERLESS' %} + * {{ candidate['statement'] }} {% elif candidate['elected'] %} * {{ candidate['fullname'] }} (\{{ candidate['ircname'] }}) {% if candidate['elected'] == 'INCUMBENT-PTL' %}[#IncumbentPTL]_{% else %}[#TCAppointed]_{% endif %}