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

Ole Streicher debian at liska.ath.cx
Fri Dec 4 14:02:54 UTC 2015


The following commit has been merged in the master branch:
commit c3d8ecec3bcc8084ba09eb9aa2b6104e2a0c92c8
Author: Ole Streicher <debian at liska.ath.cx>
Date:   Fri Dec 4 15:02:48 2015 +0100

    Experimental package details list for Debian-Astro

diff --git a/webtools/tasks.py b/webtools/tasks.py
index 4f95798..6513fbc 100755
--- a/webtools/tasks.py
+++ b/webtools/tasks.py
@@ -262,7 +262,11 @@ for lang in languages:
 		except: # simply continue if file does not exist
 			pass
 
-		template = loader.load('tasks.xhtml')
+                if data['projectname'] == 'Debian Astro':
+		        template = loader.load('packages.xhtml')
+                else:
+                        template = loader.load('tasks.xhtml')
+
 		f = open(outputfile+'_tmp', "w")
 		try:
 			print >> f, template.generate(**data).render('xhtml')
diff --git a/webtools/templates/packages.xhtml b/webtools/templates/packages.xhtml
new file mode 100644
index 0000000..177be75
--- /dev/null
+++ b/webtools/templates/packages.xhtml
@@ -0,0 +1,384 @@
+<!DOCTYPE html
+     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="${lang}" lang="${lang}"
+      xmlns:py="http://genshi.edgewall.org/">
+  <head>
+      <title>$projectname ${tasks[task].metapkg.PrintedName.capitalize()} packages</title>
+    <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
+    <link href="http://www.debian.org/debhandheld.css" media="screen"
+	  rel="stylesheet" type="text/css" />
+    <link href="http://www.debian.org/debian.css" rel="stylesheet"
+	  type="text/css" />
+    <link href="http://blends.debian.org/css/blends.css" rel="stylesheet"
+	  type="text/css" />
+    <style type="text/css">
+.pkgdesc-full {
+    background:#f8f8ff;
+}
+.pkgdesc-full td {
+    border-top-style: none;
+}
+.pkgdesc-full p,ol,ul,pre {
+    margin-top:0;
+    margin-bottom: 0;
+    padding-bottom: 0.5em;
+}
+.pkgdesc-full h3 {
+    margin: 1em;
+}
+.pkgdesc-full dt {
+    float: left;
+    font-weight: bold;
+    margin-top: 0;
+    margin-bottom: 0;
+    margin-left: 1em;
+    margin-right: 0;
+    padding-top: 0.5em;
+    width: 150px;
+}
+.pkgdesc-full dt:after {
+    content: ':';
+}
+.pkgdesc-full dt.screenshot:after {
+    content: '';
+}
+.pkgdesc-full dt.screenshot img {
+    width: 100%;
+}
+
+.pkgdesc-full dd {
+    margin-left: 2em;
+    padding-left: 150px;
+    padding-bottom: 0.5em;
+    padding-top: 0.5em;
+}
+.pkgdesc-full dd::after {
+    clear: left;
+    content: "";
+    display: block;
+}
+.pkgdesc-short td:not(:last-child) {
+    width: 1px;
+    white-space: nowrap;
+}
+    </style>
+    <link rel="shortcut icon" href="http://www.debian.org/favicon.ico" />
+    <script type="text/javascript">
+// <![CDATA[
+function toggle_visibility(id) {
+    var element = document.getElementById(id);
+    if (element) {
+        if (element.style.display == "none") {
+            element.style.display = "";
+        } else {
+            element.style.display = "none";
+        }
+    }
+}
+function show_fulldesc(hash) {
+    var full = document.getElementsByClassName("pkgdesc-full");
+    var l = full.length;
+    for (var i = 0; i < l; i++) {
+      if ((hash == "#all") | (hash == "#" + full[i].id)) {
+          full[i].style.display = "";
+      } else {
+        full[i].style.display = "none";
+      }
+    }
+}
+// ]]>
+  </script>
+  </head>
+  <body onload="show_fulldesc(window.location.hash)">
+    <div id="header">
+      <div id="upperheader">
+	<div id="logo">
+	  <a href="http://www.debian.org/" title="Debian Home">
+	    <img src= "http://www.debian.org/Pics/openlogo-50.png"
+		 alt="Debian" width="50" height= "61" /></a>
+	  </div>
+	  <p class="section">Pure Blend</p>
+	</div>
+	<div id="navbar">
+	  <ul>
+	    <li><a href="$projecturl">$projectname</a></li>
+	    <li><a href="../tasks">$packages</a></li>
+	    <li><a href="../contact.html">$contact</a></li>
+	    <li><a href="../contribute.html">$contribute</a></li>
+	  </ul>
+	</div>
+	<p id="breadcrumbs">
+	  <a href="http://blends.debian.org">Debian Pure Blends</a>
+	  / <a href="$projecturl">$projectname</a>
+	  / <a href="../tasks">$packages</a>
+	  / ${tasks[task].metapkg.PrintedName.capitalize()}
+	</p>
+      </div><!-- end header -->
+      <div id="content">
+	<p>
+	  <small>
+	    <a href="#all" onclick="show_fulldesc('#all');">Show all details</a>
+	    - <a href="#" onclick="show_fulldesc('#');">Hide all details</a>
+	  </small>
+	</p>
+	<h1>
+	  $projectname ${tasks[task].metapkg.PrintedName.capitalize()} packages
+	</h1>
+	<em py:choose="">
+	  <py:when test="lang in tasks[task].metapkg.desc">
+	    ${tasks[task].metapkg.desc[lang]['short']}
+	  </py:when>
+	  <py:otherwise>
+	    ${tasks[task].metapkg.desc['en']['short']}
+	  </py:otherwise>
+	</em>
+	<p py:choose="">
+	  <span py:when="lang in tasks[task].metapkg.desc">
+	    ${tasks[task].metapkg.desc[lang]['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="">
+	    ${tasks[task].metapkg.desc['en']['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>
+	</p>
+	<table width="90%">
+	  <py:for each="pstatus in dependencies[task]">
+	    <tr>
+	      <td colspan="3" style="border-top-style: none;">
+		<h2>
+		  <a id="${pstatus}-debs" name="${pstatus}-debs"/>
+		  ${headline[pstatus]}
+		</h2>
+<!--
+		<p>These packages are all under a
+		  <a href="https://www.debian.org/social_contract#guidelines">
+		    DFSG-free
+		  </a>
+		  license. They are automatically selected when the
+		  <a href="">astro-frameworks</a>
+		  package is going to be installed.
+		</p>
+-->
+	      </td>
+	    </tr>
+	    <tr class="header">
+	      <th>Package</th>
+	      <th>Version</th>
+	      <th>Description</th>
+	    </tr>
+	    <py:for each="project in projects[task][pstatus]">
+	      <tr id="${project.pkg}.short" class="pkgdesc-short">
+		<td>
+		  <a onclick="toggle_visibility('${project.pkg}');" style="cursor:pointer;">
+		    ${project.pkg.capitalize()}
+		  </a>
+		</td>
+		<td>
+		  <py:if test="project.version">
+		    <py:choose>
+		      <py:when test="isinstance(project.version[-1], (str, unicode))">
+			${project.version[-1]}
+		      </py:when>
+		      <py:otherwise>
+			<a href="http://packages.debian.org/${project.version[-1]['release']}/${project.pkg}">
+			  ${project.version[-1]['version']}
+			</a>
+		      </py:otherwise>
+		    </py:choose>
+		  </py:if>
+		</td>
+		<td>
+		  <a onclick="toggle_visibility('${project.pkg}');" style="cursor:pointer;">
+		    <py:choose>
+	              <py:when test="lang in project.desc">${project.desc[lang]['short']}</py:when>
+	              <py:otherwise>${project.desc['en']['short']}</py:otherwise>
+		    </py:choose>
+		  </a>
+		</td>
+	      </tr>
+	      <tr id="${project.pkg}" class="pkgdesc-full" style="display:none;">
+		<td colspan="3">
+		  <h3>
+		    ${project.pkg.capitalize()}:
+		    <py:choose>
+	              <py:when test="lang in project.desc">${project.desc[lang]['short']}</py:when>
+	              <py:otherwise>${project.desc['en']['short']}</py:otherwise>
+		    </py:choose>
+		  </h3>
+		  <dl>
+		    <py:choose>
+		      <py:when test="project.icon">
+			<dt class="screenshot">
+			  <img src="${project.icon}" alt=""/>
+			</dt>
+		      </py:when>
+		      <py:otherwise>
+			<dt>Description</dt>
+		      </py:otherwise>
+		    </py:choose>
+		    <dd>
+		      <py:choose>
+			<py:when test="lang in project.desc">${project.desc[lang]['long']}</py:when>
+			<py:otherwise>${project.desc['en']['long']}</py:otherwise>
+		      </py:choose>
+		    </dd>
+		    <py:if test="'published' in project.properties">
+		      <dt>Reference</dt>
+		      <dd>
+			<py:if test="'authors' in project.properties['published']">
+			  ${project.properties['published']['authors']}:
+			</py:if>
+			<py:choose>
+			  <py:when test="'url' in project.properties['published']">
+			    <py:choose>
+			      <py:when test="'title' in project.properties['published']">
+				<a href="${project.properties['published']['url']}">
+				  <em>${project.properties['published']['title']}.</em>
+				</a>
+			      </py:when>
+			      <py:otherwise>
+				<a href="${project.properties['published']['url']}">
+				  Link to publication
+				</a>
+			      </py:otherwise>
+			    </py:choose>
+			  </py:when>
+			  <py:when test="'doi' in project.properties['published']">
+			    <py:choose>
+			      <py:when test="'title' in project.properties['published']">
+				<a href="http://dx.doi.org/${project.properties['published']['doi']}">
+				  ${project.properties['published']['title']}.
+				</a>
+			      </py:when>
+			      <py:otherwise>
+				<a href="http://dx.doi.org/${project.properties['published']['doi']}">
+				  Link to publication</a>
+			      </py:otherwise>
+			    </py:choose>
+			  </py:when>
+			  <py:otherwise>
+			    <py:if test="'title' in project.properties['published']">
+			      ${project.properties['published']['title']}
+			    </py:if>
+			  </py:otherwise>
+			</py:choose>
+			<py:if test="'pubmed' in project.properties['published']">
+			  (<a href="http://www.ncbi.nlm.nih.gov/pubmed/${project.properties['published']['pubmed']}">PubMed</a></py:if><py:if test="'pubmed' in project.properties['published'] and 'eprint' in project.properties['published']">,</py:if><py:if test="'pubmed' not in project.properties['published'] and 'eprint' in project.properties['published']">(</py:if><py:if test="'eprint' in project.properties['published']"><a href="${project.properties['published']['eprint']}">eprint</a></py:if><py:if test="'pubmed' in project.properties['published'] or 'eprint' in project.properties['published']">)</py:if>
+			<py:if test="'journal' in project.properties['published']">${project.properties['published']['journal']}</py:if>
+			<py:if test="'volume' in project.properties['published']">${project.properties['published']['volume']}</py:if><py:if test="'number' in project.properties['published']">(${project.properties['published']['number']})</py:if><py:if test="'pages' in project.properties['published']">:${project.properties['published']['pages']}</py:if>
+			<py:if test="'year' in project.properties['published']">(${project.properties['published']['year']})</py:if>
+		      </dd>
+		    </py:if>
+		    <py:if test="project.responsible != None">
+		      <dt>${maintainer[pstatus]}</dt>
+		      <dd>
+			${project.responsible} 
+			<py:if test="project.properties.get('changed_by')">
+			  / ${project.properties['changed_by']}
+			</py:if>
+		      </dd>
+		    </py:if>
+		    <py:if test="project.version != []">
+		      <dt>Versions</dt>
+		      <dd>
+			<py:for each="version in project.version">
+			  <py:choose>
+			    <py:when test="isinstance(version, (str, unicode))">
+			      ${version}
+			    </py:when>
+			    <py:when test="'amd64' in version['archs'] or 'all' in version['archs']">
+			      ${version['version']}
+			      (<a href="https://packages.debian.org/${version['release']}/${project.pkg}">${version['release']}</a>),
+			    </py:when>
+			  </py:choose>
+			</py:for>
+		      </dd>
+		    </py:if>
+		    <py:if test="project.properties['Enhances'] != {}">
+		      <dt>Enhanced by</dt>
+		      <dd>
+			<py:for each="enh in project.properties['Enhances'].keys()">
+			  <a href="${project.properties['Enhances'][enh]}">${enh}</a>
+			</py:for>
+		      </dd>
+		    </py:if>
+		    <dt>Debian</dt>
+		    <dd>
+		      <py:if test="'wnpp' in project.properties">
+			<a href="http://bugs.debian.org/${project.properties['wnpp']}">Announcement</a> -
+		      </py:if>
+		      <a href="https://tracker.debian.org/pkg/${project.pkg}">Maintainer page</a>
+		      - <a href="https://bugs.debian.org/cgi-bin/pkgreport.cgi?repeatmerged=no&src=${project.pkg}">Bugs</a>
+		      <py:if test="project.properties['vcs-browser'] != '#'">
+			-
+			<py:choose>
+			  <py:when test="'vcs-url' in project.properties">
+			    <a href="${project.properties['vcs-browser']}" title="${project.properties['vcs-url']}">
+			      ${project.properties['vcs-type']}
+			    </a>
+			  </py:when>
+			  <py:otherwise>
+			    <a href="${project.properties['vcs-browser']}">
+			      ${project.properties['vcs-type']}
+			    </a>
+			  </py:otherwise>
+			</py:choose>
+		      </py:if>
+		    </dd>
+		    <py:if test="'homepage' in project.properties">
+		      <dt>Upstream</dt>
+		      <dd>
+			<a href="${project.properties['homepage']}">Home page</a>
+			<py:if test="'registration' in project.properties">
+			  - <a href="${project.properties['registration']}">Registration</a>
+			</py:if>
+		      </dd>
+		    </py:if>
+		    <py:if test="project.remark">
+		      <dt>Remark</dt>
+		      <dd>
+			<py:if test="project.remark['short']">${project.remark['short']}</py:if>
+			<py:if test="project.remark['long']">${project.remark['long']}</py:if>
+		      </dd>
+		    </py:if>
+		    <dt>Improve entry</dt>
+		    <dd>
+		      <a href="http://screenshots.debian.net/uploadfile?packagename=${project.pkg}">Screenshots</a>
+		      - <a href="http://debtags.alioth.debian.org/edit.html?pkg=${project.pkg}">Debtags</a>
+		      <py:if test="lang != 'en' and project.component == 'main' and project.pkgstatus != 'new' and project.pkgstatus != 'pkgvcs'">
+			<py:choose>
+			  <py:when test="lang in project.desc">
+			    - <a href="http://ddtp.debian.net/ddtss/index.cgi/${lang}/forexternalreview/${project.pkg}">${fixtranslation}</a>
+			  </py:when>
+			  <py:otherwise>
+			    - <a href="http://ddtp.debian.net/ddtss/index.cgi/${lang}/fetch?package=${project.pkg}">${translatedesc}</a>
+			  </py:otherwise>
+			</py:choose>
+		      </py:if>
+		    </dd>
+		  </dl>
+		</td>
+	      </tr>
+	    </py:for>
+	  </py:for>
+	</table>
+      </div>
+      <div id="footer">
+	<hr class="hidecss" />
+	<p>${langavail}</p>
+	<py:for each="l in languages">
+	  <span py:if="lang != l" class="navpara">
+	    <a href="${task}.${language_dict[l]['short']}.html" title="${language_dict[l]['title']}" hreflang="${language_dict[l]['htaccess']}" lang="${language_dict[l]['htaccess']}" rel="alternate">${language_dict[l]['printed']}</a>
+	  </span>
+	</py:for>
+	<p>${howtosetlang}</p>
+	<address>${updatetimestamp}</address>
+      </div>
+  </body>
+</html>

-- 
Static and dynamic websites for Debian Pure Blends



More information about the Blends-commit mailing list