RT#34237 installer scheduling [various v3 backport fixes]
[freeside.git] / rt / share / html / Elements / Header
index 67588e3..d264484 100755 (executable)
@@ -2,7 +2,7 @@
 %#
 %# COPYRIGHT:
 %#
-%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
 %#                                          <sales@bestpractical.com>
 %#
 %# (Except where explicitly superseded by other copyright notices)
 %# those contributions and any derivatives thereof.
 %#
 %# END BPS TAGGED BLOCK }}}
+% if ( $Popup ) {
+<& /elements/header-popup.html, {
+              'title_noescape' => $Title,
+              'head'      => $head,
+              'etc'       => $etc,
+              'nobr'      => 1,
+              #'nocss'     => 1,
+              'no_jquery' => $JavaScript,
+          }
+&>
+% } else {
 <& /elements/header.html, {
-              'title' => $Title,
-              'head'  => $head,
-              'etc'   => $etc,
-              'nobr'  => 1,
-              'nocss' => 1,
+              'title_noescape' => $Title,
+              'head'      => $head,
+              'etc'       => $etc,
+              #make space for RT menu for now# 'nobr'  => 1,
+              'nocss'     => 1,
+              'no_jquery' => $JavaScript,
           }
 &>
+% }
 <%INIT>
 #for "Site CSS from theme editor" below
 #use Scalar::Util qw(blessed);
@@ -87,7 +100,8 @@ my $head = '';
 #XXX $head .= <& /Elements/Framekiller &>;
 
 if ($Refresh && $Refresh =~ /^(\d+)/ && $1 > 0) {
-  $head .= qq( <meta http-equiv="refresh" content="$Refresh" /> );
+  my $URL = $m->notes->{RefreshURL}; $URL = $URL ? ";URL=$URL" : "";
+  $head .= qq( <meta http-equiv="refresh" content="$1$URL" /> );
 }
 
 my $WebPath = RT->Config->Get('WebPath');
@@ -112,9 +126,11 @@ if ($JavaScript) {
     $head .= $m->scomp('HeaderJavascript', focus => $Focus, onload => $onload, RichText => $RichText );
 }
 
-my $stylesheet_plugin = "/NoAuth/css/$style/InHeader";
-if ($m->comp_exists($stylesheet_plugin) ) {
-    $head .= $m->scomp($stylesheet_plugin);
+if ($JavaScript) {
+    my $stylesheet_plugin = "/NoAuth/css/$style/InHeader";
+    if ($m->comp_exists($stylesheet_plugin) ) {
+        $head .= $m->scomp($stylesheet_plugin);
+    }
 }
 
 #<!-- Site CSS from theme editor -->
@@ -129,7 +145,8 @@ if ($m->comp_exists($stylesheet_plugin) ) {
 # $m->callback( %ARGS, CallbackName => 'Head' );
 $head .= $m->scomp( '/Elements/Callback', _CallbackName => 'Head', %ARGS );
 
-my $etc = qq[ class="\L$style" ];
+my $sbs = RT->Config->Get("UseSideBySideLayout", $session{'CurrentUser'}) ? ' sidebyside' : '';
+my $etc = qq[ class="\L$style$sbs" ];
 $etc .= qq[ id="comp-$id"] if $id;
 
 </%INIT>
@@ -149,4 +166,5 @@ $LinkRel => undef
 $JavaScript => 1
 $SkipDoctype => 0
 $RichText => 1
+$Popup => 0
 </%ARGS>