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/Attachment/dhandler | 38 +++- rt/html/Ticket/Create.html | 46 +++- rt/html/Ticket/Display.html | 61 ++++-- rt/html/Ticket/Elements/AddWatchers | 38 +++- rt/html/Ticket/Elements/BulkLinks | 38 +++- rt/html/Ticket/Elements/EditBasics | 117 +++++----- rt/html/Ticket/Elements/EditCustomField | 38 +++- rt/html/Ticket/Elements/EditCustomFields | 38 +++- rt/html/Ticket/Elements/EditDates | 38 +++- rt/html/Ticket/Elements/EditPeople | 40 +++- rt/html/Ticket/Elements/EditWatchers | 40 +++- rt/html/Ticket/Elements/FindAttachments | 90 ++++++-- rt/html/Ticket/Elements/LoadTextAttachments | 45 ++++ rt/html/Ticket/Elements/PreviewScrips | 124 +++++++++++ rt/html/Ticket/Elements/ShowAttachments | 42 +++- rt/html/Ticket/Elements/ShowBasics | 59 +++-- rt/html/Ticket/Elements/ShowCustomFields | 38 +++- rt/html/Ticket/Elements/ShowDates | 39 +++- rt/html/Ticket/Elements/ShowDependencies | 38 +++- rt/html/Ticket/Elements/ShowGroupMembers | 60 +++++ rt/html/Ticket/Elements/ShowHistory | 67 ++++-- rt/html/Ticket/Elements/ShowMemberOf | 38 +++- rt/html/Ticket/Elements/ShowMembers | 38 +++- rt/html/Ticket/Elements/ShowMessageHeaders | 76 ++++++- rt/html/Ticket/Elements/ShowMessageStanza | 38 +++- rt/html/Ticket/Elements/ShowPeople | 45 +++- rt/html/Ticket/Elements/ShowReferences | 38 +++- rt/html/Ticket/Elements/ShowRequestor | 41 +++- rt/html/Ticket/Elements/ShowSummary | 46 +++- rt/html/Ticket/Elements/ShowTransaction | 241 ++++++++++----------- rt/html/Ticket/Elements/ShowTransactionAttachments | 196 +++++++++++++++++ rt/html/Ticket/Elements/ShowUserEntry | 55 +++++ rt/html/Ticket/Elements/Tabs | 79 +++++-- rt/html/Ticket/History.html | 38 +++- rt/html/Ticket/Modify.html | 38 +++- rt/html/Ticket/ModifyAll.html | 44 +++- rt/html/Ticket/ModifyDates.html | 38 +++- rt/html/Ticket/ModifyLinks.html | 42 +++- rt/html/Ticket/ModifyPeople.html | 38 +++- rt/html/Ticket/ShowEmailRecord.html | 71 ++++++ rt/html/Ticket/Update.html | 88 ++++---- 41 files changed, 1908 insertions(+), 554 deletions(-) create mode 100755 rt/html/Ticket/Elements/PreviewScrips create mode 100644 rt/html/Ticket/Elements/ShowGroupMembers create mode 100644 rt/html/Ticket/Elements/ShowTransactionAttachments create mode 100644 rt/html/Ticket/Elements/ShowUserEntry create mode 100644 rt/html/Ticket/ShowEmailRecord.html (limited to 'rt/html/Ticket') diff --git a/rt/html/Ticket/Attachment/dhandler b/rt/html/Ticket/Attachment/dhandler index ba82b5f2e..27b88bd14 100644 --- a/rt/html/Ticket/Attachment/dhandler +++ b/rt/html/Ticket/Attachment/dhandler @@ -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.) %# +%# 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 LICENSE BLOCK +%# }}} END BPS TAGGED BLOCK <%perl> my ($ticket, $trans,$attach, $filename); my $arg = $m->dhandler_arg; # get rest of path diff --git a/rt/html/Ticket/Create.html b/rt/html/Ticket/Create.html index 9b5783cee..fd2af45ff 100644 --- a/rt/html/Ticket/Create.html +++ b/rt/html/Ticket/Create.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.) %# +%# 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 LICENSE BLOCK +%# }}} END BPS TAGGED BLOCK <& /Elements/Header, Title => loc("Create a new ticket") &> <& /Elements/Tabs, current_toptab => "Ticket/Create.html", @@ -41,13 +63,13 @@ <&|/l&>Status: -<& /Elements/SelectStatus, Name => "Status", Default => $ARGS{Status}||'new' &> +<& /Elements/SelectStatus, Name => "Status", Default => $ARGS{Status}||'new', DefaultValue => 0 &> <&|/l&>Owner: -<& /Elements/SelectOwner, Name => "Owner", QueueObj => $QueueObj, Default => $ARGS{Owner}||undef &> +<& /Elements/SelectOwner, Name => "Owner", QueueObj => $QueueObj, Default => $ARGS{Owner}||$RT::Nobody->Id, DefaultValue => 0 &> @@ -171,7 +193,7 @@ $ARGS{Due}%>"> -<& /Elements/TitleBoxStart, title => loc('Relationships'), +<& /Elements/TitleBoxStart, title => loc('Links'), title_class=> 'inverse', titleright => '', color=> "#336633" &> @@ -255,7 +277,7 @@ unless (keys %{$session{'Attachments'}} and $ARGS{'id'} eq 'new') { if ((!exists $ARGS{'AddMoreAttach'}) && ($ARGS{'id'} eq 'new')) { # new ticket? $m->comp('Display.html', %ARGS); - $m->abort(); + return(); } 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); + diff --git a/rt/html/Ticket/Elements/AddWatchers b/rt/html/Ticket/Elements/AddWatchers index 96dd38f08..f70e86a17 100644 --- a/rt/html/Ticket/Elements/AddWatchers +++ b/rt/html/Ticket/Elements/AddWatchers @@ -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.) %# +%# 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 LICENSE BLOCK +%# }}} END BPS TAGGED BLOCK
<%$msg%>
diff --git a/rt/html/Ticket/Elements/BulkLinks b/rt/html/Ticket/Elements/BulkLinks index e6b9cd54f..c071bd1cc 100644 --- a/rt/html/Ticket/Elements/BulkLinks +++ b/rt/html/Ticket/Elements/BulkLinks @@ -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.) %# +%# 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 LICENSE BLOCK +%# }}} END BPS TAGGED BLOCK diff --git a/rt/html/Ticket/Elements/EditBasics b/rt/html/Ticket/Elements/EditBasics index 5d66b1fc1..7ad4a63b0 100644 --- a/rt/html/Ticket/Elements/EditBasics +++ b/rt/html/Ticket/Elements/EditBasics @@ -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,62 +20,71 @@ %# 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
<&|/l&>Merge into:
- - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<& /Elements/Callback, _CallbackName => 'EndOfList', TicketObj => $TicketObj, %ARGS &>
- + - -
<&|/l&>Subject: - -
-
- - - - - - - -
- <& /Elements/ShadedBox, - title => loc('Status'), - content => $SelectStatus &> - - <& /Elements/ShadedBox, - title => loc('Time Worked'), - content => "TimeWorked."\" SIZE=5>" &> - - <& /Elements/ShadedBox, - title => loc('Time Left'), - content => "TimeLeft."\" SIZE=5>" -&> - - <& /Elements/ShadedBox, - title => loc('Priority'), - content => "Priority."\" SIZE=3>" &> - - <& /Elements/ShadedBox, - title => loc('Final Priority'), - content => "FinalPriority."\" SIZE=3>" &> - - <& /Elements/ShadedBox, - title => loc('Queue'), - content => "$SelectQueue" &> -
-
<&|/l&>Status:<%$SelectStatus|n%>
<&|/l&>Queue:<%$SelectQueue|n%>
<&|/l&>Time Estimated:
<&|/l&>Time Worked:
<&|/l&>Time Left:
<&|/l&>Priority:
<&|/l&>Final Priority:
<%INIT> #It's hard to do this inline, so we'll preload the html of the selectstatus in here. -my $SelectStatus = $m->scomp("/Elements/SelectStatus", Name => 'Status', Default=> $TicketObj->Status); +my $SelectStatus = $m->scomp("/Elements/SelectStatus", Name => 'Status', DefaultLabel => loc("[_1] (Unchanged)",$TicketObj->Status)); my $SelectQueue = $m->scomp("/Elements/SelectQueue", Name => 'Queue', Default =>$TicketObj->QueueObj->Id); diff --git a/rt/html/Ticket/Elements/EditCustomField b/rt/html/Ticket/Elements/EditCustomField index 16348061e..74e57ddf3 100644 --- a/rt/html/Ticket/Elements/EditCustomField +++ b/rt/html/Ticket/Elements/EditCustomField @@ -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.) %# +%# 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 LICENSE BLOCK +%# }}} END BPS TAGGED BLOCK % my $Values; % if ($TicketObj) { % $Values = $TicketObj->CustomFieldValues($CustomField->id); diff --git a/rt/html/Ticket/Elements/EditCustomFields b/rt/html/Ticket/Elements/EditCustomFields index 6b2738965..b049751ff 100644 --- a/rt/html/Ticket/Elements/EditCustomFields +++ b/rt/html/Ticket/Elements/EditCustomFields @@ -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.) %# +%# 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 LICENSE BLOCK +%# }}} END BPS TAGGED BLOCK
diff --git a/rt/html/Ticket/Elements/EditDates b/rt/html/Ticket/Elements/EditDates index 1f3bf1b49..8e12f2534 100644 --- a/rt/html/Ticket/Elements/EditDates +++ b/rt/html/Ticket/Elements/EditDates @@ -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.) %# +%# 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 LICENSE BLOCK +%# }}} END BPS TAGGED BLOCK diff --git a/rt/html/Ticket/Elements/EditPeople b/rt/html/Ticket/Elements/EditPeople index a1fc0111a..4b2a1ac81 100644 --- a/rt/html/Ticket/Elements/EditPeople +++ b/rt/html/Ticket/Elements/EditPeople @@ -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.) %# +%# 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 LICENSE BLOCK +%# }}} END BPS TAGGED BLOCK
<&|/l&>Starts:
@@ -40,7 +62,7 @@ GroupField => $GroupField, PrivilegedOnly => $PrivilegedOnly &>

<&|/l&>Owner

-<&|/l&>Owner: <& /Elements/SelectOwner, Name => 'Owner', QueueObj => $Ticket->QueueObj, TicketObj => $Ticket, Default => $Ticket->OwnerObj->Id &> +<&|/l&>Owner: <& /Elements/SelectOwner, Name => 'Owner', QueueObj => $Ticket->QueueObj, TicketObj => $Ticket, Default => $Ticket->OwnerObj->Id, DefaultValue => 0&>

<&|/l&>Current watchers

<&|/l&>(Check box to delete)
diff --git a/rt/html/Ticket/Elements/EditWatchers b/rt/html/Ticket/Elements/EditWatchers index 145071cec..19c884bd8 100644 --- a/rt/html/Ticket/Elements/EditWatchers +++ b/rt/html/Ticket/Elements/EditWatchers @@ -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.) %# +%# 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 LICENSE BLOCK +%# }}} END BPS TAGGED BLOCK
    %# Print out a placeholder if there are none. %if ($Members->Count == 0 ) { @@ -30,7 +52,7 @@ %while (my $watcher=$Members->Next) {
  • - + %if ($watcher->MemberObj->IsUser) { <%$watcher->MemberObj->Object->Name%> diff --git a/rt/html/Ticket/Elements/FindAttachments b/rt/html/Ticket/Elements/FindAttachments index b8a0dd8b6..a1e973f0e 100755 --- a/rt/html/Ticket/Elements/FindAttachments +++ b/rt/html/Ticket/Elements/FindAttachments @@ -1,3 +1,48 @@ +%# {{{ BEGIN BPS TAGGED BLOCK +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# +%# +%# (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 +%# 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. +%# +%# 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.) +%# +%# 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 <%INIT> my %documents; @@ -6,41 +51,40 @@ my %documents; # We force the cache of ticket transactions to get populated up front. otherwise, the # code that looks at attachments will look at each one in turn. -my $transactions = $Ticket->Transactions->First; - - my $attachments = RT::Attachments->new( $session{'CurrentUser'} ); $attachments->Columns( qw( Id Filename ContentType Headers Subject Parent ContentEncoding ContentType TransactionId Created)); -if ( $Ticket->CurrentUserHasRight('ShowTicket') ) { - my $transactions = $attachments->NewAlias('Transactions'); - $attachments->Join( ALIAS1 => 'main', - FIELD1 => 'TransactionId', - ALIAS2 => $transactions, - FIELD2 => 'id' ); +my $transactions = $attachments->NewAlias('Transactions'); +$attachments->Join( ALIAS1 => 'main', + FIELD1 => 'TransactionId', + ALIAS2 => $transactions, + FIELD2 => 'id' ); - my $tickets = $attachments->NewAlias('Tickets'); +my $tickets = $attachments->NewAlias('Tickets'); - $attachments->Join( ALIAS1 => $transactions, - FIELD1 => 'Ticket', - ALIAS2 => $tickets, - FIELD2 => 'id' ); +$attachments->Join( ALIAS1 => $transactions, + FIELD1 => 'Ticket', + ALIAS2 => $tickets, + FIELD2 => 'id' ); - $attachments->Limit( ALIAS => $tickets, - FIELD => 'EffectiveId', - VALUE => $Ticket->id() ); - # if the user may not see comments do not return them - unless ( $Ticket->CurrentUserHasRight('ShowTicketComments') ) { - $attachments->Limit( ALIAS => $transactions, - FIELD => 'Type', - OPERATOR => '!=', - VALUE => "Comment" ); +if ($Tickets) { + while ($Ticket = $Tickets->Next) { + $attachments->Limit( ALIAS => $tickets, + FIELD => 'EffectiveId', + VALUE => $Ticket->id() ); } +} else { + $attachments->Limit( ALIAS => $tickets, + FIELD => 'EffectiveId', + VALUE => $Ticket->id() ); } + + return ($attachments); <%ARGS> $Ticket => undef +$Tickets => undef diff --git a/rt/html/Ticket/Elements/LoadTextAttachments b/rt/html/Ticket/Elements/LoadTextAttachments index 084502e4c..370371b5a 100755 --- a/rt/html/Ticket/Elements/LoadTextAttachments +++ b/rt/html/Ticket/Elements/LoadTextAttachments @@ -1,3 +1,48 @@ +%# {{{ BEGIN BPS TAGGED BLOCK +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# +%# +%# (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 +%# 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. +%# +%# 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.) +%# +%# 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 <%INIT> my $attachments = RT::Attachments->new( $session{'CurrentUser'} ); diff --git a/rt/html/Ticket/Elements/PreviewScrips b/rt/html/Ticket/Elements/PreviewScrips new file mode 100755 index 000000000..846c62c24 --- /dev/null +++ b/rt/html/Ticket/Elements/PreviewScrips @@ -0,0 +1,124 @@ +%# {{{ BEGIN BPS TAGGED BLOCK +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# +%# +%# (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 +%# 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. +%# +%# 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.) +%# +%# 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 +<%args> +$TicketObj => undef + + +<%init> + +my $arg = 'Ticket-'.$TicketObj->Id.'-SquelchMailTo'; +my @squelchto = ref($ARGS{$arg}) eq 'ARRAY' ? @{$ARGS{$arg}} : ($ARGS{$arg}); + +foreach my $address (@squelchto) { + $TicketObj->SquelchMailTo($address) if ($address); +} + + +$arg = 'Ticket-'.$TicketObj->Id.'-UnsquelchMailTo'; +my @unsquelchto = ref($ARGS{$arg}) eq 'ARRAY' ? @{$ARGS{$arg}} : ($ARGS{$arg}); + +foreach my $address (@unsquelchto) { + $TicketObj->UnsquelchMailTo($address) if ($address); +} + + +my $action; + +if (( $ARGS{'UpdateType'} eq 'response' ) || ($ARGS{'Action'} eq 'Respond' )) { + $action = 'Correspond'; +} +else { + $action = 'Comment'; +} + +my $Message = MakeMIMEEntity( + Subject => $ARGS{'UpdateSubject'}, + Body => $ARGS{'UpdateContent'}, +); + +my ( $Transaction, $Description, $Object ) = $TicketObj->$action( + CcMessageTo => $ARGS{'UpdateCc'}, + BccMessageTo => $ARGS{'UpdateBcc'}, + MIMEObj => $Message, + TimeTaken => $ARGS{'UpdateTimeWorked'}, + DryRun => 1 +); + + +my @non_recipients = $TicketObj->SquelchMailTo; + +

    <&|/l&>This message will be sent to...

    +<&|/l&>(Check boxes to disable notifications to the listed recipients)
    +% foreach my $scrip (@{$Object->Scrips->Prepared}) { +% next unless $scrip->ActionObj->Action->isa('RT::Action::SendEmail'); +<%$scrip->Description%>
    +<&|/l, $scrip->ConditionObj->Name, $scrip->ActionObj->Name, $scrip->TemplateObj->Name&>[_1] [_2] with template [_3] +
    +%foreach my $type qw(To Cc Bcc) { +%my @addresses = $scrip->ActionObj->Action->$type(); +
      +%foreach my $addr (@addresses) { +
    • <%loc($type)%>: <%$addr->address%> +% } +
    +% } +% if ($RT::PreviewScripMessages) { + +% } +%} +
    +

    <&|/l&>Messages about this ticket will not be sent to...

    +<&|/l&>(Check boxes to enable notifications to the listed recipients) +
    +
      +% foreach my $recipient (@non_recipients) { +
    • +<% $recipient->Content %> +% } +
    +<& /Elements/Submit, Value => 'UpdatePreview', Label => loc('Save changes')&> diff --git a/rt/html/Ticket/Elements/ShowAttachments b/rt/html/Ticket/Elements/ShowAttachments index bdda1692c..8a2a5cb3f 100644 --- a/rt/html/Ticket/Elements/ShowAttachments +++ b/rt/html/Ticket/Elements/ShowAttachments @@ -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,20 +20,35 @@ %# 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.) %# +%# 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 LICENSE BLOCK +%# }}} END BPS TAGGED BLOCK % if (keys %documents) { <& /Elements/TitleBoxStart, title => loc('Attachments'), title_class=> 'inverse', color => "#336699" &> % foreach my $key (keys %documents) { -% my $fontsize='size="-1"'; <%$key%>
    diff --git a/rt/html/Ticket/Elements/ShowBasics b/rt/html/Ticket/Elements/ShowBasics index ad23e8c8c..55e923fa2 100644 --- a/rt/html/Ticket/Elements/ShowBasics +++ b/rt/html/Ticket/Elements/ShowBasics @@ -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.) %# +%# 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 LICENSE BLOCK +%# }}} END BPS TAGGED BLOCK @@ -30,9 +52,21 @@ +% if ($Ticket->TimeEstimated) { + + + + +% } +% if ($Ticket->TimeWorked) { - + + +% } + + + @@ -42,13 +76,8 @@ +<& /Elements/Callback, _CallbackName => 'EndOfList', TicketObj => $Ticket, %ARGS &>
    <&|/l&>Id:<&|/l&>Status: <&|/l&><% $Ticket->Status%>
    <&|/l&>Estimated:<&|/l, $Ticket->TimeEstimated &>[_1] min
    <&|/l&>Worked:<&|/l, $TimeWorked &>[_1] min<&|/l, $Ticket->TimeWorked &>[_1] min
    <&|/l&>Left:<&|/l, $Ticket->TimeLeft &>[_1] min
    <&|/l&>Priority:<&|/l&>Queue: <%$Ticket->QueueObj->Name%>
    -<%INIT> -my $TimeWorked = $Ticket->TimeWorked; -if ($Ticket->TimeLeft > 0 ) { - $TimeWorked = $Ticket->TimeWorked."/".$Ticket->TimeLeft; -} - <%ARGS> $Ticket => undef diff --git a/rt/html/Ticket/Elements/ShowCustomFields b/rt/html/Ticket/Elements/ShowCustomFields index 50d28f0d1..895439e1b 100644 --- a/rt/html/Ticket/Elements/ShowCustomFields +++ b/rt/html/Ticket/Elements/ShowCustomFields @@ -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.) %# +%# 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 LICENSE BLOCK +%# }}} END BPS TAGGED BLOCK % my @entry_fields; % while (my $CustomField = $CustomFields->Next()) { diff --git a/rt/html/Ticket/Elements/ShowDates b/rt/html/Ticket/Elements/ShowDates index 70c95efc0..a22a02d5c 100644 --- a/rt/html/Ticket/Elements/ShowDates +++ b/rt/html/Ticket/Elements/ShowDates @@ -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,14 +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.) %# +%# 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 LICENSE BLOCK - +%# }}} END BPS TAGGED BLOCK
    diff --git a/rt/html/Ticket/Elements/ShowDependencies b/rt/html/Ticket/Elements/ShowDependencies index b7f396871..d3bdd59bc 100644 --- a/rt/html/Ticket/Elements/ShowDependencies +++ b/rt/html/Ticket/Elements/ShowDependencies @@ -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.) %# +%# 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 LICENSE BLOCK +%# }}} END BPS TAGGED BLOCK <&|/l&>Depends on:
    % while (my $Link = $Ticket->DependsOn->Next) { % my $member = $Link->TargetObj; diff --git a/rt/html/Ticket/Elements/ShowGroupMembers b/rt/html/Ticket/Elements/ShowGroupMembers new file mode 100644 index 000000000..1d6e71182 --- /dev/null +++ b/rt/html/Ticket/Elements/ShowGroupMembers @@ -0,0 +1,60 @@ +%# {{{ BEGIN BPS TAGGED BLOCK +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# +%# +%# (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 +%# 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. +%# +%# 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.) +%# +%# 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 +%# Released under the terms of version 2 of the GNU Public License + +% my $UserMembers = $Group->UserMembersObj; +% while (my $member = $UserMembers->Next()) { +<& ShowUserEntry, User => $member &>
    +% } +% my $GroupMembers = $Group->MembersObj; +% $GroupMembers->LimitToGroups(); +% while (my $member = $GroupMembers->Next()) { +<&|/l&>Group: <%$member->MemberObj->Object->Name%>
    +% } + +<%ARGS> +$Group => undef + \ No newline at end of file diff --git a/rt/html/Ticket/Elements/ShowHistory b/rt/html/Ticket/Elements/ShowHistory index c4fe41747..37b670d82 100644 --- a/rt/html/Ticket/Elements/ShowHistory +++ b/rt/html/Ticket/Elements/ShowHistory @@ -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: %# -%# END LICENSE BLOCK +%# (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.) +%# +%# 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 <%perl> if ($ShowDisplayModes or $ShowTitle) { my $title; @@ -32,7 +54,7 @@ else { $title = ' '; } $titleright = loc('Display mode') . ":"; -if ($ShowHeaders && $ShowHeaders == $Ticket->Id ) { +if ($ShowHeaders) { $titleright .= "[" . loc("Brief headers") @@ -44,8 +66,8 @@ else { . loc("Brief headers") . "] [" . loc("Full headers") . "]"; } @@ -72,8 +94,6 @@ while ( my $Transaction = $Transactions->Next ) { next if $skip; $i++; - $m->out('') if ( $Transactions->IsLast ); - my @trans_attachments = grep { $_->TransactionId == $Transaction->Id } @attachments; my $trans_content = {}; @@ -93,7 +113,8 @@ while ( my $Transaction = $Transactions->Next ) { RowNum => $i, ShowTitleBarCommands => $ShowTitleBarCommands, Attachments => \@trans_attachments, - AttachmentContent => $trans_content + AttachmentContent => $trans_content, + LastTransaction => $Transactions->IsLast ); } @@ -103,20 +124,26 @@ while ( my $Transaction = $Transactions->Next ) { <& /Elements/TitleBoxEnd &> % } <%INIT> - -my $Transactions = $Ticket->Transactions; +my $Transactions = new RT::Transactions($session{'CurrentUser'}); +if ($Tickets) { + while (my $t = $Tickets->Next) { + $Transactions->Limit(FIELD => 'Ticket', + OPERATOR => '=', + VALUE => $t->Id); + } +} else { + $Transactions = $Ticket->Transactions; +} my $i; - -$Attachments ||= $m->comp('/Ticket/Elements/FindAttachments', Ticket => $Ticket); +$Attachments ||= $m->comp('/Ticket/Elements/FindAttachments', Ticket => $Ticket, Tickets => $Tickets || undef); $AttachmentContent ||= $m->comp('/Ticket/Elements/LoadTextAttachments', Ticket => $Ticket); - - <%ARGS> $URIFile => $RT::WebPath."/Ticket/Display.html" $Ticket => undef +$Tickets => undef $Attachments => undef $AttachmentContent => undef $ShowHeaders => undef diff --git a/rt/html/Ticket/Elements/ShowMemberOf b/rt/html/Ticket/Elements/ShowMemberOf index 79e0a3ba2..eb285d34b 100644 --- a/rt/html/Ticket/Elements/ShowMemberOf +++ b/rt/html/Ticket/Elements/ShowMemberOf @@ -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.) %# +%# 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 LICENSE BLOCK +%# }}} END BPS TAGGED BLOCK
      % my $memberof = $Ticket->MemberOf; % while (my $member_of = $memberof->Next) { diff --git a/rt/html/Ticket/Elements/ShowMembers b/rt/html/Ticket/Elements/ShowMembers index e1016626a..9802e8982 100644 --- a/rt/html/Ticket/Elements/ShowMembers +++ b/rt/html/Ticket/Elements/ShowMembers @@ -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.) %# +%# 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 LICENSE BLOCK +%# }}} END BPS TAGGED BLOCK % if ($members->Count) {
        % while (my $link = $members->Next) { diff --git a/rt/html/Ticket/Elements/ShowMessageHeaders b/rt/html/Ticket/Elements/ShowMessageHeaders index 11d873c3e..408b2c898 100644 --- a/rt/html/Ticket/Elements/ShowMessageHeaders +++ b/rt/html/Ticket/Elements/ShowMessageHeaders @@ -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,19 +20,69 @@ %# 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.) %# +%# 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 LICENSE BLOCK -<%$content |n%> +%# }}} END BPS TAGGED BLOCK +% use Data::Dumper; +
    <&|/l&>Created:
    +% foreach my $header (@headers) { +% next unless ($display_headers{'_all'} || $display_headers{lc($header->{'Tag'})}); + + + + +% } +
    <%$header->{'Tag'}%>:<%$header->{'Value'} | n%>
    <%INIT> my $content = $Headers; -RT::Interface::Web::EscapeUTF8(\$content); $m->comp('/Elements/Callback', content => \$content, %ARGS); + +# apply html escaping on the original content +# we'll display the value without escaping later (for MakeClicky et al.) +$content = $m->interp->apply_escapes($content, 'h'); + +my @lines = split (/\n/,$content); +my $in_header = 0; +my @headers =(); +foreach (@lines) { + if (/^(\S+):\s+(.*)$/) { + push (@headers, { Tag => $1, Value => $2} ); + } elsif ($headers[-1]) { + $headers[-1]->{'Value'} .= $_; + } else { + + push (@headers, { Tag => $_, Value => ''} ); + } +} + +my %display_headers; + +map { $display_headers{lc($_)} = 1 } @$DisplayHeaders; + +$m->comp('/Elements/Callback', _CallbackName => 'Headers', content => \$content, headers => \@headers, display_headers => \%display_headers, %ARGS); + <%ARGS> $Headers => undef +$DisplayHeaders => undef diff --git a/rt/html/Ticket/Elements/ShowMessageStanza b/rt/html/Ticket/Elements/ShowMessageStanza index 8e3045a36..8b912612b 100644 --- a/rt/html/Ticket/Elements/ShowMessageStanza +++ b/rt/html/Ticket/Elements/ShowMessageStanza @@ -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.) %# +%# 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 LICENSE BLOCK +%# }}} END BPS TAGGED BLOCK % if (ref($Message)) { <%perl> diff --git a/rt/html/Ticket/Elements/ShowPeople b/rt/html/Ticket/Elements/ShowPeople index 160da70d9..597a991d5 100644 --- a/rt/html/Ticket/Elements/ShowPeople +++ b/rt/html/Ticket/Elements/ShowPeople @@ -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.) %# +%# 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 LICENSE BLOCK +%# }}} END BPS TAGGED BLOCK @@ -28,18 +50,17 @@ - + - + - +
    <&|/l&>Owner:
    <&|/l&>Requestors:<%$Ticket->RequestorAddresses%><& ShowGroupMembers, Group => $Ticket->Requestors &>
    <&|/l&>Cc:<%$Ticket->CcAddresses%><& ShowGroupMembers, Group => $Ticket->Cc &>
    <&|/l&>AdminCc:<%$Ticket->AdminCcAddresses%><& ShowGroupMembers, Group => $Ticket->AdminCc &>
    <%ARGS> $Ticket => undef - diff --git a/rt/html/Ticket/Elements/ShowReferences b/rt/html/Ticket/Elements/ShowReferences index 831923b2b..e3639d01d 100644 --- a/rt/html/Ticket/Elements/ShowReferences +++ b/rt/html/Ticket/Elements/ShowReferences @@ -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.) %# +%# 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 LICENSE BLOCK +%# }}} END BPS TAGGED BLOCK
      % while (my $Link = $Ticket->RefersTo->Next) {
    • diff --git a/rt/html/Ticket/Elements/ShowRequestor b/rt/html/Ticket/Elements/ShowRequestor index a6398efc7..cb9d7a6cc 100644 --- a/rt/html/Ticket/Elements/ShowRequestor +++ b/rt/html/Ticket/Elements/ShowRequestor @@ -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: %# -%# END LICENSE BLOCK +%# (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.) +%# +%# 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 <%PERL> my $rows = 10; my $people = $Ticket->Requestors->UserMembersObj; @@ -39,6 +61,9 @@ $tickets->OrderBy(FIELD => 'Priority', <& /Elements/TitleBoxStart, title => "id."\">".loc("More about [_1]", $name)."" &> +%# Additional information about this user. Empty by default. +<& /Elements/Callback, _CallbackName => 'AboutThisUser', requestor => $requestor, %ARGS &> + <&|/l&>Comments about this user:
      <% ($requestor->Comments || loc("No comment entered about this user")) %>
      diff --git a/rt/html/Ticket/Elements/ShowSummary b/rt/html/Ticket/Elements/ShowSummary index 5bcc94b41..5540417c7 100644 --- a/rt/html/Ticket/Elements/ShowSummary +++ b/rt/html/Ticket/Elements/ShowSummary @@ -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,16 +20,32 @@ %# 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.) %# +%# 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 LICENSE BLOCK +%# }}} END BPS TAGGED BLOCK - - - + % my $desc = $Transaction->BriefDescription; @@ -33,89 +55,10 @@ -<%PERL> - -unless ($Collapsed) { - foreach my $message (@$Attachments) { - - my ($headers, $quoted); - if ($ShowHeaders && ($ShowHeaders == $Ticket->Id)) { - $headers = $message->Headers; - } else { - $headers = $message->NiceHeaders; - } - chomp $headers; - if ($headers) { - # localize the common headers (like 'Subject:'), too. - eval {$headers =~ s/^([^:]+)(?=:)/loc($1)/em; } # we eval here to catch errors when 5.6 panics - } - - - my $MAX_INLINE_BODY = $RT::MaxInlineBody || 13456; - if ( $message->ContentType =~ m{^(text/plain|message|text$)}i - && $message->ContentLength < $MAX_INLINE_BODY ) { - - my $content; - # If we've preloaded all the content, let's pull from there - # if we haven't, load it now - if ($AttachmentContent->{$message->id}) { - $content = $AttachmentContent->{$message->id}->Content; - } else { - $content = $message->Content; - } - - - - eval { - require Text::Quoted; - $quoted = Text::Quoted::extract( $content ); - }; - if ($@) { - $quoted = $content; - } - } - - - - - - - -% } -% } - - <%ARGS> $Ticket => undef @@ -126,44 +69,56 @@ $ShowTitleBarCommands => 1 $RowNum => 1 $AttachPath => $RT::WebPath."/Ticket/Attachment" $UpdatePath => $RT::WebPath."/Ticket/Update.html" +$EmailRecordPath => $RT::WebPath."/Ticket/ShowEmailRecord.html" $Attachments => undef $AttachmentContent => undef +$ShowBody => 1 +$LastTransaction => 0 <%INIT> - -my ($TimeTaken, $TicketString, $bgcolor); +my ( $TimeTaken, $TicketString, $bgcolor ); my $transdate = $Transaction->CreatedAsString(); $transdate =~ s/\s/ /g; -if ($Transaction->Type =~ /^(Create|Correspond|Comment$)/) { - $bgcolor="#336699"; -} elsif (($Transaction->Field =~ /^Owner$/) or - ($Transaction->Type =~ /^(AddWatcher|DelWatcher)$/)) { - $bgcolor="#333399"; - -} elsif ($Transaction->Type =~ /^(AddLink|DeleteLink)$/) { - $bgcolor="#336633"; -} elsif ($Transaction->Type =~ /^(Status|Set|Told)$/) { - if ($Transaction->Field =~ /^(Told|Starts|Started|Due)$/) { - $bgcolor="#663366"; - } - else { - $bgcolor="#993333"; - } +if ( $Transaction->Type =~ /^(Create|Correspond|Comment$)/ ) { + if ( $Transaction->IsInbound ) { + $bgcolor = "#336699"; + } + else { + $bgcolor = "#339999"; + } +} +elsif ( ( $Transaction->Field =~ /^Owner$/ ) + or ( $Transaction->Type =~ /^(AddWatcher|DelWatcher)$/ ) ) { + $bgcolor = "#333399"; + +} +elsif ( $Transaction->Type =~ /^(AddLink|DeleteLink)$/ ) { + $bgcolor = "#336633"; +} +elsif ( $Transaction->Type =~ /^(Status|Set|Told)$/ ) { + if ( $Transaction->Field =~ /^(Told|Starts|Started|Due)$/ ) { + $bgcolor = "#663366"; + } + else { + $bgcolor = "#993333"; + } } else { - $bgcolor="#cccccc"; + $bgcolor = "#cccccc"; } -if ($Ticket->Id != $Transaction->Ticket) { - $TicketString = "Ticket ".$Transaction->Ticket .": "; +if ( $Ticket->Id != $Transaction->Ticket ) { + $TicketString = "Ticket " . $Transaction->Ticket . ": "; } -if ($Transaction->TimeTaken != 0) { - $TimeTaken = $Transaction->TimeTaken." min" +if ( $Transaction->TimeTaken != 0 ) { + $TimeTaken = $Transaction->TimeTaken . " min"; +} else { + $TimeTaken = ''; } unless ($Attachments) { @@ -171,24 +126,56 @@ unless ($Attachments) { $attachments->Columns( qw( Id Filename ContentType Headers Subject Parent ContentEncoding ContentType TransactionId) ); $Attachments = $attachments->ItemsArrayRef(); } +my $titlebar_commands = ' '; +my @DisplayHeaders=qw ( _all); -my $titlebar_commands=' '; +if ( $Transaction->Type =~ /EmailRecord$/ ) { + @DisplayHeaders = qw(To Cc Bcc); -# If the transaction has anything attached to it at all -if ($Attachments->[0] && $ShowTitleBarCommands) { - if ($Ticket->CurrentUserHasRight('ReplyToTicket')) { - $titlebar_commands .= - "[Ticket . "&QuoteTransaction=".$Transaction->Id. - "&Action=Respond\">". loc('Reply') ."] "; - } - if ($Ticket->CurrentUserHasRight('CommentOnTicket')) { - $titlebar_commands .= - "[Ticket. - "&QuoteTransaction=".$Transaction->Id. - "&Action=Comment\">". loc('Comment') ."]"; - } + $titlebar_commands .= + "[Ticket + . "&Transaction=" + . $Transaction->Id + . "&Attachment=" + . ( $Transaction->Attachments->First + && $Transaction->Attachments->First->Id ) + + . '">' . loc('Show') . "] "; + $ShowBody = 0; } + +# If the transaction has anything attached to it at all +else { + + unless ( $ShowHeaders ) { + @DisplayHeaders = qw(To From RT-Send-Cc Cc Bcc Date Subject); + } + + if ( $Attachments->[0] && $ShowTitleBarCommands ) { + if ( $Transaction->TicketObj->CurrentUserHasRight('ReplyToTicket') + or $Transaction->TicketObj->CurrentUserHasRight('ModifyTicket')) { + $titlebar_commands .= + "[Ticket + . "&QuoteTransaction=" + . $Transaction->Id + . "&Action=Respond\">" + . loc('Reply') + . "] "; + } + if ( $Transaction->TicketObj->CurrentUserHasRight('CommentOnTicket') + or $Transaction->TicketObj->CurrentUserHasRight('ModifyTicket')) { + $titlebar_commands .= + "[Ticket + . "&QuoteTransaction=" + . $Transaction->Id + . "&Action=Comment\">" + . loc('Comment') . "]"; + } + } +} diff --git a/rt/html/Ticket/Elements/ShowTransactionAttachments b/rt/html/Ticket/Elements/ShowTransactionAttachments new file mode 100644 index 000000000..b01586deb --- /dev/null +++ b/rt/html/Ticket/Elements/ShowTransactionAttachments @@ -0,0 +1,196 @@ +%# {{{ BEGIN BPS TAGGED BLOCK +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# +%# +%# (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 +%# 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. +%# +%# 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.) +%# +%# 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 +<%perl> +# Find all the attachments which have parent $Parent +# For each of these attachments +foreach my $message ( grep { $_->Parent == $Parent } @$Attachments ) { + + # {{{ show the headers + my $headers = $message->Headers; + chomp $headers; + + # localize the common headers (like 'Subject:'), too. + $headers =~ s/^([^:]+)(?=:)/loc($1)/em; + $m->comp( + 'ShowMessageHeaders', + Headers => $headers, + Transaction => $Transaction, + DisplayHeaders => \@DisplayHeaders + ); + + # }}} + # {{{ if there's any size at all, show the download link + my $size = $message->ContentLength; + if ($size) { + + +
      +<%perl> + + # show a download link + if ( $size > 1024 ) { + $size = loc( "[_1]k", int( $size / 102.4 ) / 10 ); + } + else { + $size = loc( "[_1]b", $size ); + } + + +<&|/l&>Download<%$message->Filename || loc('(untitled)') %> +
      +<%$message->ContentType%> <% $size %> +
      +
      +%} + +% # }}} +
      +<%perl> +# {{{ if it's got content-disposition inline, show it inline + my $content; + + # If it's text + if ( $message->ContentType =~ m{^(text|message)}i ) { + + if ( + + # it's a toplevel object + !$ParentObj + + # or its parent isn't a multipart alternative + || ( $ParentObj->ContentType !~ m{^multipart/alternative$}i ) + + # or it's of our prefered alterative type + || ( + ( + $RT::PreferRichText + && ( $message->ContentType =~ m{^text/(?:html|enriched)$} ) + ) + || ( !$RT::PreferRichText + && ( $message->ContentType !~ m{^text/(?:html|enriched)$} ) + ) + ) + ) + { + + if ( $AttachmentContent->{ $message->id } ) { + $content = $AttachmentContent->{ $message->id }->Content; + } + else { + $content = $message->Content; + } + + # if it's a text/html clean the body and show it + if ( $message->ContentType =~ m{^text/(?:html|enriched)$}i ) { + $content = + $m->comp( '/Elements/ScrubHTML', Content => $content ); + $m->out( $content ); + } + + # if it's a text/plain show the body + elsif ( $message->ContentType =~ m{^(text|message|text)}i ) { + + eval { $content = Text::Quoted::extract($content); }; + if ($@) { 1; } + + $m->comp( + 'ShowMessageStanza', + Depth => 0, + Message => $content, + Transaction => $Transaction + ); + } + } + + } + # if it's an image, show it as an image + elsif ( $message->ContentType =~ /^image\//i ) { + $m->out('' ); + } + + + # }}} + + $m->comp( 'ShowTransactionAttachments', %ARGS, + Parent => $message->id, + ParentObj => $message ); + + +} + +
      +<%ARGS> +$Ticket => undef +$Transaction => undef +$ShowHeaders => 0 +$Collapsed => undef +$ShowTitleBarCommands => 1 +$RowNum => 1 +$AttachPath => $RT::WebPath."/Ticket/Attachment" +$UpdatePath => $RT::WebPath."/Ticket/Update.html" +$EmailRecordPath => $RT::WebPath."/Ticket/ShowEmailRecord.html" +$Attachments => undef +$AttachmentContent => undef +$ShowBody => 1 +$Parent => 0 +$ParentObj => 0 + +<%INIT> +my @DisplayHeaders=qw( _all); + +if ( $Transaction->Type =~ /EmailRecord$/ ) { + @DisplayHeaders = qw(To Cc Bcc); +} + +# If the transaction has anything attached to it at all +elsif (!$ShowHeaders) { + @DisplayHeaders = qw(To From RT-Send-Cc Cc Bcc Date Subject); +} + diff --git a/rt/html/Ticket/Elements/ShowUserEntry b/rt/html/Ticket/Elements/ShowUserEntry new file mode 100644 index 000000000..38473fff9 --- /dev/null +++ b/rt/html/Ticket/Elements/ShowUserEntry @@ -0,0 +1,55 @@ +%# {{{ BEGIN BPS TAGGED BLOCK +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# +%# +%# (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 +%# 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. +%# +%# 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.) +%# +%# 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 +%# Released under the terms of version 2 of the GNU Public License + +<%$User->Name%> +% if ($User->EmailAddress && $User->EmailAddress ne $User->Name) { +<<%$User->EmailAddress%>> +% } + +<%ARGS> +$User => undef + \ No newline at end of file diff --git a/rt/html/Ticket/Elements/Tabs b/rt/html/Ticket/Elements/Tabs index cba45df91..4f17d1024 100644 --- a/rt/html/Ticket/Elements/Tabs +++ b/rt/html/Ticket/Elements/Tabs @@ -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.) %# +%# 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 LICENSE BLOCK +%# }}} END BPS TAGGED BLOCK <& /Elements/Callback, Ticket => $Ticket, actions=> $actions, tabs => $tabs, %ARGS &> <& /Elements/Tabs, tabs => $tabs, @@ -31,12 +53,8 @@ <%INIT> my $tabs = {}; -my $current_toptab = "Search/Listing.html", - my $searchtabs = { new => { title => loc('New Search'), - path => 'Search/Listing.html?ClearRestrictions=1'} - - -} ; +my $current_toptab = "Search/Build.html", +my $searchtabs = {}; my $actions; if ( $Ticket) { @@ -55,7 +73,7 @@ if ( defined $session{'tickets'} ) { $session{'tickets'}->PrepForSerialization(); } - # Don't $current_toptab = display prev links if we're on the first ticket + # Don't display prev links if we're on the first ticket if ($item_map->{$Ticket->Id}->{prev}) { $searchtabs->{'_a'} = { class => "nav", @@ -160,10 +178,33 @@ if ( $Ticket->CurrentUserHasRight('ModifyTicket') }; } } -$tabs->{"g"} = { path => 'Search/Listing.html', - title => loc('Search'), - separator => 1, - subtabs => $searchtabs }; + +my $args = "?" . $m->comp( + '/Elements/QueryString', + Query => $ARGS{'Query'} || $session{'CurrentSearchHash'}->{'Query'}, + Format => $ARGS{'Format'} || $session{'CurrentSearchHash'}->{'Format'}, + OrderBy => $ARGS{'OrderBy'} || $session{'CurrentSearchHash'}->{'OrderBy'}, + Order => $ARGS{'Order'} || $session{'CurrentSearchHash'}->{'Order'}, + Rows => $ARGS{'Rows'}, + ) if ($ARGS{'Query'} or $session{'CurrentSearchHash'}->{'Query'}); + +$tabs->{"f"} = { path => "Search/Build.html?NewQuery=1", + title => loc('New Query')}; +$tabs->{"g"} = { path => "Search/Build.html$args", + title => loc('Query Builder')}; +$tabs->{"h"} = { path => "Search/Edit.html$args", + title => loc('Advanced'), + separator => 1 }; +if (defined $session{'tickets'} and $session{'tickets'}->Count) { + $tabs->{"i"} = { path => "Search/Results.html$args", + title => loc('Show Results'), + separator => 1, + subtabs => $searchtabs }; + if ($current_tab =~ "Search/Results.html") { + $current_tab = "Search/Results.html$args"; + } +} + diff --git a/rt/html/Ticket/History.html b/rt/html/Ticket/History.html index 95a21deec..faa6a29d5 100644 --- a/rt/html/Ticket/History.html +++ b/rt/html/Ticket/History.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.) %# +%# 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 LICENSE BLOCK +%# }}} END BPS TAGGED BLOCK <& /Elements/Header, Title => loc("Ticket History # [_1] [_2]", $Ticket->Id, $Ticket->Subject) &> <& /Ticket/Elements/Tabs, Ticket => $Ticket, current_tab => 'Ticket/History.html?id='.$Ticket->id, diff --git a/rt/html/Ticket/Modify.html b/rt/html/Ticket/Modify.html index e504a3cba..f567ff2b3 100644 --- a/rt/html/Ticket/Modify.html +++ b/rt/html/Ticket/Modify.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.) %# +%# 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 LICENSE BLOCK +%# }}} END BPS TAGGED BLOCK <& /Elements/Header, Title => loc('Modify ticket #[_1]', $TicketObj->Id) &> <& /Ticket/Elements/Tabs, Ticket => $TicketObj, current_subtab => "Ticket/Modify.html?id=".$TicketObj->Id, diff --git a/rt/html/Ticket/ModifyAll.html b/rt/html/Ticket/ModifyAll.html index 1d0500d16..f78cddcf1 100644 --- a/rt/html/Ticket/ModifyAll.html +++ b/rt/html/Ticket/ModifyAll.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.) %# +%# 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 LICENSE BLOCK +%# }}} END BPS TAGGED BLOCK <& /Elements/Header, Title => loc("Ticket #[_1] Jumbo update: [_2]", $Ticket->Id, $Ticket->Subject) &> <& /Ticket/Elements/Tabs, Ticket => $Ticket, @@ -53,8 +75,8 @@
      -<& /Elements/TitleBoxStart, title => loc('Relationships'), color => "#336633"&> -<& Elements/EditLinks, Ticket => $Ticket &> +<& /Elements/TitleBoxStart, title => loc('Links'), color => "#336633"&> +<& /Elements/EditLinks, Object => $Ticket, Merge => 1 &> <& /Elements/TitleBoxEnd &>
      @@ -69,7 +91,7 @@ % } % if ($CanRespond) { - + % } diff --git a/rt/html/Ticket/ModifyDates.html b/rt/html/Ticket/ModifyDates.html index 5339e4283..bf4bc7993 100644 --- a/rt/html/Ticket/ModifyDates.html +++ b/rt/html/Ticket/ModifyDates.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.) %# +%# 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 LICENSE BLOCK +%# }}} END BPS TAGGED BLOCK <& /Elements/Header, Title => loc('Modify dates for #[_1]', $TicketObj->Id) &> <& /Ticket/Elements/Tabs, Ticket => $TicketObj, diff --git a/rt/html/Ticket/ModifyLinks.html b/rt/html/Ticket/ModifyLinks.html index d7e39f3d2..05d369d72 100644 --- a/rt/html/Ticket/ModifyLinks.html +++ b/rt/html/Ticket/ModifyLinks.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.) %# +%# 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 LICENSE BLOCK +%# }}} END BPS TAGGED BLOCK <& /Elements/Header, Title => loc("Link ticket #[_1]", $Ticket->Id) &> <& /Ticket/Elements/Tabs, Ticket => $Ticket, @@ -32,8 +54,8 @@
      -<& /Elements/TitleBoxStart, title => loc('Edit Relationships'), color => "#336633"&> -<& Elements/EditLinks, Ticket => $Ticket &> +<& /Elements/TitleBoxStart, title => loc('Edit Links'), color => "#336633"&> +<& /Elements/EditLinks, Object => $Ticket, Merge => 1 &> <& /Elements/TitleBoxEnd &> <& /Elements/Submit, color => "#336633", Label => loc('Save Changes') &> diff --git a/rt/html/Ticket/ModifyPeople.html b/rt/html/Ticket/ModifyPeople.html index debd27a97..dde2d297d 100644 --- a/rt/html/Ticket/ModifyPeople.html +++ b/rt/html/Ticket/ModifyPeople.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.) %# +%# 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 LICENSE BLOCK +%# }}} END BPS TAGGED BLOCK <& /Elements/Header, Title => loc('Modify people related to ticket #[_1]', $Ticket->id) &> <& /Ticket/Elements/Tabs, Ticket => $Ticket, diff --git a/rt/html/Ticket/ShowEmailRecord.html b/rt/html/Ticket/ShowEmailRecord.html new file mode 100644 index 000000000..23eb6d5a0 --- /dev/null +++ b/rt/html/Ticket/ShowEmailRecord.html @@ -0,0 +1,71 @@ +%# {{{ BEGIN BPS TAGGED BLOCK +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# +%# +%# (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 +%# 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. +%# +%# 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.) +%# +%# 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 +<%args> +$Attachment => undef +$Transaction => undef + +<%init> + my $AttachmentObj = new RT::Attachment($session{'CurrentUser'}); + $AttachmentObj->Load($Attachment) || Abort(loc("Attachment '[_1]' could not be loaded", $Attachment)); + + + unless ($AttachmentObj->id) { + Abort(loc("Attachment '[_1]' could not be loaded", $Attachment)); + } + unless ($AttachmentObj->TransactionId() == $Transaction ) { + Abort(loc("Attachment '[_1]' could not be loaded", $Attachment)); + } + + +<& /Elements/Header, ShowBar => 0 &> +
      +<%$AttachmentObj->Headers%>
      +
      +<%$AttachmentObj->Content%>
      +
      + + +%$m->abort; diff --git a/rt/html/Ticket/Update.html b/rt/html/Ticket/Update.html index 1df8084e5..e26d98830 100644 --- a/rt/html/Ticket/Update.html +++ b/rt/html/Ticket/Update.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: %# -%# END LICENSE BLOCK +%# (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.) +%# +%# 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 => $title &> <& /Ticket/Elements/Tabs, Ticket => $TicketObj, @@ -31,50 +53,33 @@ - - -
      + <& /Elements/TitleBoxStart, title => loc('The Basics'), title_href =>"$RT::WebPath/Ticket/Modify.html?id=".$Ticket->Id, title_class=> 'inverse', @@ -49,7 +71,7 @@ <& /Elements/TitleBoxEnd &>
      + <& /Elements/TitleBoxStart, title => loc("Dates"), title_href =>"$RT::WebPath/Ticket/ModifyDates.html?id=".$Ticket->Id, @@ -58,11 +80,11 @@ <& /Ticket/Elements/ShowDates, Ticket => $Ticket &> <& /Elements/TitleBoxEnd &>
      - <& /Elements/TitleBoxStart, title => loc('Relationships'), + <& /Elements/TitleBoxStart, title => loc('Links'), title_href => "$RT::WebPath/Ticket/ModifyLinks.html?id=".$Ticket->Id, title_class=> 'inverse', titleright => '', color=> "#336633" &> - <& /Ticket/Elements/ShowLinks, Ticket => $Ticket &> + <& /Elements/ShowLinks, Ticket => $Ticket &> <& /Elements/TitleBoxEnd &>
      <& /Ticket/Elements/ShowAttachments, Ticket => $Ticket, Attachments => $Attachments &> diff --git a/rt/html/Ticket/Elements/ShowTransaction b/rt/html/Ticket/Elements/ShowTransaction index 8cde03870..f0b8326cf 100644 --- a/rt/html/Ticket/Elements/ShowTransaction +++ b/rt/html/Ticket/Elements/ShowTransaction @@ -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,15 +20,31 @@ %# 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.) %# +%# 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 LICENSE BLOCK +%# }}} END BPS TAGGED BLOCK
      # #<% $LastTransaction ? ' ' : ' ' |n %>    <% $transdate|n %> <%$TimeTaken%>  <%$titlebar_commands|n%>
           - -
      -<& ShowMessageHeaders, Headers => $headers, Transaction => $Transaction &>
      -
      -% if ($message->ContentLength && !length($quoted) && $message->ContentType =~ m#^text/#) { -
      <&|/l&>Message body not shown because it is too large or is not plain text.
      -<&|/l&>You can access it with the Download button on the right.
      -% } else { -<& ShowMessageStanza, Depth => 0, Message => $quoted, Transaction => $Transaction &> -% } -
      -
      - -% if ($message->Parent == 0 ) { -
      -% } -<%PERL> -my $size = $message->ContentLength or next; - -if ($size) { - if ($size > 1024) { - $size = loc("[_1]k", int($size/102.4)/10); - } - else { - $size = loc("[_1]b", $size); - } - -<&|/l&>Download <% $message->Filename|| loc('(untitled)') %> <% $size %> -% } +
      +% $m->comp('ShowTransactionAttachments', %ARGS, Parent => 0) unless ($Collapsed ||!$ShowBody);
      - - - - -
      -<&|/l&>Ticket watchers -<&|/l&>Requestor: - -<% $TicketObj->RequestorAddresses %> -
        -<&|/l&>Cc: - -<% $TicketObj->CcAddresses %> -
        -<&|/l&>AdminCc: - -<% $TicketObj->AdminCcAddresses %> -
      -
      +% my $skip; +<& /Elements/Callback, _CallbackName => 'BeforeUpdateType', skip => \$skip, %ARGS &> +% if (!$skip) { +
      +% } - + @@ -106,17 +111,16 @@ value=<% $ARGS{UpdateCc} %>>
      <& /Elements/MessageBox, Name=>"UpdateContent", %ARGS &> % } -
      <&|/l&>Status: -<& /Elements/SelectStatus, Name=>"Status", Default => $DefaultStatus &> +<& /Elements/SelectStatus, Name=>"Status", DefaultLabel => loc("[_1] (Unchanged)", $TicketObj->Status), Default => $ARGS{'Status'} || ($TicketObj->Status eq $DefaultStatus ? undef : $DefaultStatus)&> <&|/l&>Owner: -<& /Elements/SelectOwner, Name=>"Owner", Default => ($ARGS{'Owner'} || $TicketObj->OwnerObj->Id()), QueueObj => $TicketObj->QueueObj, TicketObj => $TicketObj &> +<& /Elements/SelectOwner, Name=>"Owner", DefaultLabel => loc("[_1] (Unchanged)", $TicketObj->OwnerObj->Name()), QueueObj => $TicketObj->QueueObj, TicketObj => $TicketObj, Default => $ARGS{'Owner'} &> <&|/l&>Worked: <&|/l&>minutes
      <&|/l&>Update Type:
      <&|/l&>Subject:
      <&|/l&>Subject:
      <&|/l&>Cc: >
      +value="<% $ARGS{UpdateCc} %>">
      <&|/l&>(Sends a carbon-copy of this update to a comma-delimited list of email addresses. Does not change who will receive future updates.)
      <& /Elements/Submit, Label => loc('Update Ticket'), Name => 'SubmitTicket' &> - - - - +% if ($TicketObj->CurrentUserHasRight('ShowOutgoingEmail')) { +<& /Ticket/Elements/PreviewScrips, TicketObj => $TicketObj, %ARGS &> +% } + <%INIT> my $CanRespond = 0; @@ -143,7 +147,7 @@ if ($DefaultStatus eq 'resolved') { # for the convenience: my ($CommentDefault, $ResponseDefault); -if (($Action eq 'Comment') or ($ARGS{'UpdateType'} eq 'private')) { +if ($Action ne 'Respond') { $CommentDefault = "SELECTED"; } else { $ResponseDefault = "SELECTED"; -- cgit v1.2.1