This commit was generated by cvs2svn to compensate for changes in r3921,
[freeside.git] / rt / html / Elements / PageLayout
1 %# BEGIN LICENSE BLOCK
2 %# 
3 %# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
4 %# 
5 %# (Except where explictly superceded by other copyright notices)
6 %# 
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
10 %# from www.gnu.org.
11 %# 
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.
16 %# 
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.
21 %# 
22 %# 
23 %# END LICENSE BLOCK
24 <table class="lightgray" border=0 cellspacing=0 cellpadding=0 width="100%">
25   <th class="lightgray" align="left" width=50%><span class="rtname"><%$AppName%></span>
26   </th>
27       <span class="topactions">
28 % foreach my $action (sort keys %{$topactions}) {
29         <td class="lightgrayright">
30         <%$topactions->{"$action"}->{'html'} |n %>
31         </td>
32 % }
33       </span>
34 </table>
35 <table border=0 cellspacing=0 cellpadding=0 width="100%" height="100%">
36 %# Vertical menu
37 <TR height="100%">
38 <TD valign="top" width="140" class="lightgray">
39           <& /Elements/Menu, toptabs => $toptabs, current_toptab => $current_toptab &>
40 </TD>
41 <td valign="top">
42 <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
43 <tr>
44   <td class="mediumgray" valign="top">
45     <span class="title"><%$title%></span>
46 </td>
47 </tr>
48 <tr>
49 <td class="mediumgrayright" valign="top">
50     <span class="nav"> 
51 % if ($actions) {
52 % my @actions;
53 % foreach my $action (sort keys %{$actions}) {
54 % if ($actions->{"$action"}->{'html'}) {
55 % push @actions, $actions->{"$action"}->{'html'}; 
56 % } else {
57 % push @actions,  "<A class='nav' HREF=\"".$RT::WebPath."/".$actions->{$action}->{'path'}."\">".$actions->{$action}->{'title'}."</A>";
58 % }
59 %  }
60 %#<% join(" | ", @actions) | n %>
61 <% '['. join("] [", @actions). ']' | n %>
62 % if ($subactions) {
63 % my @actions;
64 % foreach my $action (sort keys %{$subactions}) {
65 % push @actions, $subactions->{"$action"}->{'html'}; 
66 %  }
67 <% join(" | ", @actions) | n %>
68 % }
69 % }
70     </span>
71   </td>
72 </tr>
73 <TR valign="top">
74 <TD valign="top" width="100%" height="100%" class="mainbody" >
75
76 <%INIT>
77
78   foreach my $tab (sort keys %{$toptabs}) {
79     if ($toptabs->{$tab}->{'path'} eq $current_toptab) {
80       $toptabs->{$tab}->{"subtabs"} = $tabs;
81       $toptabs->{$tab}->{"current_subtab"} = $current_tab;
82     }
83   }
84
85 if (! defined($AppName)) {
86   $AppName = loc("RT for [_1]", $RT::rtname);
87 }
88
89 </%INIT>
90 <%ARGS>
91 $current_toptab => undef
92 $current_tab => undef
93 $toptabs => undef
94 $topactions => undef
95 $tabs => undef
96 $actions => undef
97 $subactions => undef
98 $title => $m->callers(-1)->path
99 $AppName => ''
100 </%ARGS>