[Rt-commit] rtir branch, 3.4/ticket-timer, created. 3.3.0-69-g177999c

Shawn Moore shawn at bestpractical.com
Tue May 17 14:07:38 EDT 2016


The branch, 3.4/ticket-timer has been created
        at  177999ceb371fbc92f456541ce777207ceecc1d6 (commit)

- Log -----------------------------------------------------------------
commit fab060e14835211dd8491cfe087299e36e132919
Author: Shawn M Moore <shawn at bestpractical.com>
Date:   Thu May 12 15:41:42 2016 +0000

    Add ticket timer button to RTIR ticket page menus
    
    Fixes: I#31934

diff --git a/html/Callbacks/RTIR/Elements/Tabs/Privileged b/html/Callbacks/RTIR/Elements/Tabs/Privileged
index 5fa558f..a8fa11e 100644
--- a/html/Callbacks/RTIR/Elements/Tabs/Privileged
+++ b/html/Callbacks/RTIR/Elements/Tabs/Privileged
@@ -313,8 +313,15 @@ if ( $request_path =~ m{(?:$re_rtir_path)(?:$re_rtir_types/)?(Display|Edit|Updat
 
     PageMenu()->child(
         bookmark => raw_html => $m->scomp( '/Ticket/Elements/Bookmark', id => $id ),
-        sort_order   => 99
+        sort_order   => 98
     );
+    if ($can->('ModifyTicket')) {
+        PageMenu()->child(
+            timer => raw_html => $m->scomp( '/Ticket/Elements/PopupTimerLink', id => $id ),
+            sort_order => 99
+        );
+    }
+
 } elsif ( $request_path =~ m{(?:$re_rtir_path)Link/(ToIncident|FromIncident)} ) {
     my $direction = $1;
 

commit 177999ceb371fbc92f456541ce777207ceecc1d6
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

diff --git a/html/Callbacks/RTIR/Elements/Header/Head b/html/Callbacks/RTIR/Elements/Header/Head
index 0d33d71..4cfb87d 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->OurQueue($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;
 }

-----------------------------------------------------------------------


More information about the rt-commit mailing list