]> git.deb.at Git - deb/packages.git/blobdiff - templates/html/show.tmpl
html/newpkg.tmpl: Expose mode=byage in UI
[deb/packages.git] / templates / html / show.tmpl
index 1f12d7c0ad188558cb11594053cb5d4735f31e5f..88274f4b81dc7bcc3819fe0eb55244edd86303e2 100644 (file)
@@ -4,10 +4,12 @@
     nav_arr.push( { title => 'Source packages', url=>make_url('/'), name=>'Source' } ) IF is_source;
     nav_arr.push( { prefix=>'Section:', title=>'All packages in this section', url=>make_url("$subsection/"), name=>subsection } );
     nav_arr.push( { prefix=>'Package:', name=>pkg } ); -%]
+[% desclang = 'en';
+   SET desclang = lang IF desc.$lang.long %]
 [%- PROCESS 'html/head.tmpl'
    title_tag = ( is_source ? "Details of source package $pkg in $suite"
                           : "Details of package $pkg in $suite" )
-   description = desc
+   description = desc.$desclang.short
    keywords = "$suite, $archive, $section, $subsection, $version"
    print_search_field = 'packages'
    search_field_values = { 
 <p>Homepage: <a href="[% url | uri %]">[% url | html %]</a></p>
 [% END %]
 
+[% FOREACH sim IN similar %]
+       [% IF loop.first %]
+       <h3>Similar packages:</h3>
+       <ul>
+       [% END %]
+       <li><a href="/[% sim %]">[% sim %]</a></li>
+       [% '</ul>' IF loop.last %]
+[% END %]
+
 </div> <!-- end pmoreinfo -->
 [% END %]
 
@@ -151,9 +162,9 @@ Do not install it on a normal Debian system.</p>
 <div id="pdesctab">
 <div id="pdesc">
 [% UNLESS is_virtual %]
-       [% IF desc.short %]
-       <h2>[% desc.short %]</h2>
-       <p>[% desc.long %]
+       [% IF desc.$desclang.short %]
+       <h2>[% desc.$desclang.short %]</h2>
+       <p>[% desc.$desclang.long %]
        [% END %]
 [% ELSE %]
        <p>This is a <em>virtual package</em>. See the <a href="[% policy_url %]">Debian policy</a> for a <a href="[% policy_url %]ch-binary.html#s-virtual_pkg">definition of virtual packages</a>.</p>
@@ -262,10 +273,19 @@ 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 %]
+[% IF d.contents_avail %]
   [<a href="[% make_url(filelist_url) | uri %]">list of files</a>]
 [% ELSE %]
   no current information
@@ -304,3 +324,4 @@ Do not install it on a normal Debian system.</p>
 
 <script type="text/javascript">init_tab_list("ptablist")</script>
 
+[%- PROCESS 'html/foot.tmpl' -%]