The following commit has been merged in the master branch:
commit ab2a0527dc3c95302074e8ede54cd8a47df95ae3
Author: Ole Streicher <[email protected]>
Date:   Sat Sep 3 13:52:09 2016 +0200

    Show description entry only if long description exists

diff --git a/webtools/templates/packages.xhtml 
b/webtools/templates/packages.xhtml
index 7b91e7d..382d9fa 100644
--- a/webtools/templates/packages.xhtml
+++ b/webtools/templates/packages.xhtml
@@ -337,40 +337,42 @@ function show_fulldesc(hash) {
                    </py:choose>
                  </h3>
                  <dl class="pkgdesc">
-                   <py:choose>
-                     <py:when test="'screenshot' in project.properties">
-                       <dt class="screenshot">
-                         <a class="tooltip" 
href="https://screenshots.debian.net/package/${project.properties['name']}">
-                           <img 
src="${project.properties['screenshot']['icon']}" alt="Description:" />
-                           <span class="tooltip centered">
-                             <img 
src="${project.properties['screenshot']['image']}" />
-                             <table py:if="'screenshots' in 
project.properties['screenshot']" class="versionclass">
-                               <tr><th colspan="3"
-                                       class="versionclass"><strong>Other 
screenshots of package ${project.properties['name']}</strong></th></tr>
-                               <tr><th class="version">Version</th><th 
class="archs">URL</th></tr>
-                               <py:for each="screenshot in 
project.properties['screenshot']['screenshots']">
-                                 <tr><td 
class="version">${screenshot['version']}</td><td class="archs"><a 
href="${screenshot['url']}">${screenshot['url']}</a></td></tr>
-                               </py:for>
-                             </table>
-                           </span>
-                         </a>
-                       </dt>
-                     </py:when>
-                     <py:otherwise>
-                       <dt>Description</dt>
-                     </py:otherwise>
-                   </py:choose>
-                   <dd>
+                   <py:if test="'long' in project.properties['desc']['en']">
                      <py:choose>
-                       <py:when test="lang != 'en' and lang in 
project.properties['desc']">
-                         <a class="editlink" title="${fixtranslation}" 
href="https://ddtp.debian.net/ddtss/index.cgi/${lang}/forexternalreview/${project.properties['name']}">
-                           &#9999;
-                         </a>
-                         
${render_longdesc(project.properties['desc'][lang].get('long', ''))}
+                       <py:when test="'screenshot' in project.properties">
+                         <dt class="screenshot">
+                           <a class="tooltip" 
href="https://screenshots.debian.net/package/${project.properties['name']}">
+                             <img 
src="${project.properties['screenshot']['icon']}" alt="Description:" />
+                             <span class="tooltip centered">
+                               <img 
src="${project.properties['screenshot']['image']}" />
+                               <table py:if="'screenshots' in 
project.properties['screenshot']" class="versionclass">
+                                 <tr><th colspan="3"
+                                         class="versionclass"><strong>Other 
screenshots of package ${project.properties['name']}</strong></th></tr>
+                                 <tr><th class="version">Version</th><th 
class="archs">URL</th></tr>
+                                 <py:for each="screenshot in 
project.properties['screenshot']['screenshots']">
+                                   <tr><td 
class="version">${screenshot['version']}</td><td class="archs"><a 
href="${screenshot['url']}">${screenshot['url']}</a></td></tr>
+                                 </py:for>
+                               </table>
+                             </span>
+                           </a>
+                         </dt>
                        </py:when>
-                       
<py:otherwise>${render_longdesc(project.properties['desc']['en'].get('long',''))}</py:otherwise>
+                       <py:otherwise>
+                         <dt>Description</dt>
+                       </py:otherwise>
                      </py:choose>
-                   </dd>
+                     <dd>
+                       <py:choose>
+                         <py:when test="lang != 'en' and lang in 
project.properties['desc']">
+                           <a class="editlink" title="${fixtranslation}" 
href="https://ddtp.debian.net/ddtss/index.cgi/${lang}/forexternalreview/${project.properties['name']}">
+                             &#9999;
+                           </a>
+                           
${render_longdesc(project.properties['desc'][lang].get('long', ''))}
+                         </py:when>
+                         
<py:otherwise>${render_longdesc(project.properties['desc']['en'].get('long',''))}</py:otherwise>
+                       </py:choose>
+                     </dd>
+                   </py:if>
                    <py:if test="'published' in project.properties">
                      <dt>Reference</dt>
                      <dd>

-- 
Static and dynamic websites for Debian Pure Blends

_______________________________________________
Blends-commit mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/blends-commit

Reply via email to