diff --git a/doc/source/_exts/candidates.py b/doc/source/_exts/candidates.py index 464ce94f..08286ee2 100644 --- a/doc/source/_exts/candidates.py +++ b/doc/source/_exts/candidates.py @@ -91,8 +91,10 @@ def build_archive(serie, list_type): def build_lists(app): # Current candidates candidates_list = utils.build_candidates_list() - render_list("ptl", candidates_list) - render_list("tc", candidates_list) + if not utils.is_tc_election(): + render_list("ptl", candidates_list) + else: + render_list("tc", candidates_list) # Archived elections previous_toc = [ diff --git a/doc/source/_exts/ptl_archive.jinja b/doc/source/_exts/ptl_archive.jinja index fc8e6302..b00b25e7 100644 --- a/doc/source/_exts/ptl_archive.jinja +++ b/doc/source/_exts/ptl_archive.jinja @@ -1,15 +1,19 @@ -====================== +{% 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'] }} ({{ candidate['ircname'] }}) <{{ candidate['url'] }}>`_ + * `{{ candidate['fullname'] }} ({{ candidate['ircname'] }}) <{{ candidate['url'] }}>`__ {% elif candidate['elected'] %} - * {{ candidate['fullname'] }} ({{ candidate['ircname'] }}) {% if candidate['elected'] == 'INCUMBENT-PTL' %}[#IncumbentPTL]_{% else %}[#TCAppointed]_{% endif %} -{% endif %}{% endfor %} + * {{ candidate['fullname'] }} (\{{ candidate['ircname'] }}) {% if candidate['elected'] == 'INCUMBENT-PTL' %}[#IncumbentPTL]_{% else %}[#TCAppointed]_{% endif %} + +{% endif %} +{% endfor %} {% endfor %} @@ -25,7 +29,8 @@ Results {% for project in projects %}{% if project in elections_results %} * `{{ project }} <{{ elections_results[project] }}>`_ -{% endif %}{% endfor %} +{% endif %} +{% endfor %} {{ election.capitalize() }} PTL Candidates diff --git a/doc/source/_exts/tc_archive.jinja b/doc/source/_exts/tc_archive.jinja index dcd0083a..5781d4a7 100644 --- a/doc/source/_exts/tc_archive.jinja +++ b/doc/source/_exts/tc_archive.jinja @@ -1,8 +1,11 @@ -====================== +{% for i in range(election|length + 20) %}={% endfor%} + {{ election.capitalize() }} elected TC members -====================== +{% for i in range(election|length + 20) %}={% endfor%} + + {% for candidate in candidates['TC'] %}{% if candidate['elected'] %} -* `{{ candidate['fullname'] }} ({{ candidate['ircname'] }}) <{{ candidate['url'] }}>`_ +* `{{ candidate['fullname'] }} ({{ candidate['ircname'] }}) <{{ candidate['url'] }}>`__ {% endif %}{% endfor %} Results @@ -12,5 +15,5 @@ Results {{ election.capitalize() }} TC Candidates ====================== {% for candidate in candidates['TC'] %} -* `{{ candidate['fullname'] }} ({{ candidate['ircname'] }}) <{{ candidate['url'] }}>`_ +* `{{ candidate['fullname'] }} ({{ candidate['ircname'] }}) <{{ candidate['url'] }}>`__ {% endfor %} diff --git a/doc/source/conf.py b/doc/source/conf.py index 50fb006a..57d0e2eb 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -71,7 +71,9 @@ copyright = u'2015, OpenStack' # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. exclude_patterns = ['_build', 'candidates/ptl.rst', 'candidates/tc.rst', - 'candidates/events.rst'] + 'candidates/events.rst', + 'results/*/announce_*.rst', + ] # The reST default role (used for this markup: `text`) to use for all documents. #default_role = None