[Blends-commit] [SCM] website branch, master, updated. 6e0733c52ddaab7f6460a34b2c853ceffb455f84
Ole Streicher
ole at aip.de
Fri Mar 18 11:28:34 UTC 2016
The following commit has been merged in the master branch:
commit 6e0733c52ddaab7f6460a34b2c853ceffb455f84
Author: Ole Streicher <ole at aip.de>
Date: Fri Mar 18 12:27:27 2016 +0100
Make long description optional -- use empty string as default
diff --git a/webtools/templates/packages.xhtml b/webtools/templates/packages.xhtml
index 8788861..e4a9571 100644
--- a/webtools/templates/packages.xhtml
+++ b/webtools/templates/packages.xhtml
@@ -226,13 +226,13 @@ function show_fulldesc(hash) {
<a class="editlink" title="${fixtranslation}" href="http://ddtp.debian.net/ddtss/index.cgi/${lang}/forexternalreview/${tasks[task].metapkg.pkg}" py:if="lang != 'en'">
✏
</a>
- ${render_longdesc(tasks[task].metapkg.desc[lang]['long'])}
+ ${render_longdesc(tasks[task].metapkg.desc[lang].get('long', ''))}
</py:when>
<py:otherwise>
<a class="editlink" title="${translatedesc}" href="http://ddtp.debian.net/ddtss/index.cgi/${lang}/fetch?package=${tasks[task].metapkg.pkg}" py:if="lang != 'en'">
✏
</a>
- ${render_longdesc(tasks[task].metapkg.desc['en']['long'])}
+ ${render_longdesc(tasks[task].metapkg.desc['en'].get('long', ''))}
</py:otherwise>
</py:choose>
<table width="90%">
@@ -364,9 +364,9 @@ function show_fulldesc(hash) {
<a class="editlink" title="${fixtranslation}" href="http://ddtp.debian.net/ddtss/index.cgi/${lang}/forexternalreview/${project.pkg}">
✏
</a>
- ${render_longdesc(project.desc[lang]['long'])}
+ ${render_longdesc(project.desc[lang].get('long', ''))}
</py:when>
- <py:otherwise>${render_longdesc(project.desc['en']['long'])}</py:otherwise>
+ <py:otherwise>${render_longdesc(project.desc['en'].get('long',''))}</py:otherwise>
</py:choose>
</dd>
<py:if test="'published' in project.properties">
diff --git a/webtools/templates/tasks.xhtml b/webtools/templates/tasks.xhtml
index 0a387e1..72fd862 100644
--- a/webtools/templates/tasks.xhtml
+++ b/webtools/templates/tasks.xhtml
@@ -35,10 +35,10 @@
<div py:otherwise="">${tasks[task].metapkg.desc['en']['short']}</div>
</div>
<p><span py:choose="">
- <span py:when="lang in tasks[task].metapkg.desc">${render_longdesc(tasks[task].metapkg.desc[lang]['long'])}
+ <span py:when="lang in tasks[task].metapkg.desc">${render_longdesc(tasks[task].metapkg.desc[lang].get('long', ''))}
<div class="transmpkg" py:if="lang != 'en'"><a href="http://ddtp.debian.net/ddtss/index.cgi/${lang}/forexternalreview/${tasks[task].metapkg.pkg}">${fixtranslation}</a></div>
</span>
- <span py:otherwise="">${render_longdesc(tasks[task].metapkg.desc['en']['long'])}
+ <span py:otherwise="">${render_longdesc(tasks[task].metapkg.desc['en'].get('long', ''))}
<div class="transmpkg" py:if="lang != 'en'"><a href="http://ddtp.debian.net/ddtss/index.cgi/${lang}/fetch?package=${tasks[task].metapkg.pkg}">${translatedesc}</a></div>
</span>
</span></p>
@@ -156,8 +156,8 @@
</tr>
<tr>
<td colspan="2" class="project-description"><span py:choose="">
- <span py:when="lang in project.desc">${render_longdesc(project.desc[lang]['long'])}</span>
- <span py:otherwise="">${render_longdesc(project.desc['en']['long'])}</span>
+ <span py:when="lang in project.desc">${render_longdesc(project.desc[lang].get('long', ''))}</span>
+ <span py:otherwise="">${render_longdesc(project.desc['en'].get('long', ''))}</span>
</span>
<div class="enhanced-by" py:if="project.properties['Enhances'] != {}">
The package is enhanced by the following packages: <py:for each="enh in sorted(project.properties['Enhances'].keys())">
--
Static and dynamic websites for Debian Pure Blends
More information about the Blends-commit
mailing list