Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
best-practical
rtir
Commits
b6f8574c
Commit
b6f8574c
authored
Jul 17, 2014
by
Kevin Falcone
Browse files
Merge branch '3.0/display-mark-as-seen' into 3.0-trunk
parents
deb1f1c7
747a6150
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
0 deletions
+20
-0
html/RTIR/Display.html
html/RTIR/Display.html
+10
-0
html/RTIR/Incident/Display.html
html/RTIR/Incident/Display.html
+10
-0
No files found.
html/RTIR/Display.html
View file @
b6f8574c
...
@@ -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' ) {
...
...
html/RTIR/Incident/Display.html
View file @
b6f8574c
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment