[Rt-commit] [rtir] 03/03: Have ticket timer use RTIR theme for RTIR tickets
Shawn Moore
shawn at bestpractical.com
Thu May 12 11:42:57 EDT 2016
This is an automated email from the git hooks/post-receive script.
shawn pushed a commit to branch 3.4/ticket-timer
in repository rtir.
commit d06ee2a940b80c8fbaab99a0fcbaab8f289e7e65
Author: Shawn M Moore <shawn at bestpractical.com>
Date: Thu May 12 15:42:25 2016 +0000
Have ticket timer use RTIR theme for RTIR tickets
---
html/Callbacks/RTIR/Elements/Header/Head | 19 ++++++++++++++-----
static/css/rtir-styles.css | 3 ++-
2 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/html/Callbacks/RTIR/Elements/Header/Head b/html/Callbacks/RTIR/Elements/Header/Head
index 0d33d71..7a5f700 100644
--- a/html/Callbacks/RTIR/Elements/Header/Head
+++ b/html/Callbacks/RTIR/Elements/Header/Head
@@ -46,11 +46,20 @@
%#
%# END BPS TAGGED BLOCK }}}
<%init>
-return unless $m->request_comp->path =~ m{^/RTIR/};
-$ARGSRef->{URL} //= RT::IR->HREFTo("index.html");
-$ARGSRef->{Name} //= RT->Config->Get('rtirname');
-$ARGSRef->{LogoURL} //= RT->Config->Get('WebPath')."/static/images/RTIR/logo.png";
-push @{$ARGSRef->{BodyClass}}, 'rtir';
+if ($m->request_comp->path =~ m{^/RTIR/}) {
+ $ARGSRef->{URL} //= RT::IR->HREFTo("index.html");
+ $ARGSRef->{Name} //= RT->Config->Get('rtirname');
+ $ARGSRef->{LogoURL} //= RT->Config->Get('WebPath')."/static/images/RTIR/logo.png";
+ push @{$ARGSRef->{BodyClass}}, 'rtir';
+}
+# add rtir body class if it's a ticket timer for an RTIR ticket
+elsif ($m->request_comp->path =~ m{^/Helpers/TicketTimer}) {
+ my $ticket = RT::Ticket->new( $session{'CurrentUser'} );
+ my ($ok) = $ticket->Load($DECODED_ARGS->{id});
+ if ($ok && RT::IR->IsRTIRQueue($ticket->QueueObj)) {
+ push @{$ARGSRef->{BodyClass}}, 'rtir';
+ }
+}
</%init>
<%args>
$ARGSRef
diff --git a/static/css/rtir-styles.css b/static/css/rtir-styles.css
index ae43c03..245617f 100644
--- a/static/css/rtir-styles.css
+++ b/static/css/rtir-styles.css
@@ -1,4 +1,5 @@
-body.rtir div#header {
+body.rtir div#header,
+body.rtir .ticket-timer .ticket-link {
background: #404080;
color: #fff;
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the rt-commit
mailing list