The following commit has been merged in the master branch:
commit 51b0da2886df6019d5be3662e799e3ea9eb0add4
Author: Ole Streicher <deb...@liska.ath.cx>
Date:   Mon Dec 7 14:55:29 2015 +0100

    Add screenshot tooltip; use icon for debtags/translation editing links

diff --git a/webtools/templates/packages.xhtml 
b/webtools/templates/packages.xhtml
index 097f160..2dd4d0a 100644
--- a/webtools/templates/packages.xhtml
+++ b/webtools/templates/packages.xhtml
@@ -13,6 +13,9 @@
     <link href="http://blends.debian.org/css/blends.css"; rel="stylesheet"
          type="text/css" />
     <style type="text/css">
+.tooltip {
+       display:none;
+}
 .pkgdesc-full {
     background-image: none;
     background:#f8f8ff;
@@ -63,6 +66,9 @@
     width: 1px;
     white-space: nowrap;
 }
+.pkgdesc-short a:hover:not(:link):not(:visited) {
+    color: grey;
+}
 ul.desc-inline {
     padding: 0;
     margin: 0;
@@ -74,6 +80,12 @@ ul.desc-inline li {
 ul.desc-inline li + li::before {
     content: " \2022 ";
 }
+a.editlink {
+    float: left;
+    position: relative;
+    text-decoration-line: unset;
+    padding-right: 0.5em;
+}
     </style>
     <link rel="shortcut icon" href="http://www.debian.org/favicon.ico"; />
     <script type="text/javascript">
@@ -103,6 +115,7 @@ function show_fulldesc(hash) {
   </script>
   </head>
   <body onload="show_fulldesc(window.location.hash)">
+    <script type="text/javascript" 
src="http://blends.debian.org/js/wz_tooltip.js";></script>
     <div id="header">
       <div id="upperheader">
        <div id="logo">
@@ -236,7 +249,21 @@ function show_fulldesc(hash) {
                    <py:choose>
                      <py:when test="project.icon">
                        <dt class="screenshot">
-                         <img src="${project.icon}" alt="Description:"/>
+                         <span class="tooltip" id="${project.pkg}-screenshot">
+                           <img src="${project.image}" />
+                           <table py:if="project.screenshots != []" 
class="versionclass">
+                             <tr><th colspan="3"
+                                     class="versionclass"><strong>Other 
screenshots of package ${project.pkg}</strong></th></tr>
+                             <tr><th class="version">Version</th><th 
class="archs">URL</th></tr>
+                             <py:for each="screenshot in project.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 
href="http://screenshots.debian.net/package/${project.pkg}";>
+                           <img 
onmouseover="TagToTip('${project.pkg}-screenshot')" onmouseout="UnTip()"
+                                src="${project.icon}" alt="Description:"/>
+                         </a>
                        </dt>
                      </py:when>
                      <py:otherwise>
@@ -245,7 +272,12 @@ function show_fulldesc(hash) {
                    </py:choose>
                    <dd>
                      <py:choose>
-                       <py:when test="lang in 
project.desc">${project.desc[lang]['long']}</py:when>
+                       <py:when test="lang in project.desc">
+                         <a class="editlink" 
href="http://ddtp.debian.net/ddtss/index.cgi/${lang}/forexternalreview/${project.pkg}";>
+                           &#9999;
+                         </a>
+                         ${project.desc[lang]['long']}
+                       </py:when>
                        
<py:otherwise>${project.desc['en']['long']}</py:otherwise>
                      </py:choose>
                    </dd>
@@ -338,8 +370,11 @@ function show_fulldesc(hash) {
                      </dd>
                    </py:if>
                  <py:if test="project.debtags">
-                   <dt>Debtags</dt>
+                   <dt>Tags</dt>
                    <dd>
+                     <a class="editlink" 
href="http://debtags.alioth.debian.org/edit.html?pkg=${project.pkg}";>
+                       &#9999;
+                     </a>
                      <ul class="desc-inline">
                        <py:for each="debtag in project.debtags">
                          <li>
@@ -427,35 +462,32 @@ function show_fulldesc(hash) {
                        <py:if 
test="project.remark['long']">${project.remark['long']}</py:if>
                      </dd>
                    </py:if>
-                   <dt>Improve entry</dt>
-                   <dd>
-                     <ul class="desc-inline">
-                       <li>
-                         <a 
href="http://screenshots.debian.net/uploadfile?packagename=${project.pkg}";>
-                           Screenshots
-                         </a>
-                       </li>
-                       <li>
-                         <a 
href="http://debtags.alioth.debian.org/edit.html?pkg=${project.pkg}";>Debtags</a>
-                       </li>
-                       <py:if test="lang != 'en' and project.component == 
'main' and project.pkgstatus != 'new' and project.pkgstatus != 'pkgvcs'">
-                         <li>
-                           <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 test="project.component == 'main'
+                                and project.pkgstatus != 'new'
+                                and project.pkgstatus != 'pkgvcs'
+                                and (not project.icon or not project.debtags 
+                                or (lang != 'en' and lang not in 
project.desc))">
+                     <dt>Improve entry</dt>
+                     <dd>
+                       <ul class="desc-inline">
+                         <li py:if="not project.icon">
+                           <a 
href="http://screenshots.debian.net/uploadfile?packagename=${project.pkg}";>
+                             Upload Screenshot
+                           </a>
                          </li>
-                       </py:if>
-                     </ul>
-                   </dd>
+                         <li py:if="not project.debtags">
+                           <a 
href="http://debtags.alioth.debian.org/edit.html?pkg=${project.pkg}";>
+                             Create tags
+                           </a>
+                         </li>
+                         <li py:if="lang != 'en' and lang not in project.desc">
+                           <a 
href="http://ddtp.debian.net/ddtss/index.cgi/${lang}/fetch?package=${project.pkg}";>
+                             ${translatedesc}
+                           </a>
+                         </li>
+                       </ul>
+                     </dd>
+                   </py:if>
                  </dl>
                </td>
              </tr>

-- 
Static and dynamic websites for Debian Pure Blends

_______________________________________________
Blends-commit mailing list
Blends-commit@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/blends-commit

Reply via email to