import rt 2.0.14
[freeside.git] / rt / webrt / SelfService / Elements / Tabs
diff --git a/rt/webrt/SelfService/Elements/Tabs b/rt/webrt/SelfService/Elements/Tabs
new file mode 100644 (file)
index 0000000..d689d8a
--- /dev/null
@@ -0,0 +1,49 @@
+<TABLE WIDTH=100%>
+<TR>
+% foreach $tab (sort keys %{$tabs}) {
+<TD ALIGN=CENTER>
+[<A HREF="<%$RT::WebPath%>/<% $tabs->{"$tab"}->{'path'}%>"><% $tabs->{"$tab"}->{'title'}%></A>]
+</TD>
+%}
+
+% if ($actions) {
+
+<TD ALIGN=RIGHT>
+<TABLE><TR>
+%  foreach my $action (sort keys %{$actions}) {
+<TD>
+<FONT SIZE=-1>
+% if ($actions->{"$action"}->{'html'}) {
+<%$actions->{"$action"}->{'html'} |n%>
+% } else {
+<A HREF="<%$RT::WebPath%>/<% $actions->{$action}->{'path'}%>"><% $actions->{$action}->{'title'}%></A>
+% }
+</FONT>
+</TD>
+%  }
+</TR>
+</TABLE>
+</TD>
+%}
+</TR>
+</TABLE>
+<hr>
+<%INIT>
+my ($tab);
+my $tabs = { A  => { title => 'Open requests',
+                        path => 'SelfService/',
+                      },
+             B => { title => 'Closed requests',
+                         path => 'SelfService/Closed.html',
+                       },
+             C => { title => 'New request',
+                    path => 'SelfService/Create.html'
+                    }
+           };
+my $actions = {
+       B => { html => $m->scomp('GotoTicket') 
+               }
+       };
+</%INIT>
+
+