From e3267460f5a73aba7118b0b90918981fd12099d1 Mon Sep 17 00:00:00 2001
From: Frank Lichtenheld
Date: Wed, 12 Sep 2007 02:12:56 +0200
Subject: [PATCH] Templates: Also display the suite's alias name in selected
places
---
templates/config/archive_layout.tmpl | 7 +++++++
templates/html/search.tmpl | 6 ++++--
templates/html/show.tmpl | 4 +++-
3 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/templates/config/archive_layout.tmpl b/templates/config/archive_layout.tmpl
index 1eacb16..6e501c7 100644
--- a/templates/config/archive_layout.tmpl
+++ b/templates/config/archive_layout.tmpl
@@ -2,4 +2,11 @@
main_section = 'main'
main_archive = 'us'
standard_priority = 'optional'
+
+ suite_aliases = {
+ sarge => 'oldstable',
+ etch => 'stable',
+ lenny => 'testing',
+ sid => 'unstable',
+ }
%]
diff --git a/templates/html/search.tmpl b/templates/html/search.tmpl
index 0bc23e6..faf582c 100644
--- a/templates/html/search.tmpl
+++ b/templates/html/search.tmpl
@@ -85,8 +85,10 @@ Please consider using a longer keyword or more keywords.
[% FOREACH packages %]
Package [% pkg %]
- [% FOREACH s IN suites %]
- - [% s.suite %][% ' (' _ s.subsection _ ')' IF s.subsection %]: [% s.desc %] [%- IF s.section != main_section %] [[% s.section %]][% END %]
+ [% FOREACH s IN suites;
+ suite = s.suite %]
+
- [% suite %]
+ [%- ' (' _ suite_aliases.$suite _ ')' IF suite_aliases.$suite %][% ' (' _ s.subsection _ ')' IF s.subsection %]: [% s.desc %] [%- IF s.section != main_section %] [[% s.section %]][% END %]
[% FOREACH s.versions %]
[% version %] [%- IF archive != main_archive %] [[% archive %]][% END %]: [% architectures.join(' ') %]
[% END %]
diff --git a/templates/html/show.tmpl b/templates/html/show.tmpl
index 2be8071..554f48f 100644
--- a/templates/html/show.tmpl
+++ b/templates/html/show.tmpl
@@ -9,7 +9,9 @@
[ 'hg', 'Hg', 'mercurial' ], ];
vcs_link = page.get_newest("vcs-browser");
-%]
-[%- nav_arr = [ { prefix=>'Distribution:', title=>'Overview over this suite', url=>make_url('/','','source',''), name=>suite }, ];
+[%- suite_name = suite;
+ SET suite_name = suite_name _ ' (' _ suite_aliases.$suite _ ')' IF suite_aliases.$suite;
+ nav_arr = [ { prefix=>'Distribution:', title=>'Overview over this suite', url=>make_url('/','','source',''), name=>suite_name }, ];
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 } ); -%]
--
2.39.2