]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
templates: don't emit tags for empty URLs, allow both web_url & webscm_url
authorJeremy Kerr <jk@ozlabs.org>
Sun, 27 Mar 2016 04:53:06 +0000 (12:53 +0800)
committerStephen Finucane <stephen.finucane@intel.com>
Tue, 29 Mar 2016 08:54:37 +0000 (09:54 +0100)
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 <jk@ozlabs.org>
Acked-by: Stephen Finucane <stephen.finucane@intel.com>
patchwork/templates/patchwork/projects.html

index afaf6aba952b1902007526d2c45ab88a04f9f074..0db12275bdcc2132c8d1828acf9570dbfffa5112 100644 (file)
@@ -30,7 +30,8 @@
         </p>
 {% if p.web_url %}
       <p><a href="{{p.web_url}}">{{p.web_url}}</a></p>
-{% else %}
+{% endif %}
+{% if p.webscm_url %}
       <p><a href="{{p.webscm_url}}">{{p.webscm_url}}</a></p>
 {% endif %}
      </div>