From f6f9ce6249b61d2c07b12058152bfc4de92be10b Mon Sep 17 00:00:00 2001 From: Paul Wise Date: Tue, 11 Nov 2008 16:14:26 +0900 Subject: [PATCH] Add links for non-default sections, repositories etc Closes: #440641 Signed-off-by: Simon Paillard --- templates/config/archive_layout.tmpl | 6 ++++++ templates/config/mirrors.tmpl | 4 ++++ templates/html/search.tmpl | 6 +++--- templates/html/show.tmpl | 6 +++--- templates/html/util.inc | 2 +- 5 files changed, 17 insertions(+), 7 deletions(-) diff --git a/templates/config/archive_layout.tmpl b/templates/config/archive_layout.tmpl index 36ae346..c563e6e 100644 --- a/templates/config/archive_layout.tmpl +++ b/templates/config/archive_layout.tmpl @@ -16,4 +16,10 @@ 'non-free' => g('packages that do not meet the Debian Free Software Guidelines'), } + section_urls = { + main => 'http://www.debian.org/doc/debian-policy/ch-archive.html#s-main', + contrib => 'http://www.debian.org/doc/debian-policy/ch-archive.html#s-contrib', + 'non-free' => 'http://www.debian.org/doc/debian-policy/ch-archive.html#s-non-free', + } + %] diff --git a/templates/config/mirrors.tmpl b/templates/config/mirrors.tmpl index 7c852e9..92c0e2d 100644 --- a/templates/config/mirrors.tmpl +++ b/templates/config/mirrors.tmpl @@ -11,6 +11,7 @@ mirrors = { us => { + url => 'http://www.debian.org/', mirror_list => 'http://www.debian.org/mirror/list', north_america => [ "ftp.us.debian.org/debian", @@ -89,6 +90,7 @@ mirrors = { }, volatile => { + url => 'http://www.debian.org/volatile/', title => g('volatile packages that need major changes during the life of a stable release'), mirror_list => 'http://www.debian.org/volatile/volatile-mirrors', europa => [ @@ -129,6 +131,7 @@ mirrors = { }, backports => { + url => 'http://www.backports.org/', title => g('newer packages that have been adapted to stable releases of Debian'), mirror_list => 'http://www.backports.org/debian/README.mirrors.html', europa => [ @@ -157,6 +160,7 @@ mirrors = { }, debports => { + url => 'http://www.debian-ports.org/', title => g('ports of packages to architectures not yet or not anymore available in Debian'), mirror_list => 'http://wiki.debian.org/DebianPorts/Mirrors', unofficial_port => { diff --git a/templates/html/search.tmpl b/templates/html/search.tmpl index 4503526..683d8bc 100644 --- a/templates/html/search.tmpl +++ b/templates/html/search.tmpl @@ -123,9 +123,9 @@
  • [% suite %] [%- ' (' _ suite_aliases.$suite _ ')' IF suite_aliases.$suite %][% ' (' _ s.subsection _ ')' IF s.subsection %]: [% PROCESS desc_i18n trans_desc=s.trans_desc desc=s.desc %] - [%- PROCESS marker text=section title=section_titles.$section IF section && section != main_section %] + [%- PROCESS marker text=section title=section_titles.$section url=section_urls.$section IF section && section != main_section %] [% FOREACH s.versions %] -
    [% version %] [%- IF archive != main_archive %] [[% archive %]][% END %]: [% architectures.join(' ') %] +
    [% version %] [%- IF archive != main_archive %] [[% IF mirrors.$archive.url %][% END %][% archive %][% IF mirrors.$archive.url %][% END %]][% END %]: [% architectures.join(' ') %] [% END %] [% IF s.providers %]
    [% IF s.versions.size > 0; g('also provided by:'); ELSE; g('provided by:'); END %] @@ -143,7 +143,7 @@ [% origin = (archive == main_archive) ? suite : "$suite/$archive"; js_id = string2id("$pkg$suite$archive") %]
  • [% origin %] ([% subsection %]): [% version %] - [%- PROCESS marker text=section title=section_titles.$section IF section %] [%- PROCESS marker text=real_archive title=mirrors.$real_archive.title IF real_archive %] + [%- PROCESS marker text=section title=section_titles.$section url=section_urls.$section IF section %] [%- PROCESS marker text=real_archive title=mirrors.$real_archive.title url=mirrors.$real_archive.url IF real_archive %]
    [% g('Binary packages:') %] [% FOREACH binary IN binaries.sort %][% binary %][% ', ' UNLESS loop.last %][% END %] [% IF binaries.size > 10 %] diff --git a/templates/html/show.tmpl b/templates/html/show.tmpl index 37ea4bf..ec71a19 100644 --- a/templates/html/show.tmpl +++ b/templates/html/show.tmpl @@ -56,9 +56,9 @@ [% ELSE %]

    [% g('Package: %s (%s)', pkg, versions.short) %] [% END %] -[%- PROCESS marker text=archive title=mirrors.$archive.title IF archive && archive != main_archive %] -[%- PROCESS marker text=section title=section_titles.$section IF section && section != main_section %] -[%- PROCESS marker text=g('essential') title=g('package manager will refuse to remove this package by default') IF page.get_newest('essential') == 'yes' %]

    +[%- PROCESS marker text=archive title=mirrors.$archive.title url=mirrors.$archive.url IF archive && archive != main_archive %] +[%- PROCESS marker text=section title=section_titles.$section url=section_urls.$section IF section && section != main_section %] +[%- PROCESS marker text=g('essential') title=g('package manager will refuse to remove this package by default') url='http://www.debian.org/doc/debian-policy/ch-binary.html#s3.8' IF page.get_newest('essential') == 'yes' %] [% UNLESS is_virtual %]
    diff --git a/templates/html/util.inc b/templates/html/util.inc index cabc6a7..db298d8 100644 --- a/templates/html/util.inc +++ b/templates/html/util.inc @@ -7,7 +7,7 @@ [%- END -%]  ] [%- END -%] -[% BLOCK marker %] [[% text %]] [%- END %] +[% BLOCK marker %] [[% IF url %][% END %][% text %][% IF url %][% END %]] [%- END %] [%- BLOCK desc_i18n; IF trans_desc.$ddtp_lang; trans_desc.$ddtp_lang | html; -- 2.39.2