Commit b6f8574c authored by Kevin Falcone's avatar Kevin Falcone
Browse files

Merge branch '3.0/display-mark-as-seen' into 3.0-trunk

parents deb1f1c7 747a6150
...@@ -51,6 +51,7 @@ ...@@ -51,6 +51,7 @@
% $m->callback(CallbackName => 'BeforeActionList', %ARGS, Actions => \@results, ARGSRef => \%ARGS, Ticket => $Ticket); % $m->callback(CallbackName => 'BeforeActionList', %ARGS, Actions => \@results, ARGSRef => \%ARGS, Ticket => $Ticket);
<& /Elements/ListActions, actions => \@results &> <& /Elements/ListActions, actions => \@results &>
<& /Ticket/Elements/ShowUpdateStatus, Ticket => $Ticket, DisplayPath => 'RTIR' &>
<div class="summary"><&| /Widgets/TitleBox, title => loc('Ticket metadata') &> <div class="summary"><&| /Widgets/TitleBox, title => loc('Ticket metadata') &>
...@@ -219,6 +220,14 @@ unless ( $Ticket->CurrentUserHasRight('ShowTicket') ) { ...@@ -219,6 +220,14 @@ unless ( $Ticket->CurrentUserHasRight('ShowTicket') ) {
Abort("No permission to view ticket"); Abort("No permission to view ticket");
} }
if ( $ARGS{'MarkAsSeen'} ) {
$Ticket->SetAttribute(
Name => 'User-'. $Ticket->CurrentUser->id .'-SeenUpTo',
Content => $Ticket->LastUpdated,
);
push @results, loc('Marked all messages as seen');
}
# update id argument in the case we took merged or created new # update id argument in the case we took merged or created new
$ARGS{'id'} = $id = $Ticket->Id; $ARGS{'id'} = $id = $Ticket->Id;
...@@ -226,6 +235,7 @@ MaybeRedirectForResults( ...@@ -226,6 +235,7 @@ MaybeRedirectForResults(
Path => '/RTIR/Display.html', Path => '/RTIR/Display.html',
Actions => \@results, Actions => \@results,
Arguments => { id => $id }, Arguments => { id => $id },
Anchor => $ARGS{'Anchor'},
); );
if ( $Type eq 'Report' ) { if ( $Type eq 'Report' ) {
......
...@@ -50,6 +50,7 @@ ...@@ -50,6 +50,7 @@
% $m->callback(CallbackName => 'BeforeActionList', %ARGS, Actions => \@results, ARGSRef => \%ARGS, Ticket => $TicketObj); % $m->callback(CallbackName => 'BeforeActionList', %ARGS, Actions => \@results, ARGSRef => \%ARGS, Ticket => $TicketObj);
<& /Elements/ListActions, actions => \@results &> <& /Elements/ListActions, actions => \@results &>
<& /Ticket/Elements/ShowUpdateStatus, Ticket => $TicketObj, DisplayPath => 'RTIR' &>
<div class="summary"><&| /Widgets/TitleBox, title => loc('Ticket metadata') &> <div class="summary"><&| /Widgets/TitleBox, title => loc('Ticket metadata') &>
<table class="ticket-summary" width="100%"><tr><td class="boxcontainer" valign="top"> <table class="ticket-summary" width="100%"><tr><td class="boxcontainer" valign="top">
...@@ -268,10 +269,19 @@ unless( $new_ticket ) { ...@@ -268,10 +269,19 @@ unless( $new_ticket ) {
push @results, ProcessUpdateMessage( ARGSRef => \%ARGS, TicketObj => $TicketObj ); push @results, ProcessUpdateMessage( ARGSRef => \%ARGS, TicketObj => $TicketObj );
} }
if ( $ARGS{'MarkAsSeen'} ) {
$TicketObj->SetAttribute(
Name => 'User-'. $TicketObj->CurrentUser->id .'-SeenUpTo',
Content => $TicketObj->LastUpdated,
);
push @results, loc('Marked all messages as seen');
}
MaybeRedirectForResults( MaybeRedirectForResults(
Actions => \@results, Actions => \@results,
Path => "/RTIR/Display.html", Path => "/RTIR/Display.html",
Arguments => { id => $TicketObj->id }, Arguments => { id => $TicketObj->id },
Anchor => $ARGS{'Anchor'},
); );
# XXX: need the way to show @results when aborting # XXX: need the way to show @results when aborting
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment