X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=rt%2Fwebrt%2FElements%2FTabs;fp=rt%2Fwebrt%2FElements%2FTabs;h=6eacf391aaf503fd131aef09d41fc0f8e579491d;hp=0000000000000000000000000000000000000000;hb=3ef62a0570055da710328937e7f65dbb2c027c62;hpb=030438c9cb1c12ccb79130979ef0922097b4311a diff --git a/rt/webrt/Elements/Tabs b/rt/webrt/Elements/Tabs new file mode 100755 index 000000000..6eacf391a --- /dev/null +++ b/rt/webrt/Elements/Tabs @@ -0,0 +1,133 @@ + + + + + +
+ + +% foreach $tab (sort keys %{$toptabs}) { + +% } + +
+ + [{$tab}->{'path'}) { +class='currenttab' +% } + HREF="<%$RT::WebPath%>/<% $toptabs->{$tab}->{'path'}%>"><% $toptabs->{$tab}->{'title'}%>] + + + +
+
+% if ($tabs_scalar) { +<% $tabs_scalar |n%> +% } +% if ($tabs) { + + + +% foreach $tab (sort keys %{$tabs}) { + +%} + +
+[{$tab}->{'path'}) { +class='currenttab' +% } +HREF="<%$RT::WebPath%>/<% $tabs->{$tab}->{'path'}%>"><% $tabs->{$tab}->{'title'}%>]
+%} + +
+% if ($subtabs_scalar) { +<% $subtabs_scalar |n%> +% } +% if ($subtabs) { + + +% foreach $tab (sort keys %{$subtabs}) { + +%} + +
+ [<% $subtabs->{$tab}->{'title'}%>] +
+%} +
+ + + +% foreach $action (sort keys %{$topactions}) { + +% } + +
<%$topactions->{"$action"}->{'html'} |n %>
+ + + +% if ($actions) { + +% foreach $action (sort keys %{$actions}) { + +% } +
+ +% if ($actions->{"$action"}->{'html'}) { +<%$actions->{"$action"}->{'html'} |n%> +% } else { +<% $actions->{$action}->{'title'}%> +% } + +
+% } + +% if ($subactions_scalar) { +<% $subactions_scalar |n%> +% } +% if ($subactions) { +
|  +% foreach $action (sort keys %{$subactions}) { +<%$subactions->{"$action"}->{'html'} |n%> | +% } +% } +
+ + +<%INIT> +my ($tab, $action); +my $toptabs = { A => { title => 'Home', + path => '', + }, + B => { title => 'Search', + path => 'Search/Listing.html' + }, + + D => { title => 'Configuration', + path => 'Admin/' + } + }; + + +my $topactions = { + A => { html => $m->scomp('/Elements/CreateTicket') + }, + B => { html => $m->scomp('/Elements/GotoTicket') + } + }; + +<%ARGS> +$current_toptab => "none" +$current_tab => "none" +$current_subtab => "none" +$tabs => undef +$tabs_scalar => undef +$subtabs => undef +$actions => undef +$subactions => undef +$subtabs_scalar => undef +$subactions_scalar => undef + +