]> git.deb.at Git - deb/packages.git/blobdiff - templates/html/show.tmpl
templates/html/show.tmpl: Make "Version" column of download table more readable
[deb/packages.git] / templates / html / show.tmpl
index 22856b0416abeba1fcbdebce7f1e8a457746507f..b7e2d72c4e28d049ad94df5ea0cce8435e54f5ab 100644 (file)
@@ -144,6 +144,11 @@ Do not install it on a normal Debian system.</p>
 </div>
 [% END %]
 
+<div id="ptablist">
+</div>
+
+[% IF desc %]
+<div id="pdesctab">
 <div id="pdesc">
 [% UNLESS is_virtual %]
        [% IF desc.short %]
@@ -184,9 +189,11 @@ Do not install it on a normal Debian system.</p>
     <dd>[% desc %]</dd>
   [% '</dl></div>' IF loop.last %]
 [% END %]
+</div> <!-- pdesctab -->
+[% END %]
 
 [% FOREACH binaries %]
-  [% IF loop.first %]<div class="pdesc">The following binary packages are built from this source package:<dl>[% END %]
+  [% IF loop.first %]<div id="pbinaries">The following binary packages are built from this source package:<dl>[% END %]
     <dt>[% IF available %]<a href="[% make_url(name,'','source','') %]">[% name %]</a>[% ELSE %][% name %][% END %]</dt>
     <dd>[% desc %]</dd>    
   [% '</dl></div>' IF loop.last %]
@@ -255,7 +262,16 @@ Do not install it on a normal Debian system.</p>
    filelist_url = pkg _ '/' _ d.arch _ '/filelist' %]
 <th><a href="[% make_url(download_url) | uri %]">[% d.arch %]</a>
 [%- SET a = d.archive; IF mirrors.$a.unofficial_port  %] <strong>(unofficial port)</strong>[% END %]</th>
-[% '<td>' _ d.version _ '</td>' 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 %]
+[% "<td class='$version_class'>$d.version</td>" IF versions.multiple %]
 <td class="size">[% d.pkgsize %]&nbsp;kB</td><td class="size">[% d.instsize %]&nbsp;kB</td>
 <td>
 [% IF contents_avail %]
@@ -295,3 +311,5 @@ Do not install it on a normal Debian system.</p>
   [%- END %]
 [% END %]
 
+<script type="text/javascript">init_tab_list("ptablist")</script>
+