From: Frank Lichtenheld
Date: Sat, 2 Jun 2007 21:30:14 +0000 (+0200)
Subject: templates/html/show.tmpl: Denote unofficial ports
X-Git-Url: https://git.deb.at/?a=commitdiff_plain;h=b688b16487ef2ca8ad7861d7c20da16a9f3f4448;p=deb%2Fpackages.git
templates/html/show.tmpl: Denote unofficial ports
Get this information by 1) exposing the archive in the
%downloads hash 2) using config/mirrors.tmpl to determine
whether this archive is an unofficial port
---
diff --git a/lib/Packages/DoShow.pm b/lib/Packages/DoShow.pm
index cfe7a90..05baeff 100644
--- a/lib/Packages/DoShow.pm
+++ b/lib/Packages/DoShow.pm
@@ -201,6 +201,7 @@ sub do_show {
instsize => $sizes_inst->{$a}, );
$d{version} = $versions->{$a} if $multiple_versions;
+ $d{archive} = $archives->{$a};
if ( ($suite ne "experimental")
&& ($subsection ne 'debian-installer')) {
$d{contents_avail} = 1;
diff --git a/templates/html/show.tmpl b/templates/html/show.tmpl
index fd10281..b6b939e 100644
--- a/templates/html/show.tmpl
+++ b/templates/html/show.tmpl
@@ -1,4 +1,5 @@
[% PROCESS 'config/archive_layout.tmpl' %]
+[% PROCESS 'config/mirrors.tmpl' %]
[%- nav_arr = [ { prefix=>'Distribution:', title=>'Overview over this suite', url=>make_url('/','','source',''), name=>suite }, ];
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 } );
@@ -239,7 +240,7 @@ Do not install it on a normal Debian system.
[%- END %]
[% END %]
-[% FOREACH downloads %]
+[% FOREACH d IN downloads %]
[% IF loop.first -%]
Download [% pkg %]
@@ -250,11 +251,12 @@ Do not install it on a normal Debian system.
[%- END %]
-[% download_url = pkg _ '/' _ arch _ '/download'
- filelist_url = pkg _ '/' _ arch _ '/filelist' %]
-[% arch %] |
-[% '' _ version _ ' | ' IF versions.multiple %]
-[% pkgsize %] kB | [% instsize %] kB |
+[% download_url = pkg _ '/' _ d.arch _ '/download'
+ 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 %]
+[% d.pkgsize %] kB | [% d.instsize %] kB |
[% IF contents_avail %]
[list of files]
|