From 945721f48f74d5cfffef7c7cf3a3d6bc2521f5dd Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 15 Jul 2003 13:16:32 +0000 Subject: import of rt 3.0.4 --- rt/html/Ticket/Display.html | 116 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 rt/html/Ticket/Display.html (limited to 'rt/html/Ticket/Display.html') diff --git a/rt/html/Ticket/Display.html b/rt/html/Ticket/Display.html new file mode 100644 index 000000000..cf32dce9d --- /dev/null +++ b/rt/html/Ticket/Display.html @@ -0,0 +1,116 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<& /Elements/Header, + Title => loc("#[_1]: [_2]", $Ticket->Id, $Ticket->Subject) &> +<& /Ticket/Elements/Tabs, + Ticket => $Ticket, + current_tab => 'Ticket/Display.html?id='.$Ticket->id, + Title => loc("#[_1]: [_2]", $Ticket->Id, $Ticket->Subject) &> + +<& /Elements/ListActions, actions => \@Actions &> + +<& /Ticket/Elements/ShowSummary, Ticket => $Ticket &> + + +
+<& /Ticket/Elements/ShowHistory , + Ticket => $Ticket, + Collapsed => $ARGS{'Collapsed'}, + ShowHeaders => $ARGS{'ShowHeaders'} &> + + +<%ARGS> +$id => undef +$Create => undef +$ShowHeaders => undef +$Collapsed => undef + + +<%INIT> + my ($linkid, $message, $tid, $Ticket, @Actions); + +$Ticket = new RT::Ticket($session{'CurrentUser'}); + +unless ($id) { + Abort('No ticket specified'); +} + +if ($ARGS{'id'} eq 'new') { + # {{{ Create a new ticket + + my $Queue = new RT::Queue($session{'CurrentUser'}); + unless ($Queue->Load($ARGS{'Queue'})) { + Abort('Queue not found'); + } + + unless ($Queue->CurrentUserHasRight('CreateTicket')) { + Abort('You have no permission to create tickets in that queue.'); + } + ($Ticket, @Actions) = + CreateTicket(Attachments => $session{'Attachments'}, %ARGS); + delete $session{'Attachments'}; + unless ($Ticket->CurrentUserHasRight('ShowTicket')) { + Abort("No permission to view newly created ticket #".$Ticket->id."."); + } + # }}} +} + +else { + $Ticket = LoadTicket($ARGS{'id'}); + unless ($Ticket->CurrentUserHasRight('ShowTicket')) { + Abort("No permission to view ticket"); + } + + +if (defined $ARGS{'Action'}) { + if ($ARGS{'Action'} =~ /^(Steal|Kill|Take|SetTold)$/) { + my $action = $1; + my ($res, $msg)=$Ticket->$action(); + push(@Actions, $msg); + } +} + + if ( $ARGS{'UpdateContent'} ) { + $ARGS{'UpdateContent'} =~ s/\r\n/\n/g; + if ( $ARGS{'UpdateContent'} ne '' + && $ARGS{'UpdateContent'} ne "-- \n" + . $session{'CurrentUser'}->UserObj->Signature ) { + $ARGS{UpdateAttachments} = $session{'Attachments'}; + ProcessUpdateMessage( ARGSRef => \%ARGS, + Actions => \@Actions, + TicketObj => $Ticket ); + delete $session{'Attachments'}; + } + } +#Process status updates +my @BasicActions = ProcessTicketBasics(ARGSRef => \%ARGS, TicketObj=>$Ticket); +my @results = ProcessTicketLinks( TicketObj => $Ticket, ARGSRef => \%ARGS); + +push (@Actions, @BasicActions, @results); +} + + + + + -- cgit v1.2.1 From 289340780927b5bac2c7604d7317c3063c6dd8cc Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 11 Mar 2004 02:05:38 +0000 Subject: import of rt 3.0.9 --- rt/html/Ticket/Display.html | 76 +++++++++++++++++++++++---------------------- 1 file changed, 39 insertions(+), 37 deletions(-) (limited to 'rt/html/Ticket/Display.html') diff --git a/rt/html/Ticket/Display.html b/rt/html/Ticket/Display.html index cf32dce9d..276cee62a 100644 --- a/rt/html/Ticket/Display.html +++ b/rt/html/Ticket/Display.html @@ -22,20 +22,20 @@ %# %# END LICENSE BLOCK <& /Elements/Header, - Title => loc("#[_1]: [_2]", $Ticket->Id, $Ticket->Subject) &> + Title => loc("#[_1]: [_2]", $TicketObj->Id, $TicketObj->Subject) &> <& /Ticket/Elements/Tabs, - Ticket => $Ticket, - current_tab => 'Ticket/Display.html?id='.$Ticket->id, - Title => loc("#[_1]: [_2]", $Ticket->Id, $Ticket->Subject) &> + Ticket => $TicketObj, + current_tab => 'Ticket/Display.html?id='.$TicketObj->id, + Title => loc("#[_1]: [_2]", $TicketObj->Id, $TicketObj->Subject) &> <& /Elements/ListActions, actions => \@Actions &> -<& /Ticket/Elements/ShowSummary, Ticket => $Ticket &> +<& /Ticket/Elements/ShowSummary, Ticket => $TicketObj &>
<& /Ticket/Elements/ShowHistory , - Ticket => $Ticket, + Ticket => $TicketObj, Collapsed => $ARGS{'Collapsed'}, ShowHeaders => $ARGS{'ShowHeaders'} &> @@ -45,14 +45,13 @@ $id => undef $Create => undef $ShowHeaders => undef $Collapsed => undef +$TicketObj => undef <%INIT> - my ($linkid, $message, $tid, $Ticket, @Actions); + my ($linkid, $message, $tid, @Actions); -$Ticket = new RT::Ticket($session{'CurrentUser'}); - -unless ($id) { +unless ($id || $TicketObj) { Abort('No ticket specified'); } @@ -67,47 +66,50 @@ if ($ARGS{'id'} eq 'new') { unless ($Queue->CurrentUserHasRight('CreateTicket')) { Abort('You have no permission to create tickets in that queue.'); } - ($Ticket, @Actions) = - CreateTicket(Attachments => $session{'Attachments'}, %ARGS); + ($TicketObj, @Actions) = + CreateTicket(Attachments => $session{'Attachments'}, %ARGS); delete $session{'Attachments'}; - unless ($Ticket->CurrentUserHasRight('ShowTicket')) { - Abort("No permission to view newly created ticket #".$Ticket->id."."); - } + unless ($TicketObj->CurrentUserHasRight('ShowTicket')) { + Abort("No permission to view newly created ticket #".$TicketObj->id."."); + } # }}} -} +} else { + if (!$TicketObj) { -else { - $Ticket = LoadTicket($ARGS{'id'}); - unless ($Ticket->CurrentUserHasRight('ShowTicket')) { - Abort("No permission to view ticket"); - } + $TicketObj = RT::Ticket->new($session{'CurrentUser'}); + $TicketObj = LoadTicket($ARGS{'id'}); + unless ($TicketObj->CurrentUserHasRight('ShowTicket')) { + Abort("No permission to view ticket"); + } + } -if (defined $ARGS{'Action'}) { - if ($ARGS{'Action'} =~ /^(Steal|Kill|Take|SetTold)$/) { - my $action = $1; - my ($res, $msg)=$Ticket->$action(); - push(@Actions, $msg); - } -} + if (defined $ARGS{'Action'}) { + if ($ARGS{'Action'} =~ /^(Steal|Kill|Take|SetTold)$/) { + my $action = $1; + my ($res, $msg)=$TicketObj->$action(); + push(@Actions, $msg); + } + } - if ( $ARGS{'UpdateContent'} ) { + if ( $ARGS{'UpdateContent'} || $session{'Attachments'}) { $ARGS{'UpdateContent'} =~ s/\r\n/\n/g; - if ( $ARGS{'UpdateContent'} ne '' - && $ARGS{'UpdateContent'} ne "-- \n" - . $session{'CurrentUser'}->UserObj->Signature ) { + if ( $session{'Attachments'} || + ( $ARGS{'UpdateContent'} ne '' + && $ARGS{'UpdateContent'} ne "-- \n" + . $session{'CurrentUser'}->UserObj->Signature )) { $ARGS{UpdateAttachments} = $session{'Attachments'}; ProcessUpdateMessage( ARGSRef => \%ARGS, Actions => \@Actions, - TicketObj => $Ticket ); + TicketObj => $TicketObj ); delete $session{'Attachments'}; } } -#Process status updates -my @BasicActions = ProcessTicketBasics(ARGSRef => \%ARGS, TicketObj=>$Ticket); -my @results = ProcessTicketLinks( TicketObj => $Ticket, ARGSRef => \%ARGS); + #Process status updates + my @BasicActions = ProcessTicketBasics(ARGSRef => \%ARGS, TicketObj=>$TicketObj); + my @results = ProcessTicketLinks( TicketObj => $TicketObj, ARGSRef => \%ARGS); -push (@Actions, @BasicActions, @results); + push (@Actions, @BasicActions, @results); } -- cgit v1.2.1 From c582e92888b4a5553e1b4e5214cf35217e4a0cf0 Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 11 Nov 2004 12:13:50 +0000 Subject: import rt 3.0.12 --- rt/html/Ticket/Display.html | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) (limited to 'rt/html/Ticket/Display.html') diff --git a/rt/html/Ticket/Display.html b/rt/html/Ticket/Display.html index 276cee62a..4a8983e6e 100644 --- a/rt/html/Ticket/Display.html +++ b/rt/html/Ticket/Display.html @@ -30,14 +30,18 @@ <& /Elements/ListActions, actions => \@Actions &> -<& /Ticket/Elements/ShowSummary, Ticket => $TicketObj &> +<& /Ticket/Elements/ShowSummary, Ticket => $TicketObj, Attachments => $attachments &>
<& /Ticket/Elements/ShowHistory , Ticket => $TicketObj, Collapsed => $ARGS{'Collapsed'}, - ShowHeaders => $ARGS{'ShowHeaders'} &> + ShowHeaders => $ARGS{'ShowHeaders'}, + Attachments => $attachments, + AttachmentContent => $attachment_content + + &> <%ARGS> @@ -92,18 +96,17 @@ if ($ARGS{'id'} eq 'new') { } } - if ( $ARGS{'UpdateContent'} || $session{'Attachments'}) { - $ARGS{'UpdateContent'} =~ s/\r\n/\n/g; - if ( $session{'Attachments'} || - ( $ARGS{'UpdateContent'} ne '' - && $ARGS{'UpdateContent'} ne "-- \n" - . $session{'CurrentUser'}->UserObj->Signature )) { - $ARGS{UpdateAttachments} = $session{'Attachments'}; - ProcessUpdateMessage( ARGSRef => \%ARGS, - Actions => \@Actions, - TicketObj => $TicketObj ); - delete $session{'Attachments'}; - } + $ARGS{'UpdateContent'} =~ s/\r\n/\n/g; + if ( $ARGS{'UpdateTimeWorked'} || + $session{'Attachments'} || + ( $ARGS{'UpdateContent'} ne '' + && $ARGS{'UpdateContent'} ne "-- \n" + . $session{'CurrentUser'}->UserObj->Signature )) { + $ARGS{UpdateAttachments} = $session{'Attachments'}; + ProcessUpdateMessage( ARGSRef => \%ARGS, + Actions => \@Actions, + TicketObj => $TicketObj ); + delete $session{'Attachments'}; } #Process status updates my @BasicActions = ProcessTicketBasics(ARGSRef => \%ARGS, TicketObj=>$TicketObj); @@ -111,6 +114,11 @@ if ($ARGS{'id'} eq 'new') { push (@Actions, @BasicActions, @results); } + +my $attachments = $m->comp('Elements/FindAttachments', Ticket => $TicketObj); +my $attachment_content = $m->comp('Elements/LoadTextAttachments', Ticket => $TicketObj); + + -- cgit v1.2.1 From d39d52aac8f38ea9115628039f0df5aa3ac826de Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 3 Dec 2004 20:40:48 +0000 Subject: import rt 3.2.2 --- rt/html/Ticket/Display.html | 61 +++++++++++++++++++++++++++++++++------------ 1 file changed, 45 insertions(+), 16 deletions(-) (limited to 'rt/html/Ticket/Display.html') diff --git a/rt/html/Ticket/Display.html b/rt/html/Ticket/Display.html index 4a8983e6e..745ed42d2 100644 --- a/rt/html/Ticket/Display.html +++ b/rt/html/Ticket/Display.html @@ -1,8 +1,14 @@ -%# BEGIN LICENSE BLOCK +%# {{{ BEGIN BPS TAGGED BLOCK %# -%# Copyright (c) 1996-2003 Jesse Vincent +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# %# -%# (Except where explictly superceded by other copyright notices) +%# (Except where explicitly superseded by other copyright notices) +%# +%# +%# LICENSE: %# %# This work is made available to you under the terms of Version 2 of %# the GNU General Public License. A copy of that license should have @@ -14,13 +20,29 @@ %# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU %# General Public License for more details. %# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. +%# You should have received a copy of the GNU General Public License +%# along with this program; if not, write to the Free Software +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# +%# +%# CONTRIBUTION SUBMISSION POLICY: %# +%# (The following paragraph is not intended to limit the rights granted +%# to you to modify and distribute this software under the terms of +%# the GNU General Public License and is only of importance to you if +%# you choose to contribute your changes and enhancements to the +%# community by submitting them to Best Practical Solutions, LLC.) %# -%# END LICENSE BLOCK +%# By intentionally submitting any modifications, corrections or +%# derivatives to this work, or any other work intended for use with +%# Request Tracker, to Best Practical Solutions, LLC, you confirm that +%# you are the copyright holder for those contributions and you grant +%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, +%# royalty-free, perpetual, license to use, copy, create derivative +%# works based on those contributions, and sublicense and distribute +%# those contributions and any derivatives thereof. +%# +%# }}} END BPS TAGGED BLOCK <& /Elements/Header, Title => loc("#[_1]: [_2]", $TicketObj->Id, $TicketObj->Subject) &> <& /Ticket/Elements/Tabs, @@ -30,12 +52,15 @@ <& /Elements/ListActions, actions => \@Actions &> +<& /Elements/TitleBoxStart, title => loc('Ticket metadata'), contentbg => +'#ffffff' &> <& /Ticket/Elements/ShowSummary, Ticket => $TicketObj, Attachments => $attachments &> - +<& /Elements/TitleBoxEnd &>
<& /Ticket/Elements/ShowHistory , Ticket => $TicketObj, + Tickets => $Tickets, Collapsed => $ARGS{'Collapsed'}, ShowHeaders => $ARGS{'ShowHeaders'}, Attachments => $attachments, @@ -47,13 +72,16 @@ <%ARGS> $id => undef $Create => undef -$ShowHeaders => undef +$ShowHeaders => 0 $Collapsed => undef $TicketObj => undef <%INIT> - my ($linkid, $message, $tid, @Actions); + +$m->comp('/Elements/Callback', _CallbackName => 'Initial', TicketObj => $TicketObj, ARGSRef => \%ARGS); + +my ($linkid, $message, $tid, @Actions, $Tickets); unless ($id || $TicketObj) { Abort('No ticket specified'); @@ -110,17 +138,18 @@ if ($ARGS{'id'} eq 'new') { } #Process status updates my @BasicActions = ProcessTicketBasics(ARGSRef => \%ARGS, TicketObj=>$TicketObj); - my @results = ProcessTicketLinks( TicketObj => $TicketObj, ARGSRef => \%ARGS); + my @results = ProcessTicketLinks( TicketObj => $TicketObj, ARGSRef => \%ARGS); push (@Actions, @BasicActions, @results); } -my $attachments = $m->comp('Elements/FindAttachments', Ticket => $TicketObj); -my $attachment_content = $m->comp('Elements/LoadTextAttachments', Ticket => $TicketObj); - - +$m->comp('/Elements/Callback', _CallbackName => 'BeforeDisplay', + TicketObj => \$TicketObj, Tickets => \$Tickets, ARGSRef => \%ARGS); +my $attachments = $m->comp('Elements/FindAttachments', Ticket => $TicketObj, Tickets => $Tickets); +my $attachment_content = $m->comp('Elements/LoadTextAttachments', Ticket => $TicketObj); + -- cgit v1.2.1 From d4d0590bef31071e8809ec046717444b95b3f30a Mon Sep 17 00:00:00 2001 From: ivan Date: Sat, 15 Oct 2005 09:11:20 +0000 Subject: import rt 3.4.4 --- rt/html/Ticket/Display.html | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'rt/html/Ticket/Display.html') diff --git a/rt/html/Ticket/Display.html b/rt/html/Ticket/Display.html index 745ed42d2..dd4c093dc 100644 --- a/rt/html/Ticket/Display.html +++ b/rt/html/Ticket/Display.html @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,7 +42,7 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK +%# END BPS TAGGED BLOCK }}} <& /Elements/Header, Title => loc("#[_1]: [_2]", $TicketObj->Id, $TicketObj->Subject) &> <& /Ticket/Elements/Tabs, @@ -58,6 +58,9 @@ <& /Elements/TitleBoxEnd &>
+ +<& /Elements/Callback, _CallbackName => 'BeforeShowHistory', Ticket => $TicketObj, %ARGS &> + <& /Ticket/Elements/ShowHistory , Ticket => $TicketObj, Tickets => $Tickets, @@ -124,10 +127,11 @@ if ($ARGS{'id'} eq 'new') { } } - $ARGS{'UpdateContent'} =~ s/\r\n/\n/g; + $ARGS{'UpdateContent'} =~ s/\r\n/\n/g if defined $ARGS{'UpdateContent'}; if ( $ARGS{'UpdateTimeWorked'} || $session{'Attachments'} || - ( $ARGS{'UpdateContent'} ne '' + ( defined $ARGS{'UpdateContent'} + && $ARGS{'UpdateContent'} ne '' && $ARGS{'UpdateContent'} ne "-- \n" . $session{'CurrentUser'}->UserObj->Signature )) { $ARGS{UpdateAttachments} = $session{'Attachments'}; -- cgit v1.2.1