This commit was generated by cvs2svn to compensate for changes in r2526,
[freeside.git] / rt / webrt / SelfService / Elements / Tabs
1 <TABLE WIDTH=100%>
2 <TR>
3 % foreach $tab (sort keys %{$tabs}) {
4 <TD ALIGN=CENTER>
5 [<A HREF="<%$RT::WebPath%>/<% $tabs->{"$tab"}->{'path'}%>"><% $tabs->{"$tab"}->{'title'}%></A>]
6 </TD>
7 %}
8
9 % if ($actions) {
10
11 <TD ALIGN=RIGHT>
12 <TABLE><TR>
13 %  foreach my $action (sort keys %{$actions}) {
14 <TD>
15 <FONT SIZE=-1>
16 % if ($actions->{"$action"}->{'html'}) {
17 <%$actions->{"$action"}->{'html'} |n%>
18 % } else {
19 <A HREF="<%$RT::WebPath%>/<% $actions->{$action}->{'path'}%>"><% $actions->{$action}->{'title'}%></A>
20 % }
21 </FONT>
22 </TD>
23 %  }
24 </TR>
25 </TABLE>
26 </TD>
27 %}
28 </TR>
29 </TABLE>
30 <hr>
31 <%INIT>
32 my ($tab);
33 my $tabs = { A  => { title => 'Open requests',
34                         path => 'SelfService/',
35                       },
36              B => { title => 'Closed requests',
37                          path => 'SelfService/Closed.html',
38                        },
39              C => { title => 'New request',
40                     path => 'SelfService/Create.html'
41                     }
42            };
43 my $actions = {
44         B => { html => $m->scomp('GotoTicket') 
45                 }
46         };
47 </%INIT>
48
49