r13928 - in /scripts/qa/templates: by_category by_category.js default.css

tincho-guest at users.alioth.debian.org tincho-guest at users.alioth.debian.org
Fri Feb 1 03:17:05 UTC 2008


Author: tincho-guest
Date: Fri Feb  1 03:17:05 2008
New Revision: 13928

URL: http://svn.debian.org/wsvn/?sc=1&rev=13928
Log:
Big template changes:
- Separated javascipt and css into two new files.
- Added DM-Upload check (from unstable).
- Added group-maintained/uploaded by group_email checks, both in svn and
  archive (from unstable).

Added:
    scripts/qa/templates/by_category.js
    scripts/qa/templates/default.css
Modified:
    scripts/qa/templates/by_category

Modified: scripts/qa/templates/by_category
URL: http://svn.debian.org/wsvn/scripts/qa/templates/by_category?rev=13928&op=diff
==============================================================================
--- scripts/qa/templates/by_category (original)
+++ scripts/qa/templates/by_category Fri Feb  1 03:17:05 2008
@@ -7,6 +7,45 @@
 [% USE CGI %]
 [% SET hide_binaries = CGI.param("hide_binaries") %]
 [% SET start_collapsed = CGI.param("start_collapsed") %]
+[% q_group_email = BLOCK %][% group_email | quotemeta %][% END %]
+
+[% BLOCK show_maint %]
+<div>Maintainer: [% data.maintainer.join(", ") | html %] </div>
+[% IF data.uploaders.length %]
+<div>Uploaders: [% data.uploaders.join(", ") | html %] </div>
+[% END #IF %]
+[% END #BLOCK %]
+
+[% BLOCK check_maint %]
+[% IF group_email %]
+[% IF ! data.maintainer.grep("<$q_group_email>").size %]
+[% IF ! data.uploaders.grep("<$q_group_email>").size %]
+<span class="popup">
+    <span class="non-group">[NG]</span>
+    <span class="balloon">
+        <div style="margin-bottom: 1em;">
+            The group is not maintainer nor uploader of this
+            package
+        </div>
+        [% PROCESS show_maint data = data %]
+    </span>
+</span>
+[% ELSE #maint %]
+<span class="popup">
+    <span class="non-maint">[NM]</span>
+    <span class="balloon">
+        <div style="margin-bottom: 1em;">
+            The group is not maintainer (but uploader) of this
+            package
+        </div>
+        [% PROCESS show_maint data = data %]
+    </span>
+</span>
+[% END #maint %]
+[% END #upldr %]
+[% END #email %]
+[% END #BLOCK %]
+
 [% BLOCK bts_link %]
 [% IF pkg.bts.size %]
 <div class="bts-info"><div class=" popup"><a href="http://bugs.debian.org/$pkg.name"
@@ -22,7 +61,7 @@
         [% SET F = pkg.bts.$bug.forwarded %]
         [% qm = BLOCK %]^https?:[% FILTER quotemeta %]//rt.cpan.org/[% END %].+html\?id=(\d+)[% '$' %][% END %]
         [% rt = F.match(qm) %]
-        <div style="font-size: smaller">
+        <div class="bts-forwarded">
             [% IF rt.0 %]
             <a href="$F">cpan#[% rt.0 %]</a>
             [% ELSE %]
@@ -31,7 +70,7 @@
         </div>
         [% END %]
         [% IF pkg.bts.$bug.keywordsA.size > 0 %]
-        <div style="font-size: smaller">
+        <div class="bts-keywords">
             [% pkg.bts.$bug.keywordsA.join(", ") | html %]
         </div>
         [% END %]
@@ -53,26 +92,28 @@
     [% SET svn_ver = pkg.svn.version %]
     [% SET svn_un_ver = pkg.svn.un_version %]
     <tr>
-        <td>[% IF pkg.notes.size %]<span class="popup">$pkg.name<span
-                    class="balloon" style="margin-left:0">[% 
+        <td class="pkg">[%
+            IF pkg.notes.size %]<span class="popup">$pkg.name<span
+                    class="balloon">[% 
                     pkg.notes.join(', ')
                     %]</span></span>[% ELSE %]$pkg.name[% END %]
             [% IF pkg.svn.section AND pkg.svn.section != "main" %]
             <span class="section-$pkg.svn.section">[$pkg.svn.section]</span>
             [% END #IF %]
+            [% PROCESS check_maint data = pkg.svn %]
             [% IF ! hide_binaries
                 AND pkg.svn.binaries AND pkg.svn.binaries.size
                 AND (
                     pkg.svn.binaries.size > 1
                     OR pkg.svn.binaries.first != pkg.name
-                ) %]<br/><span style="font-size: smaller">([%
+                ) %]<br/><span class="binary-packages">([%
                 pkg.svn.binaries.join(', ') %])</span>[% END %]
         </td>
 
         <td[% IF pkg.hilight.svn %] class="todo"[% END %]>
             [% chlog_url = BLOCK %][% pkg.name | format("$wsvn_url")
             %]/debian/changelog?op=file&amp;rev=0&amp;sc=0[% END %]
-            <span class="popup"><a href="$chlog_url">$svn_ver</a><span
+            <span class="popup svn-rel"><a href="$chlog_url">$svn_ver</a><span
                     id="${pkg.name}_rel_chlog_baloon" class="balloon"><a
                         href="javascript:more_chlog('$pkg.name','rel')">[%
                         pkg.svn.changer | html %] &mdash; [% pkg.svn.date |
@@ -80,7 +121,7 @@
             </span></span>
 
             [% IF svn_un_ver AND (svn_un_ver != svn_ver) %]
-            <span class="popup" style="font-size: smaller"><a
+            <span class="popup svn-unrel"><a
                     href="$chlog_url">($svn_un_ver)</a><span
                     id="${pkg.name}_unrel_chlog_baloon" class="balloon"><a
                         href="javascript:more_chlog('$pkg.name','unrel')">[%
@@ -99,6 +140,14 @@
             [% IF arch_src AND arch_src != "unstable" %]
             ($arch_src)
             [% END #IF %]
+            [% IF pkg.archive.control.dm_allowed %]
+            <span class="popup"><span class="dm-enabled">[DMUA]</span>
+                <span class="balloon">
+                    [% PROCESS show_maint data = pkg.archive.control %]
+                </span>
+            </span>
+            [% END #IF %]
+            [% PROCESS check_maint data = pkg.archive.control %]
         </td>
 
         <td>[% INCLUDE bts_link pkg=pkg %]</td>
@@ -112,7 +161,7 @@
             [% IF pkg.hilight.upstream AND pkg.watch.error %]<a
                 href="[% "${pkg.name}" | format("$wsvn_url")
                         %]/debian/copyright?op=file&amp;rev=0&amp;sc=0"
-                >(copyright info)</a>
+                class="watch-cp-info">(copyright info)</a>
             [% END %]
             </td>
     </tr>
@@ -145,166 +194,12 @@
 <head>
     <title>${group_name} packages overview</title>
     <style type="text/css">
-        body {
-            background: white;
-            color: black;
-            margin: 0;
-            padding: 8px;
-        }
-        table {
-            border: 1px solid black;
-            border-collapse: collapse;
-            empty-cells: show;
-        }
-        td, th {
-            border: 1px solid black;
-            padding: 0.2em;
-        }
-        th.clickable, th.clickable a, th.clickable a:visited {
-            background: #404040;
-            color: white;
-        }
-        a {
-            text-decoration: none;
-        }
-/*  before enabling this, think about the link colors -- they all have to
-    be visible with the new background
-        tr:hover td, tr:hover th {
-            background: #F5F5B5;
-            color: black;
-        }
-*/
-        #main_table {
-            width: 95%;
-        }
-        .todo {
-            background: #ADDBE6;    /* lightblue */
-        }
-        .section-non-free { color: red; }
-        .section-contrib { color: maroon; }
-        .bts-wishlist {
-            color: green;
-        }
-        .bts-minor {
-            color: #004000;  /* darkgreen */
-        }
-        .bts-normal, .bts-important {
-        }
-        .bts-grave, .bts-serious {
-            color: red;
-        }
-        .bts-critical {
-            color: red;
-            text-decoration: blink;
-        }
-        /* From ikiwiki templates */
-        .popup {
-            border-bottom: 1px dotted;
-        }
-        .popup .balloon,
-        .popup .paren,
-        .popup .expand {
-            display: none;
-        }
-        .popup:hover .balloon,
-        .popup:focus .balloon {
-            position: absolute;
-            display: block;
-            min-width: 15em;
-            max-width: 40em;
-            max-height: 75%;
-            overflow: auto;
-            margin: 0em 0 0 -15em;
-            padding: 0.5em;
-            border: 2px outset #F5F5B5;     /* light yellowish */
-            background: #F5F5B5;            /* light yellowish */
-            color: black;
-            /* Nonstandard, but very nice. */
-            opacity: 0.95;
-            -moz-opacity: 0.95;
-            filter: alpha(opacity=95);
-        }
-        table.bts-info-details td:first-child {
-            text-align: center;
-        }
-        div.bts-info div.popup {
-            text-align: center;
-        }
-        .bts-info-details p {
-            text-indent: -3em;
-            margin: 0 0 0 3em;
-        }
-        table.bts-info-details td {
-            border: 0;
-            vertical-align: top;
-            text-align: left;
-        }
-        #options {
-            float: left;
-            padding: .5em;
-            border: 1px black dashed;
-            margin-bottom: 1em;
-        }
-        #options h2 { font-size: 110%; margin: 0; }
-        #options div { display: none }
-        #w3org { clear: both; }
+        [% INCLUDE default.css %]
     </style>
     <script type="text/javascript">
         //<![CDATA[
         <!--
-        function toggle_visibility(id)
-        {
-            var el = document.getElementById(id);
-            el.style.display = (el.style.display == 'none' ? 'table-row-group' : 'none');
-        }
-        function more_chlog(pkg,rel)
-        {
-            var xml;
-            if (window.XMLHttpRequest) {
-                xml = new XMLHttpRequest();
-            } else if (window.ActiveXObject) {
-                xml = new ActiveXObject("Microsoft.XMLHTTP");
-            } else {
-                alert("Your browser lacks the needed ability to use Ajax. Sorry.");
-                return false;
-            }
-
-            xml.open('GET', 'qareport-chlog.cgi?pkg='+pkg+';rel='+rel);
-
-            xml.onreadystatechange = function() {
-                ajaxStateChanged(xml, pkg, rel);
-            };
-
-            xml.send('');
-        }
-        function ajaxStateChanged(xml, pkg, rel)
-        {
-            var el = document.getElementById(pkg+'_'+rel+'_chlog_baloon');
-            if( !el )
-            {
-                alert('Element "'+pkg+'_'+rel+'_chlog_baloon'+'" not found');
-                return false;
-            }
-            if( xml.readyState <= 1 )
-            {
-                el.innerHTML = el.innerHTML + "<br/>Loading...";
-            }
-            if( xml.readyState == 3 )
-            {
-                el.innerHTML = el.innerHTML + ".";
-            }
-            if( xml.readyState == 4 )
-            {
-                if( xml.status == 200 )
-                {
-                    el.innerHTML = xml.responseText;
-                }
-                else
-                {
-                    el.innerHTML = xml.status+': '+xml.StatusText;
-                }
-            }
-        }
+        [% INCLUDE by_category.js %]
         //-->
         //]]>
     </script>
@@ -368,7 +263,7 @@
         alt="Valid CSS!" /></a>
 </p>
 [% META id='$Id$' %]
-<p style="border-top: 1px solid black">
+<p id="page_id">
     <code>$template.id</code>
 </p>
 </body>

Added: scripts/qa/templates/by_category.js
URL: http://svn.debian.org/wsvn/scripts/qa/templates/by_category.js?rev=13928&op=file
==============================================================================
--- scripts/qa/templates/by_category.js (added)
+++ scripts/qa/templates/by_category.js Fri Feb  1 03:17:05 2008
@@ -1,0 +1,53 @@
+function toggle_visibility(id)
+{
+    var el = document.getElementById(id);
+    el.style.display = (el.style.display == 'none' ? 'table-row-group' : 'none');
+}
+function more_chlog(pkg,rel)
+{
+    var xml;
+    if (window.XMLHttpRequest) {
+	xml = new XMLHttpRequest();
+    } else if (window.ActiveXObject) {
+	xml = new ActiveXObject("Microsoft.XMLHTTP");
+    } else {
+	alert("Your browser lacks the needed ability to use Ajax. Sorry.");
+	return false;
+    }
+
+    xml.open('GET', 'qareport-chlog.cgi?pkg='+pkg+';rel='+rel);
+
+    xml.onreadystatechange = function() {
+	ajaxStateChanged(xml, pkg, rel);
+    };
+
+    xml.send('');
+}
+function ajaxStateChanged(xml, pkg, rel)
+{
+    var el = document.getElementById(pkg+'_'+rel+'_chlog_baloon');
+    if( !el )
+    {
+	alert('Element "'+pkg+'_'+rel+'_chlog_baloon'+'" not found');
+	return false;
+    }
+    if( xml.readyState <= 1 )
+    {
+	el.innerHTML = el.innerHTML + "<br/>Loading...";
+    }
+    if( xml.readyState == 3 )
+    {
+	el.innerHTML = el.innerHTML + ".";
+    }
+    if( xml.readyState == 4 )
+    {
+	if( xml.status == 200 )
+	{
+	    el.innerHTML = xml.responseText;
+	}
+	else
+	{
+	    el.innerHTML = xml.status+': '+xml.StatusText;
+	}
+    }
+}

Added: scripts/qa/templates/default.css
URL: http://svn.debian.org/wsvn/scripts/qa/templates/default.css?rev=13928&op=file
==============================================================================
--- scripts/qa/templates/default.css (added)
+++ scripts/qa/templates/default.css Fri Feb  1 03:17:05 2008
@@ -1,0 +1,138 @@
+/* vim:ts=4:sw=4:et:ai:sts=4:syntax=css
+ */
+body {
+    background: white;
+    color: black;
+    margin: 0;
+    padding: 8px;
+}
+table {
+    border: 1px solid black;
+    border-collapse: collapse;
+    empty-cells: show;
+}
+td, th {
+    border: 1px solid black;
+    padding: 0.2em;
+}
+th.clickable, th.clickable a, th.clickable a:visited {
+    background: #404040;
+    color: white;
+}
+a {
+    text-decoration: none;
+}
+/*  before enabling this, think about the link colors -- they all have to
+be visible with the new background
+tr:hover td, tr:hover th {
+background: #F5F5B5;
+color: black;
+}
+ */
+/* From ikiwiki templates */
+.popup {
+    border-bottom: 1px dotted;
+}
+.popup .balloon,
+.popup .paren,
+.popup .expand {
+    display: none;
+}
+.popup:hover .balloon,
+.popup:focus .balloon {
+    position: absolute;
+    display: block;
+    min-width: 15em;
+    max-width: 40em;
+    max-height: 75%;
+    overflow: auto;
+    margin: 0em 0 0 -15em;
+    padding: 0.5em;
+    border: 2px outset #F5F5B5;     /* light yellowish */
+    background: #F5F5B5;            /* light yellowish */
+    color: black;
+    /* Nonstandard, but very nice. */
+    opacity: 0.95;
+    -moz-opacity: 0.95;
+    filter: alpha(opacity=95);
+}
+#main_table {
+    width: 95%;
+}
+.pkg .popup .balloon {
+    margin-left: 0;
+}
+.todo {
+    background: #ADDBE6;    /* lightblue */
+}
+.non-group {
+    font-size: smaller;
+    font-weight: bold;
+    color: red;
+}
+.non-maint {
+    font-size: smaller;
+    font-weight: bold;
+    color: maroon;
+}
+.dm-enabled {
+    font-size: smaller;
+    font-weight: bold;
+}
+.binary-packages {
+    font-size: smaller;
+}
+.svn-unrel {
+    font-size: smaller;
+}
+.section-non-free { color: red; }
+.section-contrib { color: maroon; }
+.bts-wishlist {
+    color: green;
+}
+.bts-minor {
+    color: #004000;  /* darkgreen */
+}
+.bts-normal, .bts-important {
+}
+.bts-grave, .bts-serious {
+    color: red;
+}
+.bts-critical {
+    color: red;
+    text-decoration: blink;
+}
+.bts-keywords {
+    font-size: smaller;
+}
+.bts-forwarded {
+    font-size: smaller;
+}
+table.bts-info-details td:first-child {
+    text-align: center;
+}
+div.bts-info div.popup {
+    text-align: center;
+}
+.bts-info-details p {
+    text-indent: -3em;
+    margin: 0 0 0 3em;
+}
+table.bts-info-details td {
+    border: 0;
+    vertical-align: top;
+    text-align: left;
+}
+.watch-cp-info {
+    font-size: smaller;
+}
+#options {
+    float: left;
+    padding: .5em;
+    border: 1px black dashed;
+    margin-bottom: 1em;
+}
+#options h2 { font-size: 110%; margin: 0; }
+#options div { display: none }
+#w3org { clear: both; }
+#page_id { border-top: 1px solid black; }




More information about the Pkg-perl-cvs-commits mailing list