diff options
Diffstat (limited to 'rt/webrt/SelfService/Elements/Tabs')
-rw-r--r-- | rt/webrt/SelfService/Elements/Tabs | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/rt/webrt/SelfService/Elements/Tabs b/rt/webrt/SelfService/Elements/Tabs new file mode 100644 index 000000000..d689d8a72 --- /dev/null +++ b/rt/webrt/SelfService/Elements/Tabs @@ -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> + + |