3 %# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
5 %# (Except where explictly superceded by other copyright notices)
7 %# This work is made available to you under the terms of Version 2 of
8 %# the GNU General Public License. A copy of that license should have
9 %# been provided with this software, but in any event can be snarfed
12 %# This work is distributed in the hope that it will be useful, but
13 %# WITHOUT ANY WARRANTY; without even the implied warranty of
14 %# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 %# General Public License for more details.
17 %# Unless otherwise specified, all modifications, corrections or
18 %# extensions to this work which alter its source code become the
19 %# property of Best Practical Solutions, LLC when submitted for
20 %# inclusion in the work.
24 %# font size depends on level
26 % $size = $basesize-(6);
27 % } elsif ($level gt 0) {
28 % $size = $basesize-($level * 2);
38 % foreach $tab (sort keys %{$toptabs}) {
39 % my $current = $current_toptab || "";
40 % my $path = $toptabs->{$tab}->{'path'} || "";
41 % $path =~ s#/index.html$##gi;
42 % $current =~ s#/index.html$##gi;
43 % if ( $path eq $current) {
44 % $class="currenttopnav"
50 % $style="border-top: solid #999 1px; padding-top: .1em; margin-top: .5em;";
51 % } elsif ($level == 0 ) {
52 % $style="border-bottom: solid white 1px; padding-top: .25em; padding-bottom: .5em;" ;
54 % if ($toptabs->{$tab}->{'separator'}) {
59 <li style="<%$style%>"><A HREF="<%$RT::WebPath%>/<%$toptabs->{$tab}->{'path'}|n%>" style="font-size: <%$size%>;" class="<%$class%>"
60 <%($class eq 'currenttopnav') ? "name='focus'" : ""|n %>
61 <% !$level && "accesskey='".$accesskey++."'" |n%>><% $toptabs->{$tab}->{'title'}%></A>
63 %# if ($current_toptab eq $toptabs->{$tab}->{'path'}) {
64 %# commented out by jesse on 4 jan 2003 so that tickets/search and ticket/# can
65 %# both have menu items
66 % if ($toptabs->{$tab}->{'subtabs'}) {
67 <& /Elements/Menu, level => $level+1,
68 current_toptab => $toptabs->{$tab}->{'current_subtab'},
69 toptabs => $toptabs->{$tab}->{'subtabs'} &></li>
76 my ($tab, $subtab, $class, $size, $padding);