X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FSelfService%2FDisplay.html;h=9f51e3359f3dbad581bdea1c7cedc616bc251d2e;hp=857ebfa983f4ff5e5c5561dd08c6c6bf3ececd80;hb=e9e0cf0989259b94d9758eceff448666a2e5a5cc;hpb=7588a4ac90a9b07c08a3107cd1107d773be1c991 diff --git a/rt/share/html/SelfService/Display.html b/rt/share/html/SelfService/Display.html index 857ebfa98..9f51e3359 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 %# %# %# (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 &> @@ -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 =