summaryrefslogtreecommitdiff
path: root/rt/share/html/SelfService/Display.html
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2014-02-25 18:34:25 -0800
committerIvan Kohler <ivan@freeside.biz>2014-02-25 18:34:25 -0800
commit45d35d5739d05e602bc317739485693e0e9ff0b5 (patch)
tree61801368d96662baff145d3271fd887ca104391c /rt/share/html/SelfService/Display.html
parent662be3ece2ef8c7f05fcbfaa699d80a6a73ca110 (diff)
RT 4.0.19
Diffstat (limited to 'rt/share/html/SelfService/Display.html')
-rwxr-xr-xrt/share/html/SelfService/Display.html25
1 files changed, 16 insertions, 9 deletions
diff --git a/rt/share/html/SelfService/Display.html b/rt/share/html/SelfService/Display.html
index 857ebfa..9f51e33 100755
--- a/rt/share/html/SelfService/Display.html
+++ b/rt/share/html/SelfService/Display.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -50,6 +50,7 @@
% $m->callback(CallbackName => 'BeforeActionList', %ARGS, Actions => \@results, ARGSRef => \%ARGS, Ticket => $Ticket );
<& /Elements/ListActions, actions => \@results &>
+<& /Ticket/Elements/ShowUpdateStatus, Ticket => $Ticket &>
<table width="100%" class="ticketsummary" >
<tr>
@@ -177,16 +178,22 @@ if ( defined ($id[0]) && $id[0] eq 'new' ) {
$m->abort();
}
- if (@results) {
- # We've done something, so we need to clear the decks to avoid
- # resubmission on refresh.
- # But we need to store Actions somewhere too, so we don't lose them.
- my $key = Digest::MD5::md5_hex(rand(1024));
- push @{ $session{"Actions"}->{$key} ||= [] }, @results;
- $session{'i'}++;
- RT::Interface::Web::Redirect( RT->Config->Get('WebURL') ."SelfService/Display.html?id=". $Ticket->id."&results=".$key);
+ if ( $ARGS{'MarkAsSeen'} ) {
+ $Ticket->SetAttribute(
+ Name => 'User-'. $Ticket->CurrentUser->id .'-SeenUpTo',
+ Content => $Ticket->LastUpdated,
+ );
+ push @results, loc('Marked all messages as seen');
}
+ # This code does automatic redirection if any updates happen.
+ MaybeRedirectForResults(
+ Actions => \@results,
+ Path => '/SelfService/Display.html',
+ Anchor => $ARGS{'Anchor'},
+ Arguments => { id => $Ticket->id },
+ );
+
my $Transactions = $Ticket->Transactions;
my $attachments =