[Blends-commit] [SCM] website branch, master, updated. 9b214d6f3e693317db68182398fe83daf1d6a243

Ole Streicher olebole at debian.org
Fri Mar 18 19:25:31 UTC 2016


The following commit has been merged in the master branch:
commit 9b214d6f3e693317db68182398fe83daf1d6a243
Author: Ole Streicher <olebole at debian.org>
Date:   Fri Mar 18 20:25:21 2016 +0100

    Allow empty VCS type fields in templates

diff --git a/webtools/templates/packages.xhtml b/webtools/templates/packages.xhtml
index fac5539..0747521 100644
--- a/webtools/templates/packages.xhtml
+++ b/webtools/templates/packages.xhtml
@@ -540,12 +540,12 @@ function show_fulldesc(hash) {
 			    <py:choose>
 			      <py:when test="'url' in project.properties['vcs']">
 				<a href="${project.properties['vcs']['browser']}" title="${project.properties['vcs']['url']}">
-				  ${project.properties['vcs']['type']}
+				  ${project.properties['vcs'].get('type', 'Vcs')}
 				</a>
 			      </py:when>
 			      <py:otherwise>
 				<a href="${project.properties['vcs']['browser']}">
-				  ${project.properties['vcs']['type']}
+				  ${project.properties['vcs'].get('type', 'Vcs')}
 				</a>
 			      </py:otherwise>
 			    </py:choose>
diff --git a/webtools/templates/tasks.xhtml b/webtools/templates/tasks.xhtml
index 4355418..8128624 100644
--- a/webtools/templates/tasks.xhtml
+++ b/webtools/templates/tasks.xhtml
@@ -140,8 +140,8 @@
              </div>
 	     <div py:if="'vcs' in project.properties">
 	       <span py:choose="">
-		 <span py:when="'url' in project.properties['vcs']"><a href="${project.properties['vcs']['browser']}" title="${project.properties['vcs']['url']}">${project.properties['vcs']['type']}</a></span>
-		 <span py:otherwise=""><a href="${project.properties['vcs']['browser']}">${project.properties['vcs']['type']}</a></span>
+		 <span py:when="'url' in project.properties['vcs']"><a href="${project.properties['vcs']['browser']}" title="${project.properties['vcs']['url']}">${project.properties['vcs'].get('type', 'Vcs')}</a></span>
+		 <span py:otherwise=""><a href="${project.properties['vcs']['browser']}">${project.properties['vcs'].get('type', Vcs')}</a></span>
 	       </span>
 	     </div>
             <div py:if="lang != 'en' and project.component == 'main' and project.pkgstatus != 'new' and project.pkgstatus != 'pkgvcs'">

-- 
Static and dynamic websites for Debian Pure Blends



More information about the Blends-commit mailing list