From: Frank Lichtenheld Date: Fri, 24 Nov 2006 01:29:46 +0000 (+0000) Subject: Fix the nav bars to make more sense for source pages X-Git-Url: https://git.deb.at/w?a=commitdiff_plain;h=39651deecd6d21672d804d2aca78dbc731dfbea2;p=deb%2Fpackages.git Fix the nav bars to make more sense for source pages --- diff --git a/templates/html/index.tmpl b/templates/html/index.tmpl index 8985294..dc44e99 100644 --- a/templates/html/index.tmpl +++ b/templates/html/index.tmpl @@ -2,13 +2,17 @@ [% pkg_type = is_source ? 'Source' : 'Software'; title_common = category ? "$pkg_type Packages in \"$suite\", $category.id $category.name" : "$pkg_type Packages in \"$suite\""; + + nav_arr = [ { prefix=>'Distribution:', title=>'Overview over this suite', url=>make_url('/','','suite',suite), name=>suite } ]; IF category; - navigation_pre = [ { prefix=>'Distribution:', title=>'Overview over this suite', url=>"../", name=>suite }, - { prefix=>"$category.id:", name=>category.name } ]; + nav_last = { prefix=>"$category.id:", name=>category.name }; ELSE; - navigation_pre = [ { prefix=>'Distribution:', title=>'Overview over this suite', url=>"index", name=>suite }, - { name=>'All Packages' } ]; + nav_last = { name=>'All Packages' }; END + nav_arr.push( { name=>'Source', + url=>make_url('/','','suite',suite,'source',source) } ) + IF source; + nav_arr.push( nav_last ); %] [% PROCESS 'html/head.tmpl' title_tag = title_common diff --git a/templates/html/suite_index.tmpl b/templates/html/suite_index.tmpl index ed4f901..92b7d97 100644 --- a/templates/html/suite_index.tmpl +++ b/templates/html/suite_index.tmpl @@ -1,10 +1,23 @@ -[% PROCESS 'html/head.tmpl' +[% nav_arr = [ { name=> suite, url=>make_url('/','','suite',suite) } ]; + nav_arr.push( { name => 'Source' } ) IF source; + nav_arr.push( { name => 'Index' } ); + PROCESS 'html/head.tmpl' title_tag = "List of sections in \"$suite\"" - page_title = "List of sections in \"$suite\"" keywords = suite - navigation = [ { name=> suite }, - { name => 'Index' }, ] + navigation = nav_arr %] +[% PROCESS 'html/menu.inc' %] +[% FOREACH s IN suites %] + [% '
' IF loop.first %] + [%- IF s == suite -%] + [% PROCESS menuitem name=s url='' %] + [%- ELSE -%] + [% PROCESS menuitem name=s url=make_url('/','','suite',s,'source',source) %] + [%- END -%] + [%- '
' IF loop.last -%] +[% END %] + +

List of sections in "[% suite %]"

[% FOREACH subsections %] [% '
' IF loop.first %] @@ -23,6 +36,6 @@ [% END %]

- All packages
+ All [% "source " IF source %]packages
(compact compressed textlist)