rt 4.2.16
[freeside.git] / rt / share / html / Ticket / Elements / ClickToShowHistory
index 5a9a477..20225c3 100644 (file)
@@ -2,7 +2,7 @@
 %#
 %# COPYRIGHT:
 %#
-%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2019 Best Practical Solutions, LLC
 %#                                          <sales@bestpractical.com>
 %#
 %# (Except where explicitly superseded by other copyright notices)
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <div id="deferred_ticket_history">
-    <& /Widgets/TitleBoxStart, title => 'History' &>
+    <& /Widgets/TitleBoxStart, title => loc('History') &>
         <a href="<% $display %>" onclick="jQuery('#deferred_ticket_history').text(<% loc('Loading...') |n,j%>).load(<% $url |n,j %>); return false;" ><% loc('Show ticket history') %></a>
     <& /Widgets/TitleBoxEnd &>
 </div>
 $Ticket
 </%ARGS>
 <%INIT>
-my $id = $Ticket->id;
-my $url = RT->Config->Get('WebPath') ."/Helpers/TicketHistory?id=". $id;
-my $display = RT->Config->Get('WebPath') ."/Ticket/Display.html?id=$id;ForceShowHistory=1";
+my %params = %ARGS;
+delete $params{Ticket};
+
+my $query   = $m->comp('/Elements/QueryString', %params, id => $Ticket->id );
+my $url     = RT->Config->Get('WebPath')."/Helpers/TicketHistory?$query";
+my $display = RT->Config->Get('WebPath')."/Ticket/Display.html?ForceShowHistory=1;$query";
 </%INIT>