From: Jeremy Kerr
Date: Sun, 27 Mar 2016 04:53:06 +0000 (+0800)
Subject: templates: don't emit tags for empty URLs, allow both web_url & webscm_url
X-Git-Tag: v2.0.0-rc1~387
X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5263eedeecf99b39688d97254b6f93f55fc3956c;p=thirdparty%2Fpatchwork.git
templates: don't emit tags for empty URLs, allow both web_url & webscm_url
Rather than always outputting one of web_url or webscm_url, only output
when these are present. This prevents us from emitting empty links if
both are missing.
Signed-off-by: Jeremy Kerr
Acked-by: Stephen Finucane
---
diff --git a/patchwork/templates/patchwork/projects.html b/patchwork/templates/patchwork/projects.html
index afaf6aba..0db12275 100644
--- a/patchwork/templates/patchwork/projects.html
+++ b/patchwork/templates/patchwork/projects.html
@@ -30,7 +30,8 @@
{% if p.web_url %}
{{p.web_url}}
-{% else %}
+{% endif %}
+{% if p.webscm_url %}
{{p.webscm_url}}
{% endif %}