From: Frank Lichtenheld
Date: Sat, 9 Jun 2007 21:24:24 +0000 (+0200)
Subject: templates/html/show.tmpl: Make "Version" column of download table more readable
X-Git-Url: https://git.deb.at/w?a=commitdiff_plain;h=26a5ae96402afc64e995356c88bfc2ea08eb1b3d;p=deb%2Fpackages.git
templates/html/show.tmpl: Make "Version" column of download table more readable
Previously it was sometimes difficult to spot differences in the versions,
especially if the are only in the Debian revision. Color code the
background so that one can spot differences easier. All up-to-date
versions are indicated with a green background. If the version differs
from the latest version only in the Debian revision, use yellow.
If they differ in the upstream revision, use red.
Inspired by discussion with Neil Williams
---
diff --git a/static/packages.css.sed.in b/static/packages.css.sed.in
index 6e40266..1b2defe 100644
--- a/static/packages.css.sed.in
+++ b/static/packages.css.sed.in
@@ -183,6 +183,15 @@ table#pdeplegend, #pdownload table {
#pdownloadmeta tr {
text-align: left;
}
+#pdownload .vcurrent {
+ background-color: #bfb;
+}
+#pdownload .volder {
+ background-color: #ffb;
+}
+#pdownload .vold {
+ background-color: #fbb;
+}
/*
diff --git a/templates/html/show.tmpl b/templates/html/show.tmpl
index 1f12d7c..b7e2d72 100644
--- a/templates/html/show.tmpl
+++ b/templates/html/show.tmpl
@@ -262,7 +262,16 @@ Do not install it on a normal Debian system.
filelist_url = pkg _ '/' _ d.arch _ '/filelist' %]
[% d.arch %]
[%- SET a = d.archive; IF mirrors.$a.unofficial_port %] (unofficial port)[% END %] |
-[% '' _ d.version _ ' | ' IF versions.multiple %]
+[% vnorm = d.version.replace( '\+b\d+$', '' ); vlatest = version.replace( '\+b\d+$', '' );
+ vup = vnorm.replace( '-[^-]+$', '' ); vuplatest = vlatest.replace( '-[^-]+$', '' );
+ IF vnorm == vlatest;
+ version_class = 'vcurrent';
+ ELSIF vup == vuplatest;
+ version_class = 'volder';
+ ELSE;
+ version_class = 'vold';
+ END %]
+[% "$d.version | " IF versions.multiple %]
[% d.pkgsize %] kB | [% d.instsize %] kB |
[% IF contents_avail %]
|