]> git.deb.at Git - deb/packages.git/commitdiff
Fix the nav bars to make more sense for source pages
authorFrank Lichtenheld <frank@lichtenheld.de>
Fri, 24 Nov 2006 01:29:46 +0000 (01:29 +0000)
committerFrank Lichtenheld <frank@lichtenheld.de>
Fri, 24 Nov 2006 01:29:46 +0000 (01:29 +0000)
templates/html/index.tmpl
templates/html/suite_index.tmpl

index 898529411eefae1dbd9e222a15d401c6a3f646cb..dc44e990bda208c581c6dd076862f88925f03063 100644 (file)
@@ -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\"";
 [% 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;
    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;
    ELSE;
-       navigation_pre = [ { prefix=>'Distribution:', title=>'Overview over this suite', url=>"index", name=>suite },
-                          { name=>'All Packages' } ];
+       nav_last = { name=>'All Packages' };
    END
    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
 %]
 [% PROCESS 'html/head.tmpl' 
        title_tag = title_common
index ed4f901040065eeeb227c89033a7967b70e368cd..92b7d97a590f2dd1e456140edc9817a12b2c544f 100644 (file)
@@ -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\""
        title_tag = "List of sections in \"$suite\""
-       page_title = "List of sections in \"$suite\""
        keywords = suite
        keywords = suite
-       navigation = [ { name=> suite },
-                      { name => 'Index' }, ]
+       navigation = nav_arr
 %]
 %]
+[% PROCESS 'html/menu.inc' %]
+[% FOREACH s IN suites %]
+   [% '<div id="pothers">' IF loop.first %]
+   [%- IF s == suite -%]
+     [% PROCESS menuitem name=s url='' %]
+   [%- ELSE -%]
+     [% PROCESS menuitem name=s url=make_url('/','','suite',s,'source',source) %]
+   [%- END -%]
+   [%- '</div>' IF loop.last -%]
+[% END %]
+
+<h1>List of sections in "[% suite %]"</h1>
 
 [% FOREACH subsections %]
   [% '<div id="lefthalfcol"><dl>' IF loop.first %]
 
 [% FOREACH subsections %]
   [% '<div id="lefthalfcol"><dl>' IF loop.first %]
@@ -23,6 +36,6 @@
 [% END %]
 
 <p class="psmallcenter">
 [% END %]
 
 <p class="psmallcenter">
-       <a href="allpackages" title="List of all packages">All packages</a><br>
+       <a href="allpackages" title="List of all [% "source " IF source %]packages">All [% "source " IF source %]packages</a><br>
        (<a href="allpackages?format=txt.gz">compact compressed textlist</a>)
 </p>
        (<a href="allpackages?format=txt.gz">compact compressed textlist</a>)
 </p>