From 3e808a043d2f945769884d8e0dacabe512914d14 Mon Sep 17 00:00:00 2001 From: Tony Breeds Date: Fri, 27 Jul 2018 14:58:15 +1000 Subject: [PATCH] Omit ircnick from docs if empty If a candidate doesn't have an IRC nic we currently display '(None)' where other candidates get '(a_nic)'. While I don't think that people will genuinely confuse 'None' for an IRC nic lets just not include anything in the output. Change-Id: Ic41b89f11bf4473b226bc359529bf408c77ce998 --- doc/source/_exts/ptl.jinja | 2 +- doc/source/_exts/tc.jinja | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/source/_exts/ptl.jinja b/doc/source/_exts/ptl.jinja index 9c5b73dd..9ac169ab 100644 --- a/doc/source/_exts/ptl.jinja +++ b/doc/source/_exts/ptl.jinja @@ -4,7 +4,7 @@ * {{ project.replace('_', ' ') }} {% for candidate in candidates[project] %} - * `{{ candidate['fullname'] }} ({{ candidate['ircname'] }}) <{{ candidate['url'] }}>`__ + * `{{ candidate['fullname'] }} {% if candidate['ircname'] is not none %}({{ candidate['ircname'] }}){% endif %} <{{ candidate['url'] }}>`__ {% endfor %} {% endif %}{% endfor %} diff --git a/doc/source/_exts/tc.jinja b/doc/source/_exts/tc.jinja index 02ab5c14..b6cc8328 100644 --- a/doc/source/_exts/tc.jinja +++ b/doc/source/_exts/tc.jinja @@ -2,5 +2,5 @@ ====================== {% for candidate in candidates['TC'] %} -* `{{ candidate['fullname'] }} ({{ candidate['ircname'] }}) <{{ candidate['url'] }}>`__ +* `{{ candidate['fullname'] }} {% if candidate['ircname'] is not none %}({{ candidate['ircname'] }}){% endif %} <{{ candidate['url'] }}>`__ {% endfor %}