X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FElements%2FHeader;h=17bfe7460083e9536abc869d4a227956a6b2400e;hb=ebeb3e934b36f6bdef358fe1b4264a9afb5a9c3b;hp=664da06b065fc13ac7fd8b131d88adf756d9598b;hpb=07b4bc84d1078f7390221d766cdb3142513db4b0;p=freeside.git
diff --git a/rt/share/html/Elements/Header b/rt/share/html/Elements/Header
index 664da06b0..17bfe7460 100755
--- a/rt/share/html/Elements/Header
+++ b/rt/share/html/Elements/Header
@@ -45,19 +45,29 @@
%# 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,
+ 'title_noescape' => $Title,
'head' => $head,
'etc' => $etc,
- #make space for RT menu for now# 'nobr' => 1,
+ 'nobr' => 1,
'nocss' => 1,
'no_jquery' => $JavaScript,
}
&>
+% }
<%INIT>
#for "Site CSS from theme editor" below
-#use Scalar::Util qw(blessed);
-
$r->headers_out->{'Pragma'} = 'no-cache';
$r->headers_out->{'Cache-control'} = 'no-cache';
@@ -75,17 +85,23 @@ my $style = $session{'CurrentUser'}
my @css_files;
if ( RT->Config->Get('DevelMode') ) {
- @css_files = ( "$style/main.css", RT->Config->Get('CSSFiles' ) );
+ @css_files = map { "/static/css/$_" } "$style/main.css", RT->Config->Get('CSSFiles');
}
else {
my $key =
RT::Interface::Web::SquishedCSS( $style )->Key;
- @css_files = "$style-squished-$key.css";
+ @css_files = "/NoAuth/css/$style/squished-$key.css";
}
-my $head = '';
+# We use BodyClass in its $ARGS form so that callbacks have a chance to
+# massage it
+push @{$ARGS{'BodyClass'}}, lc $style;
-#XXX $head .= <& /Elements/Framekiller &>;
+if (RT->Config->Get("UseSideBySideLayout", $session{'CurrentUser'})) {
+ push @{$ARGS{'BodyClass'}}, 'sidebyside';
+}
+
+my $head = '';
if ($Refresh && $Refresh =~ /^(\d+)/ && $1 > 0) {
my $URL = $m->notes->{RefreshURL}; $URL = $URL ? ";URL=$URL" : "";
@@ -96,62 +112,64 @@ my $WebPath = RT->Config->Get('WebPath');
my $WebImagesURL = RT->Config->Get('WebImagesURL');
my $squished = RT->Config->Get('DevelMode') ? '' : '-squished';
-$head .= qq(\n);
+if ( $JavaScript ) {
+ $head .= $m->scomp('/Elements/JavascriptConfig');
+}
+
for my $cssfile ( @css_files ) {
- $head .= qq(\n);
+ $head .= qq(\n);
}
-$head .= qq(\n);
for (keys %{$LinkRel || {}}) {
$head .= qq(';
}
+$head .= qq(\n);
if ( $RSSAutoDiscovery ) {
$head .= qq();
}
if ($JavaScript) {
- $head .= $m->scomp('HeaderJavascript', focus => $Focus, onload => $onload, RichText => $RichText );
-}
+ $head .= $m->scomp('/Elements/HeaderJavascript', focus => $Focus, onload => $onload, RichText => $RichText );
+
+$head .= q[
+
+];
-if ($JavaScript) {
- my $stylesheet_plugin = "/NoAuth/css/$style/InHeader";
- if ($m->comp_exists($stylesheet_plugin) ) {
- $head .= $m->scomp($stylesheet_plugin);
- }
}
-#
-#
-
# $m->callback( %ARGS, CallbackName => 'Head' );
$head .= $m->scomp( '/Elements/Callback', _CallbackName => 'Head', %ARGS );
-my $sbs = RT->Config->Get("UseSideBySideLayout", $session{'CurrentUser'}) ? ' sidebyside' : '';
-my $etc = qq[ class="\L$style$sbs" ];
+#XXX $head .= <& /Elements/Framekiller &>;
+
+my $etc = ' class="'. join( '',@{$ARGS{'BodyClass'}}). '" ';
$etc .= qq[ id="comp-$id"] if $id;
%INIT>
-
<%ARGS>
#$Focus => 'focus'
$Focus => ''
$Title => 'RT'
-$Code => undef
$Refresh => 0
-$Why => undef
$ShowBar => 1
$URL => undef
$RSSAutoDiscovery => undef
$onload => undef
$LinkRel => undef
-$JavaScript => 1
$SkipDoctype => 0
$RichText => 1
+$BodyClass => undef
+$JavaScript => 1
+$Popup => 0
%ARGS>