This commit was generated by cvs2svn to compensate for changes in r2523,
[freeside.git] / rt / webrt / Elements / Tabs
1 <TABLE WIDTH=100%>
2     <TR>
3       <TD VALIGN=TOP>
4         <TABLE cellspacing=1>
5           <TR>
6 % foreach $tab (sort keys %{$toptabs}) {
7             <TD ALIGN=CENTER>
8               <font size=+1>
9                 [<A 
10 % if ($current_toptab eq $toptabs->{$tab}->{'path'}) {
11 class='currenttab'
12 % } 
13         HREF="<%$RT::WebPath%>/<% $toptabs->{$tab}->{'path'}%>"><% $toptabs->{$tab}->{'title'}%></A>]
14
15
16               </font>
17             </TD>
18 % }
19           </TR>
20         </TABLE>
21 <BR>
22 % if ($tabs_scalar) {
23 <% $tabs_scalar |n%>
24 % }
25 % if ($tabs) {
26         
27         <TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>    
28           <TR>
29 % foreach $tab (sort keys %{$tabs}) {
30             <TD ALIGN=CENTER VALIGN=TOP>
31 [<A 
32 % if ($current_tab eq $tabs->{$tab}->{'path'}) {
33 class='currenttab' 
34 % } 
35 HREF="<%$RT::WebPath%>/<% $tabs->{$tab}->{'path'}%>"><% $tabs->{$tab}->{'title'}%></A>]</TD>
36 %}
37           </TR>
38         </TABLE>
39 %}
40
41 <BR>
42 % if ($subtabs_scalar) {
43 <% $subtabs_scalar |n%>
44 % }
45 % if ($subtabs) {
46         <TABLE> 
47           <TR>
48 % foreach $tab (sort keys %{$subtabs}) {
49             <TD ALIGN=CENTER>
50               [<A HREF="<%$RT::WebPath%>/<% $subtabs->{$tab}->{'path'}%>"><% $subtabs->{$tab}->{'title'}%></A>]
51             </TD>
52 %}
53           </TR>
54         </TABLE>
55 %}
56       </TD>
57       <TD VALIGN=TOP ALIGN=RIGHT>
58 <TABLE>
59 <TR>
60
61 % foreach $action (sort keys %{$topactions}) {
62 <TD><font size=-1><%$topactions->{"$action"}->{'html'} |n %></font></TD>
63 % }
64 </TR>
65 </TABLE>
66         
67
68         
69 % if ($actions) {
70 <TABLE><TR>
71 %  foreach $action (sort keys %{$actions}) {
72 <TD>
73 <FONT SIZE=-1>
74 % if ($actions->{"$action"}->{'html'}) {
75 <%$actions->{"$action"}->{'html'} |n%>
76 % } else {
77 <A HREF="<%$RT::WebPath%>/<% $actions->{$action}->{'path'}%>"><% $actions->{$action}->{'title'}%></A>
78 % }
79 </FONT>
80 </TD>
81 %  }
82 </TR></TABLE>
83 % }
84         
85 % if ($subactions_scalar) {
86 <% $subactions_scalar |n%>
87 % }
88 % if ($subactions) {
89 <BR>|&nbsp;
90 %  foreach $action (sort keys %{$subactions}) {
91 <%$subactions->{"$action"}->{'html'} |n%>&nbsp;|
92 %  }
93 % }
94       </TD>
95     </TR>
96   </TABLE>
97
98
99 <%INIT>
100 my ($tab, $action);
101 my $toptabs = {    A => { title => 'Home',
102                            path => '',
103                          },
104                     B => { title => 'Search',
105                         path => 'Search/Listing.html'
106                       },
107
108                     D => { title => 'Configuration',
109                            path => 'Admin/'
110                          }
111                  };
112                     
113
114 my $topactions = {
115         A => { html => $m->scomp('/Elements/CreateTicket')      
116                 },
117         B => { html => $m->scomp('/Elements/GotoTicket') 
118                 }
119         };
120 </%INIT>
121 <%ARGS>
122 $current_toptab =>  "none"
123 $current_tab => "none"
124 $current_subtab => "none"
125 $tabs => undef
126 $tabs_scalar => undef
127 $subtabs => undef
128 $actions => undef
129 $subactions => undef
130 $subtabs_scalar => undef
131 $subactions_scalar => undef
132 </%ARGS>
133