X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FElements%2FPageLayout;h=fcd4f563f9fbe27375ebd9f7e7a2a81297524a24;hp=cc0bb06dc17706372b2d3a039af68f943302b739;hb=01721976fa3324f41a3093cda68bc38a7eec5ff5;hpb=fb4ab1073f0d15d660c6cdc4e07afebf68ef3924 diff --git a/rt/share/html/Elements/PageLayout b/rt/share/html/Elements/PageLayout index cc0bb06dc..fcd4f563f 100755 --- a/rt/share/html/Elements/PageLayout +++ b/rt/share/html/Elements/PageLayout @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -46,212 +46,28 @@ %# %# END BPS TAGGED BLOCK }}} -<% include('/elements/init_calendar.html') |n %> - -% if (0) { ## new ticket via customer, and we already have a ticket search box -
-% foreach my $action (reverse sort keys %{$topactions}) { -<% $topactions->{"$action"}->{'html'} |n %> -% } -
-% } - -% if (0) { ##FREESIDE MENUS INSTEAD## if ( $show_menu ) { % if ( $show_menu ) { - +%# #FREESIDE MENUS INSTEAD## + % } +% if (0) { ## new ticket via customer, and we already have a ticket search box +
<& /Elements/WidgetBar, menu => PageWidgets() &>
% } -
% $m->callback( %ARGS, CallbackName => 'BeforeBody' ); % $m->flush_buffer(); # we've got the page laid out, let's flush the buffer; - -<%INIT> -if ( defined $current_toptab ) { - foreach my $tab ( values %{$toptabs} ) { - next unless $tab->{'path'} eq $current_toptab; - @{ $tab }{ qw(subtabs current_subtab) } = ($tabs, $current_tab); - } -} - -my ($menu_depth, $almost_last, $page_tabs); - -# don't pull out the last submenu for 3.5-compat theme -# see #14853 for details. -if (RT->Config->Get( 'WebDefaultStylesheet', $session{'CurrentUser'} ) ne '3.4-compat') { - ($menu_depth, $almost_last) = @{ $m->comp('.menu_recurse', data => $toptabs, current => $current_toptab ) }; - - if (defined $almost_last->{subtabs} and %{$almost_last->{subtabs}}) { - $page_tabs = { - current_toptab => $almost_last->{current_subtab}, - %{$almost_last->{subtabs}}, - }; - - delete $almost_last->{subtabs}; - delete $almost_last->{current_subtab}; - } -} - - -%# There's probably a better way to do this that involves three times as -%# much work and redoing the whole menu/tab system... which would seem a -%# bit out of scope. -%# -%# This function recurses through the menu and returns the second to -%# last menu, that is, the menu holding the last reference to -%# and submenu. It also returns the number of menu levels minus -%# the last submenu. -<%def .menu_recurse> - <%args> - $data => { } - $current => '' - $pdata => { } - $ppdata => { } - $level => 0 - - <%init> - if ($current) { - for my $key (keys %$data) { - next if !defined $data->{$key}->{'path'} - || $data->{$key}->{'path'} ne $current; - next unless ref( $data->{$key} ) eq 'HASH' - && ref( $data->{$key}->{'subtabs'} ) eq 'HASH' - && keys %{ $data->{$key}->{'subtabs'} }; - return $m->comp('.menu_recurse', - data => $data->{$key}->{'subtabs'}, - current => $data->{$key}->{'current_subtab'} || '', - pdata => $data->{$key}, - ppdata => $pdata, - level => $level + 1, - ); - } - } - $ppdata->{last_system_menu_level}++; - return [$level, $pdata]; - - - <%ARGS> -$current_toptab => undef -$current_tab => undef -$toptabs => undef -$topactions => undef -$tabs => undef -$actions => undef -$subactions => undef $title => $m->callers(-1)->path $show_menu => 1 +<%init> +my $style = $session{'CurrentUser'} + ? $session{'CurrentUser'}->Stylesheet + : RT->Config->Get('WebDefaultStylesheet'); +my $stylesheet_plugin = "/NoAuth/css/".$style."/AfterMenus"; +