From 945721f48f74d5cfffef7c7cf3a3d6bc2521f5dd Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 15 Jul 2003 13:16:32 +0000 Subject: import of rt 3.0.4 --- rt/html/Ticket/Attachment/dhandler | 68 ++++++++ rt/html/Ticket/Create.html | 257 +++++++++++++++++++++++++++++ rt/html/Ticket/Display.html | 116 +++++++++++++ rt/html/Ticket/Elements/AddWatchers | 97 +++++++++++ rt/html/Ticket/Elements/BulkLinks | 53 ++++++ rt/html/Ticket/Elements/EditBasics | 79 +++++++++ rt/html/Ticket/Elements/EditCustomField | 70 ++++++++ rt/html/Ticket/Elements/EditCustomFields | 74 +++++++++ rt/html/Ticket/Elements/EditDates | 53 ++++++ rt/html/Ticket/Elements/EditLinks | 150 +++++++++++++++++ rt/html/Ticket/Elements/EditPeople | 68 ++++++++ rt/html/Ticket/Elements/EditWatchers | 52 ++++++ rt/html/Ticket/Elements/ShowAttachments | 76 +++++++++ rt/html/Ticket/Elements/ShowBasics | 54 ++++++ rt/html/Ticket/Elements/ShowCustomFields | 46 ++++++ rt/html/Ticket/Elements/ShowDates | 56 +++++++ rt/html/Ticket/Elements/ShowDependencies | 41 +++++ rt/html/Ticket/Elements/ShowHistory | 86 ++++++++++ rt/html/Ticket/Elements/ShowLink | 40 +++++ rt/html/Ticket/Elements/ShowLinks | 87 ++++++++++ rt/html/Ticket/Elements/ShowMemberOf | 35 ++++ rt/html/Ticket/Elements/ShowMembers | 45 +++++ rt/html/Ticket/Elements/ShowMessageHeaders | 32 ++++ rt/html/Ticket/Elements/ShowMessageStanza | 51 ++++++ rt/html/Ticket/Elements/ShowPeople | 45 +++++ rt/html/Ticket/Elements/ShowReferences | 50 ++++++ rt/html/Ticket/Elements/ShowRequestor | 59 +++++++ rt/html/Ticket/Elements/ShowSummary | 82 +++++++++ rt/html/Ticket/Elements/ShowTransaction | 169 +++++++++++++++++++ rt/html/Ticket/Elements/Tabs | 170 +++++++++++++++++++ rt/html/Ticket/History.html | 52 ++++++ rt/html/Ticket/Modify.html | 63 +++++++ rt/html/Ticket/ModifyAll.html | 158 ++++++++++++++++++ rt/html/Ticket/ModifyDates.html | 52 ++++++ rt/html/Ticket/ModifyLinks.html | 54 ++++++ rt/html/Ticket/ModifyPeople.html | 67 ++++++++ rt/html/Ticket/Update.html | 205 +++++++++++++++++++++++ 37 files changed, 3012 insertions(+) create mode 100644 rt/html/Ticket/Attachment/dhandler create mode 100644 rt/html/Ticket/Create.html create mode 100644 rt/html/Ticket/Display.html create mode 100644 rt/html/Ticket/Elements/AddWatchers create mode 100644 rt/html/Ticket/Elements/BulkLinks create mode 100644 rt/html/Ticket/Elements/EditBasics create mode 100644 rt/html/Ticket/Elements/EditCustomField create mode 100644 rt/html/Ticket/Elements/EditCustomFields create mode 100644 rt/html/Ticket/Elements/EditDates create mode 100644 rt/html/Ticket/Elements/EditLinks create mode 100644 rt/html/Ticket/Elements/EditPeople create mode 100644 rt/html/Ticket/Elements/EditWatchers create mode 100644 rt/html/Ticket/Elements/ShowAttachments create mode 100644 rt/html/Ticket/Elements/ShowBasics create mode 100644 rt/html/Ticket/Elements/ShowCustomFields create mode 100644 rt/html/Ticket/Elements/ShowDates create mode 100644 rt/html/Ticket/Elements/ShowDependencies create mode 100644 rt/html/Ticket/Elements/ShowHistory create mode 100644 rt/html/Ticket/Elements/ShowLink create mode 100644 rt/html/Ticket/Elements/ShowLinks create mode 100644 rt/html/Ticket/Elements/ShowMemberOf create mode 100644 rt/html/Ticket/Elements/ShowMembers create mode 100644 rt/html/Ticket/Elements/ShowMessageHeaders create mode 100644 rt/html/Ticket/Elements/ShowMessageStanza create mode 100644 rt/html/Ticket/Elements/ShowPeople create mode 100644 rt/html/Ticket/Elements/ShowReferences create mode 100644 rt/html/Ticket/Elements/ShowRequestor create mode 100644 rt/html/Ticket/Elements/ShowSummary create mode 100644 rt/html/Ticket/Elements/ShowTransaction create mode 100644 rt/html/Ticket/Elements/Tabs create mode 100644 rt/html/Ticket/History.html create mode 100644 rt/html/Ticket/Modify.html create mode 100644 rt/html/Ticket/ModifyAll.html create mode 100644 rt/html/Ticket/ModifyDates.html create mode 100644 rt/html/Ticket/ModifyLinks.html create mode 100644 rt/html/Ticket/ModifyPeople.html create mode 100644 rt/html/Ticket/Update.html (limited to 'rt/html/Ticket') diff --git a/rt/html/Ticket/Attachment/dhandler b/rt/html/Ticket/Attachment/dhandler new file mode 100644 index 000000000..e0f00f57a --- /dev/null +++ b/rt/html/Ticket/Attachment/dhandler @@ -0,0 +1,68 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<%perl> + my ($ticket, $trans,$attach, $filename); + my $arg = $m->dhandler_arg; # get rest of path + if ($arg =~ '^(\d+)/(\d+)') { + $trans = $1; + $attach = $2; + } + else { + Abort("Corrupted attachment URL."); + } + my $AttachmentObj = new RT::Attachment($session{'CurrentUser'}); + $AttachmentObj->Load($attach) || Abort("Attachment '$attach' could not be loaded"); + + + unless ($AttachmentObj->id) { + Abort("Bad attachment id. Couldn't find attachment '$attach'\n"); + } + unless ($AttachmentObj->TransactionId() == $trans ) { + Abort("Bad transaction number for attachment. $trans should be".$AttachmentObj->TransactionId() ."\n"); + + } + + my $content_type = $AttachmentObj->ContentType || 'text/plain'; + + unless ($RT::TrustHTMLAttachments) { + $content_type = 'text/plain' if ($content_type =~ /^text\/html/i); + } + + if (my $enc = $AttachmentObj->OriginalEncoding) { + # normalize Encode.pm convention with IANA ones + $enc = 'big5' if $enc eq 'big5-eten'; + $enc = 'utf-8' if $enc eq 'utf8'; + $content_type .= ";charset=$enc"; + } + + # unless ($RT::TrustMIMEAttachments) { + # $content_type = 'application/octet-stream'; + # } + + $r->content_type( $content_type ); + $m->clear_buffer(); + $m->out($AttachmentObj->OriginalContent); + $m->abort; + + diff --git a/rt/html/Ticket/Create.html b/rt/html/Ticket/Create.html new file mode 100644 index 000000000..5b8c908a1 --- /dev/null +++ b/rt/html/Ticket/Create.html @@ -0,0 +1,257 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<& /Elements/Header, Title => loc("Create a new ticket") &> +<& /Elements/Tabs, + current_toptab => "Ticket/Create.html", + Title => loc("Create a new ticket") &> +
+ + + + +[<&|/l&>Show basics] [<&|/l&>Show details] +
+<& /Elements/TitleBoxStart, contentbg => "#cccccc", title => loc("Create a new ticket") &> + + + + + + + + + + + + + + + + + + + + + + + + + + + + +% if (exists $session{'Attachments'}) { + + + + +% } # end of if + + + + + + + + + +
<&|/l&>Queue<% $QueueObj->Name %> + +<&|/l&>Status: + +<& /Elements/SelectStatus, Name => "Status", Default => $ARGS{Status}||'new' &> + +<&|/l&>Owner: + +<& /Elements/SelectOwner, Name => "Owner", QueueObj => $QueueObj, Default => $ARGS{Owner}||undef &> +
+<&|/l&>Requestors: + + +
+<&|/l&>Cc: + +>
+ +<&|/l&>(Sends a carbon-copy of this update to a comma-delimited list of email addresses. These people will receive future updates.) +
+<&|/l&>Admin Cc: + +>
+ +<&|/l&>(Sends a carbon-copy of this update to a comma-delimited list of administrative email addresses. These people will receive future updates.) +
+<&|/l&>Subject: + + +
+<& /Ticket/Elements/EditCustomFields, QueueObj => $QueueObj &> +
+<&|/l&>Attached file: + +<&|/l&>Check box to delete
+% foreach my $attach_name (keys %{$session{'Attachments'}}) { +<%$attach_name%>
+% } # end of foreach +
+<&|/l&>Attach file: + + + +
+<&|/l&>Describe the issue below:
+% if (exists $ARGS{Content}) { +<& /Elements/MessageBox, Default => $ARGS{Content} &> +% } else { +<& /Elements/MessageBox, QuoteTransaction => $QuoteTransaction &> +%} + +
+
+
+<& /Elements/TitleBoxEnd &> +<& /Elements/Submit, Label => loc("Create")&> + +










+










+










+










+










+ + + [<&|/l&>Show basics] [<&|/l&>Show details] +
+ + + + + + +
+ + <& /Elements/TitleBoxStart, title => loc('The Basics'), + title_class=> 'inverse', + color => "#993333" &> + + + + + +
<&|/l&>Priority:
<&|/l&>Final Priority:
<&|/l&>Time Worked:>
<&|/l&>Time Left:>
+<& /Elements/TitleBoxEnd &> +
+<& /Elements/TitleBoxStart, title => loc("Dates"), + title_class=> 'inverse', + color => "#663366" &> + + + + +
<&|/l&>Starts:>
<&|/l&>Due:>
+<& /Elements/TitleBoxEnd &> +
+
+<& /Elements/TitleBoxStart, title => loc('Relationships'), + title_class=> 'inverse', + titleright => '', color=> "#336633" &> + +<&|/l&>(Enter ticket ids or URLs, seperated with spaces) + + + + + + + + + +
<&|/l&>Depends on>
<&|/l&>Depended on by>
<&|/l&>Parents>
<&|/l&>Children>
<&|/l&>Refers to>
<&|/l&>Referred to by>
+<& /Elements/TitleBoxEnd &> +
+ +
+<& /Elements/Submit, Label => loc("Create") &> +
+









+










+










+










+










+ +<%INIT> +my $QueueObj = new RT::Queue($session{'CurrentUser'}); +$QueueObj->Load($Queue) || Abort(loc("Queue could not be loaded.")); +my $CFs = $QueueObj->CustomFields(); + +# {{{ deal with deleting uploaded attachments +foreach my $key (keys %ARGS) { + if ($key =~ m/^DeleteAttach-(.+)$/) { + delete $session{'Attachments'}{$1}; + } + $session{'Attachments'} = { %{$session{'Attachments'} || {}} }; +} + +# {{{ store the uploaded attachment in session +if ($ARGS{'Attach'}) { # attachment? + $session{'Attachments'} = {} unless defined $session{'Attachments'}; + + my $subject = "$ARGS{'Attach'}"; + + # since CGI.pm deutf8izes the magic field, we need to add it back. + Encode::_utf8_on($subject); + # strip leading directories + $subject =~ s#^.*[\\/]##; + + my $attachment = MakeMIMEEntity( + Subject => $subject, + Body => "", + AttachmentFieldName => 'Attach' + ); + + $session{'Attachments'} = { %{$session{'Attachments'} || {}}, + $ARGS{'Attach'} => $attachment }; +} +# }}} + +# delete temporary storage entry to make WebUI clean +unless (keys %{$session{'Attachments'}} and $ARGS{'id'} eq 'new') { + delete $session{'Attachments'}; +} + + +# }}} + +if ((!exists $ARGS{'AddMoreAttach'}) && ($ARGS{'id'} eq 'new')) { # new ticket? + $m->comp('Display.html', %ARGS); + $m->abort(); +} + + +<%ARGS> +$DependsOn => undef +$DependedOnBy => undef +$MemberOf => undef +$QuoteTransaction => undef +$Queue => undef + diff --git a/rt/html/Ticket/Display.html b/rt/html/Ticket/Display.html new file mode 100644 index 000000000..cf32dce9d --- /dev/null +++ b/rt/html/Ticket/Display.html @@ -0,0 +1,116 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<& /Elements/Header, + Title => loc("#[_1]: [_2]", $Ticket->Id, $Ticket->Subject) &> +<& /Ticket/Elements/Tabs, + Ticket => $Ticket, + current_tab => 'Ticket/Display.html?id='.$Ticket->id, + Title => loc("#[_1]: [_2]", $Ticket->Id, $Ticket->Subject) &> + +<& /Elements/ListActions, actions => \@Actions &> + +<& /Ticket/Elements/ShowSummary, Ticket => $Ticket &> + + +
+<& /Ticket/Elements/ShowHistory , + Ticket => $Ticket, + Collapsed => $ARGS{'Collapsed'}, + ShowHeaders => $ARGS{'ShowHeaders'} &> + + +<%ARGS> +$id => undef +$Create => undef +$ShowHeaders => undef +$Collapsed => undef + + +<%INIT> + my ($linkid, $message, $tid, $Ticket, @Actions); + +$Ticket = new RT::Ticket($session{'CurrentUser'}); + +unless ($id) { + Abort('No ticket specified'); +} + +if ($ARGS{'id'} eq 'new') { + # {{{ Create a new ticket + + my $Queue = new RT::Queue($session{'CurrentUser'}); + unless ($Queue->Load($ARGS{'Queue'})) { + Abort('Queue not found'); + } + + unless ($Queue->CurrentUserHasRight('CreateTicket')) { + Abort('You have no permission to create tickets in that queue.'); + } + ($Ticket, @Actions) = + CreateTicket(Attachments => $session{'Attachments'}, %ARGS); + delete $session{'Attachments'}; + unless ($Ticket->CurrentUserHasRight('ShowTicket')) { + Abort("No permission to view newly created ticket #".$Ticket->id."."); + } + # }}} +} + +else { + $Ticket = LoadTicket($ARGS{'id'}); + unless ($Ticket->CurrentUserHasRight('ShowTicket')) { + Abort("No permission to view ticket"); + } + + +if (defined $ARGS{'Action'}) { + if ($ARGS{'Action'} =~ /^(Steal|Kill|Take|SetTold)$/) { + my $action = $1; + my ($res, $msg)=$Ticket->$action(); + push(@Actions, $msg); + } +} + + if ( $ARGS{'UpdateContent'} ) { + $ARGS{'UpdateContent'} =~ s/\r\n/\n/g; + if ( $ARGS{'UpdateContent'} ne '' + && $ARGS{'UpdateContent'} ne "-- \n" + . $session{'CurrentUser'}->UserObj->Signature ) { + $ARGS{UpdateAttachments} = $session{'Attachments'}; + ProcessUpdateMessage( ARGSRef => \%ARGS, + Actions => \@Actions, + TicketObj => $Ticket ); + delete $session{'Attachments'}; + } + } +#Process status updates +my @BasicActions = ProcessTicketBasics(ARGSRef => \%ARGS, TicketObj=>$Ticket); +my @results = ProcessTicketLinks( TicketObj => $Ticket, ARGSRef => \%ARGS); + +push (@Actions, @BasicActions, @results); +} + + + + + diff --git a/rt/html/Ticket/Elements/AddWatchers b/rt/html/Ticket/Elements/AddWatchers new file mode 100644 index 000000000..e9f651593 --- /dev/null +++ b/rt/html/Ticket/Elements/AddWatchers @@ -0,0 +1,97 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +
+<%$msg%>
+ +<&|/l&>Add new watchers:
+ + +% if ($Users and $Users->Count) { + +% while (my $u = $Users->Next ) { + +% } +% } + +% if ($Groups and $Groups->Count) { + +% while (my $g = $Groups->Next ) { + +% } +% } + + + + + +
+<&|/l&>Type + +<&|/l&>Username +
<&/Elements/SelectWatcherType, Name => "Ticket-AddWatcher-Principal-".$u->PrincipalId &><%$u->Name%> (<%$u->RealName%>)
+<&|/l&>Type + +<&|/l&>Group +
<&/Elements/SelectWatcherType, Name => "Ticket-AddWatcher-Principal-".$g->PrincipalId, Scope => 'queue' &><%$g->Name%> (<%$g->Description%>)
+<&|/l&>Type + +<&|/l&>Email +
+<&/Elements/SelectWatcherType, Name => "WatcherTypeEmail1" &> + + +
+<&/Elements/SelectWatcherType, Name => "WatcherTypeEmail2" &> + + +
+<&/Elements/SelectWatcherType, Name => "WatcherTypeEmail3" &> + + +
+ +<%INIT> +my ($msg, $Users, $Groups); + +if ($UserString) { + $Users = RT::Users->new($session{'CurrentUser'}); + $Users->Limit(FIELD => $UserField, VALUE => $UserString, OPERATOR => $UserOp); + } + +if ($GroupString) { + $Groups = RT::Groups->new($session{'CurrentUser'}); + $Groups->Limit(FIELD => 'Domain', OPERATOR => '=', VALUE => 'UserDefined'); + $Groups->Limit(FIELD => $GroupField, VALUE => $GroupString, OPERATOR => $GroupOp); + } + + + +<%ARGS> +$UserField => 'Name' +$UserOp => '=' +$UserString => undef +$GroupField => 'Name' +$GroupOp => '=' +$GroupString => undef + diff --git a/rt/html/Ticket/Elements/BulkLinks b/rt/html/Ticket/Elements/BulkLinks new file mode 100644 index 000000000..e6b9cd54f --- /dev/null +++ b/rt/html/Ticket/Elements/BulkLinks @@ -0,0 +1,53 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
<&|/l&>Merge into: <&|/l&>(only one ticket)
<&|/l&>Depends on:
<&|/l&>Depended on by:
<&|/l&>Parents:
<&|/l&>Children:
<&|/l&>Refers to:
<&|/l&>Referred to by:
diff --git a/rt/html/Ticket/Elements/EditBasics b/rt/html/Ticket/Elements/EditBasics new file mode 100644 index 000000000..5d66b1fc1 --- /dev/null +++ b/rt/html/Ticket/Elements/EditBasics @@ -0,0 +1,79 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK + + + +
+ + + +
<&|/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" &> +
+
+ +<%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 $SelectQueue = $m->scomp("/Elements/SelectQueue", Name => 'Queue', Default =>$TicketObj->QueueObj->Id); + + +<%ARGS> + +$TicketObj => undef + diff --git a/rt/html/Ticket/Elements/EditCustomField b/rt/html/Ticket/Elements/EditCustomField new file mode 100644 index 000000000..1fc7d4388 --- /dev/null +++ b/rt/html/Ticket/Elements/EditCustomField @@ -0,0 +1,70 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +% my $Values; +% if ($TicketObj) { +% $Values = $TicketObj->CustomFieldValues($CustomField->id); +% } +% if ($CustomField->Type eq 'FreeformSingle') { + +% } elsif ($CustomField->Type eq 'FreeformMultiple') { +% my $content; +% if ($TicketObj) { +% while (my $value = $Values->Next ) { +% $content .= $value->Content; +% } +% } + + +% } elsif ($CustomField->Type =~ /^Select/) { + + +% } +<%ARGS> +$TicketObj => undef +$CustomField => undef +$NamePrefix => undef +$Rows => 5 +$Cols=> 15 +$Default => undef + diff --git a/rt/html/Ticket/Elements/EditCustomFields b/rt/html/Ticket/Elements/EditCustomFields new file mode 100644 index 000000000..6b2738965 --- /dev/null +++ b/rt/html/Ticket/Elements/EditCustomFields @@ -0,0 +1,74 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK + + + + + +
+ + +% my @entry_fields; +% my $i; +% my $cfcount = $CustomFields->Count; +% $cfcount++ if ($cfcount % 2) ; # if we have an odd number of +% #custom fields, fudge it so we know where to put in the table break +% while (my $CustomField = $CustomFields->Next()) { +% if ($cfcount == 2 * $i) { +
+
+ +% } +% $i++; + + + + +% } +
+ <%$CustomField->Name%>
+ <%$CustomField->FriendlyType%> +
<& EditCustomField, TicketObj => $TicketObj, CustomField => $CustomField, NamePrefix => $NamePrefix &>
+
+ +<%INIT> +my $CustomFields; +my $NamePrefix; + +if ($TicketObj) { + $CustomFields = $TicketObj->QueueObj->CustomFields(); + $NamePrefix = "Ticket-".$TicketObj->Id."-CustomField-"; + +} else { + $CustomFields = $QueueObj->CustomFields(); + $NamePrefix = "CustomField-"; +} + + + + +<%ARGS> +$TicketObj => undef +$QueueObj => undef + diff --git a/rt/html/Ticket/Elements/EditDates b/rt/html/Ticket/Elements/EditDates new file mode 100644 index 000000000..1f3bf1b49 --- /dev/null +++ b/rt/html/Ticket/Elements/EditDates @@ -0,0 +1,53 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK + + + + + + + + + + + + + + + + + + +
<&|/l&>Starts:<& /Elements/SelectDate, menu_prefix => 'Starts', current => 0 &> + (<% $TicketObj->StartsObj->AsString %>)
<&|/l&>Started:<& /Elements/SelectDate, menu_prefix => 'Started', current => 0 &> (<%$TicketObj->StartedObj->AsString %>)
+ <&|/l&>Last Contact: + + <& /Elements/SelectDate, menu_prefix => 'Told', current => 0 &> (<% $TicketObj->ToldObj->AsString %>) +
<&|/l&>Due: + <& /Elements/SelectDate, menu_prefix => 'Due', current => 0 &> (<% $TicketObj->DueObj->AsString %>) +
+<%ARGS> +$TicketObj => undef + + diff --git a/rt/html/Ticket/Elements/EditLinks b/rt/html/Ticket/Elements/EditLinks new file mode 100644 index 000000000..7a522dda6 --- /dev/null +++ b/rt/html/Ticket/Elements/EditLinks @@ -0,0 +1,150 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK + + + + + +
+

<&|/l&>Current Relationships

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
<&|/l&>(Check box to delete)
<&|/l&>Depends on: +% while (my $link = $Ticket->DependsOn->Next) { +% my $member = $link->TargetObj; + + <%$member->Id%>: (<%$member->OwnerObj->Name%>) <%$member->Subject%> + [<%$member->Status%>]
+% } +
<&|/l&>Depended on by: +% while (my $link = $Ticket->DependedOnBy->Next) { +% my $member = $link->BaseObj; + + <%$member->Id%>: (<%$member->OwnerObj->Name%>) <%$member->Subject%> + [<%$member->Status%>]
+% } +
<&|/l&>Parents: +% while (my $link = $Ticket->MemberOf->Next) { +% my $member = $link->TargetObj; + + <%$member->Id%>: (<%$member->OwnerObj->Name%>) <%$member->Subject%> + [<%$member->Status%>]
+% } +
<&|/l&>Children: +% while (my $link = $Ticket->Members->Next) { + +% my $member = $link->BaseObj; + <%$member->Id%>: (<%$member->OwnerObj->Name%>) <%$member->Subject%> + [<%$member->Status%>]
+% } +
<&|/l&>Refers to: +% while (my $link = $Ticket->RefersTo->Next) { + +% if ($link->TargetURI->IsLocal) { +% my $member = $link->TargetObj; + <%$member->Id%>: (<%$member->OwnerObj->Name%>) <%$member->Subject%> [<%$member->Status%>]
+% } else { + <%$link->TargetURI->Resolver->AsString%>
+% } +%} +
<&|/l&>Referred to by: +% while (my $link = $Ticket->ReferredToBy->Next) { + +% if ($link->BaseURI->IsLocal) { +% my $member = $link->BaseObj; + <%$member->Id%>: (<%$member->OwnerObj->Name%>) <%$member->Subject%> [<%$member->Status%>]
+% } else { + <%$link->BaseURI->Resolver->AsString%>
+%} +% } +
+ +
+

<&|/l&>New Relationships

+<&|/l&>Enter tickets or URIs to link tickets to. Seperate multiple entries with spaces.
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
<&|/l&>Merge into: <&|/l&>(only one ticket)
<&|/l&>Depends on:
<&|/l&>Depended on by:
<&|/l&>Parents:
<&|/l&>Children:
<&|/l&>Refers to:
<&|/l&>Referred to by:
+
+ + + +<%ARGS> +$Ticket => undef + diff --git a/rt/html/Ticket/Elements/EditPeople b/rt/html/Ticket/Elements/EditPeople new file mode 100644 index 000000000..1ab8f4ace --- /dev/null +++ b/rt/html/Ticket/Elements/EditPeople @@ -0,0 +1,68 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK + + + + +
+ +

<&|/l&>New watchers

+<&|/l&>Find people whose
+<& /Elements/SelectUsers &> + +
+<&|/l&>Find group whose
+<& /Elements/SelectGroups &> + + +<& AddWatchers, Ticket => $Ticket, UserString => $UserString, + UserOp => $UserOp, UserField => $UserField, + GroupString => $GroupString, GroupOp => $GroupOp, + GroupField => $GroupField &> +
+

<&|/l&>Owner

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

<&|/l&>Current watchers

+<&|/l&>(Check box to delete)
+ +<&|/l&>Requestors: +<& EditWatchers, TicketObj => $Ticket, Watchers => $Ticket->Requestors &> + +<&|/l&>Cc: +<& EditWatchers, TicketObj => $Ticket, Watchers => $Ticket->Cc &> + +<&|/l&>Administrative Cc: +<& EditWatchers, TicketObj => $Ticket, Watchers => $Ticket->AdminCc &> + +
+ +<%ARGS> +$UserField => undef +$UserOp => undef +$UserString => undef +$GroupField => undef +$GroupOp => undef +$GroupString => undef +$Ticket => undef + diff --git a/rt/html/Ticket/Elements/EditWatchers b/rt/html/Ticket/Elements/EditWatchers new file mode 100644 index 000000000..145071cec --- /dev/null +++ b/rt/html/Ticket/Elements/EditWatchers @@ -0,0 +1,52 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK + +<%INIT> +my $Members = $Watchers->MembersObj; + +<%ARGS> +$TicketObj => undef +$Watchers => undef + + + + diff --git a/rt/html/Ticket/Elements/ShowAttachments b/rt/html/Ticket/Elements/ShowAttachments new file mode 100644 index 000000000..22b60d11b --- /dev/null +++ b/rt/html/Ticket/Elements/ShowAttachments @@ -0,0 +1,76 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +% if (keys %documents) { +<& /Elements/TitleBoxStart, title => loc('Attachments'), + title_class=> 'inverse', + color => "#336699" &> + +% foreach my $key (keys %documents) { +% my $fontsize='size="-1"'; + +<%$key%>
+
    +% foreach my $rev (@{$documents{$key}}) { + +<%PERL> +my $size = $rev->ContentLength; + +if ($size) { + if ($size > 1024) { + $size = int($size/102.4)/10 . "k"; + } + else { + $size = $size ."b"; + } + + + +
  • > + <%$rev->CreatedAsString%> (<% $size %>)
  • +% } +% $fontsize='size="-2"'; +% } +
+ +% } +<& /Elements/TitleBoxEnd &> +
+% } + +<%INIT> +my %documents; +my $transactions = $Ticket->Transactions(); +while (my $trans = $transactions->Next()) { + my $attachments = $trans->Attachments(); + while (my $attach = $attachments->Next()) { + next unless ($attach->Filename()); + # most recent at the top + unshift (@{$documents{$attach->Filename}}, $attach); + } +} + +<%ARGS> +$Ticket => undef + + diff --git a/rt/html/Ticket/Elements/ShowBasics b/rt/html/Ticket/Elements/ShowBasics new file mode 100644 index 000000000..ad23e8c8c --- /dev/null +++ b/rt/html/Ticket/Elements/ShowBasics @@ -0,0 +1,54 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK + + + + + + + + + + + + + + + + + + + + + +
<&|/l&>Id:<%$Ticket->Id %>
<&|/l&>Status:<&|/l&><% $Ticket->Status%>
<&|/l&>Worked:<&|/l, $TimeWorked &>[_1] min
<&|/l&>Priority:<%$Ticket->Priority%>/<%$Ticket->FinalPriority %>
<&|/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 new file mode 100644 index 000000000..50d28f0d1 --- /dev/null +++ b/rt/html/Ticket/Elements/ShowCustomFields @@ -0,0 +1,46 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK + +% my @entry_fields; +% while (my $CustomField = $CustomFields->Next()) { +% my $Values = $Ticket->CustomFieldValues($CustomField->Id); + + + + +% } +
<%$CustomField->Name%>: +% while (my $Value = $Values->Next()) { +<%$Value->Content%>
+% } +% unless ($Values->Count()) { +<&|/l&>(no value) +% } +
+<%INIT> +my $CustomFields = $Ticket->QueueObj->CustomFields(); + +<%ARGS> +$Ticket => undef + diff --git a/rt/html/Ticket/Elements/ShowDates b/rt/html/Ticket/Elements/ShowDates new file mode 100644 index 000000000..da7f75bb6 --- /dev/null +++ b/rt/html/Ticket/Elements/ShowDates @@ -0,0 +1,56 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
<&|/l&>Created:<% $Ticket->CreatedObj->AsString %>
<&|/l&>Starts:<% $Ticket->StartsObj->AsString %>
<&|/l&>Started:<% $Ticket->StartedObj->AsString %>
<&|/l&>Last Contact:<% $Ticket->ToldObj->AsString %>
<&|/l&>Due:<% $Ticket->DueObj->AsString %>
<&|/l&>Closed:<% $Ticket->ResolvedObj->AsString %>
<&|/l&>Updated:<% $Ticket->LastUpdated ? (loc("[_1] by [_2]", $Ticket->LastUpdatedAsString, $Ticket->LastUpdatedByObj->Name)) : loc("Never") | h %>
+<%ARGS> +$Ticket => undef + diff --git a/rt/html/Ticket/Elements/ShowDependencies b/rt/html/Ticket/Elements/ShowDependencies new file mode 100644 index 000000000..b7f396871 --- /dev/null +++ b/rt/html/Ticket/Elements/ShowDependencies @@ -0,0 +1,41 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<&|/l&>Depends on:
+% while (my $Link = $Ticket->DependsOn->Next) { +% my $member = $Link->TargetObj; +<%$member->Id%>: (<%$member->OwnerObj->Name%>) <%$member->Subject%> +[<%$member->Status%>] +
+% } +<&|/l&>Depended on by:
+% while (my $Link = $Ticket->DependedOnBy->Next) { +% my $member = $Link->TargetObj; +<%$member->Id%>: (<%$member->OwnerObj->Name%>) <%$member->Subject%> +[<%$member->Status%>] +
+% } + +<%ARGS> +$Ticket => undef + diff --git a/rt/html/Ticket/Elements/ShowHistory b/rt/html/Ticket/Elements/ShowHistory new file mode 100644 index 000000000..2958f8706 --- /dev/null +++ b/rt/html/Ticket/Elements/ShowHistory @@ -0,0 +1,86 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<%perl> + if ($ShowDisplayModes or $ShowTitle) { +my $title; +my $titleright; +if ($ShowTitle) { + $title = loc('History'); +} +else { + $title = ' '; +} +$titleright = loc('Display mode') . ":"; +if ($ShowHeaders && $ShowHeaders == $Ticket->Id ) { + $titleright .= "[" + . loc("Brief headers") + . "] [" + . loc("Full headers") . "]"; +} +else { + $titleright .= "[" + . loc("Brief headers") + . "] [" + . loc("Full headers") . "]"; +} + +<& /Elements/TitleBoxStart, title => $title, titleright => $titleright, bodyclass=> ''&> +% } + + +% while (my $Transaction = $Transactions->Next) { +% my $skip = 0; +% $m->comp('/Elements/Callback', _CallbackName => 'SkipTransaction', Transaction => $Transaction, skip => \$skip, %ARGS); +% next if $skip; +% $i++; +% if ($Transactions->IsLast) { + +% } + <& ShowTransaction, Ticket => $Ticket, Transaction => $Transaction, ShowHeaders => $ShowHeaders, Collapsed => $Collapsed, RowNum => $i, ShowTitleBarCommands => $ShowTitleBarCommands &> +% } +
+% if ($ShowDisplayModes or $ShowTitle) { +<& /Elements/TitleBoxEnd &> +% } +<%INIT> + +my $Transactions = $Ticket->Transactions; +my $i; + + + +<%ARGS> +$URIFile => 'Display.html' +$Ticket => undef +$ShowHeaders => undef +$Collapsed => undef +$ShowTitle => 1 +$ShowDisplayModes => 1 +$ShowTitleBarCommands => 1 + diff --git a/rt/html/Ticket/Elements/ShowLink b/rt/html/Ticket/Elements/ShowLink new file mode 100644 index 000000000..493fd95a5 --- /dev/null +++ b/rt/html/Ticket/Elements/ShowLink @@ -0,0 +1,40 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK + +% if ($URI->IsLocal) { +% my $member = $URI->Object; +% if (UNIVERSAL::isa($member, "RT::Ticket")) { +<%$member->Id%>: (<%$member->OwnerObj->Name%>) <%$member->Subject%> [<% loc($member->Status) %>] +% } elsif ( UNIVERSAL::can($member, 'Name')) { +<%$URI->Resolver->AsString%>: <%$member->Name%> +% } else { +<%$URI->Resolver->AsString%> +% } +% } else { +<%$URI->Resolver->AsString%> +% } + +<%ARGS> +$URI => undef + diff --git a/rt/html/Ticket/Elements/ShowLinks b/rt/html/Ticket/Elements/ShowLinks new file mode 100644 index 000000000..f88a6008d --- /dev/null +++ b/rt/html/Ticket/Elements/ShowLinks @@ -0,0 +1,87 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK + + + + + + + + + + + + + + + + + + + + + + + + + + +% # Allow people to add more rows to the table +% $m->comp('/Elements/Callback', %ARGS ); + +
<&|/l&>Depends on: +
    +% while (my $Link = $Ticket->DependsOn->Next) { +
  • <& ShowLink, URI => $Link->TargetURI &> +% } +
+
<&|/l&>Depended on by: +
    +% while (my $Link = $Ticket->DependedOnBy->Next) { +
  • <& ShowLink, URI => $Link->BaseURI &> +% } +
+
<&|/l&>Parents: +
    +% while (my $Link = $Ticket->MemberOf->Next) { +
  • <& ShowLink, URI => $Link->TargetURI &> +% } +
+
<&|/l&>Children:<& /Ticket/Elements/ShowMembers, Ticket => $Ticket &>
<&|/l&>Refers to: +
    +% while (my $Link = $Ticket->RefersTo->Next) { +
  • <& ShowLink, URI => $Link->TargetURI &> +% } +
+
<&|/l&>Referred to by: +
    +% while (my $Link = $Ticket->ReferredToBy->Next) { +
  • <& ShowLink, URI => $Link->BaseURI &> +% } +
+
+ +<%ARGS> +$Ticket => undef + diff --git a/rt/html/Ticket/Elements/ShowMemberOf b/rt/html/Ticket/Elements/ShowMemberOf new file mode 100644 index 000000000..79e0a3ba2 --- /dev/null +++ b/rt/html/Ticket/Elements/ShowMemberOf @@ -0,0 +1,35 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +
    +% my $memberof = $Ticket->MemberOf; +% while (my $member_of = $memberof->Next) { +
  • <%$member_of->Id%>: <%$member_of->Subject%> [<%$member_of->Status%>] +% } +
+ +<%INIT> + +<%ARGS> +$Ticket => undef + diff --git a/rt/html/Ticket/Elements/ShowMembers b/rt/html/Ticket/Elements/ShowMembers new file mode 100644 index 000000000..e1016626a --- /dev/null +++ b/rt/html/Ticket/Elements/ShowMembers @@ -0,0 +1,45 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +% if ($members->Count) { +
    +% while (my $link = $members->Next) { +% my $member= $link->BaseObj; +
  • <%$member->Id%>: <%$member->Subject%> [<%loc($member->Status)%>]
    +% if ($depth < 8) { +<&/Ticket/Elements/ShowMembers, Ticket => $member, depth => ($depth+1) &> +% } +% } +
+% } + +<%INIT> + +my $members = $Ticket->Members; + + + +<%ARGS> +$Ticket => undef +$depth => 1 + diff --git a/rt/html/Ticket/Elements/ShowMessageHeaders b/rt/html/Ticket/Elements/ShowMessageHeaders new file mode 100644 index 000000000..11d873c3e --- /dev/null +++ b/rt/html/Ticket/Elements/ShowMessageHeaders @@ -0,0 +1,32 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<%$content |n%> +<%INIT> +my $content = $Headers; +RT::Interface::Web::EscapeUTF8(\$content); +$m->comp('/Elements/Callback', content => \$content, %ARGS); + +<%ARGS> +$Headers => undef + diff --git a/rt/html/Ticket/Elements/ShowMessageStanza b/rt/html/Ticket/Elements/ShowMessageStanza new file mode 100644 index 000000000..b0998068f --- /dev/null +++ b/rt/html/Ticket/Elements/ShowMessageStanza @@ -0,0 +1,51 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<%perl> +foreach my $stanza (@$Message) { + if ( ref $stanza eq "ARRAY" ) { + $m->comp( 'ShowMessageStanza', + Depth => $Depth + 1, + Transaction => $Transaction, + Message => $stanza ); + } + elsif ( ref $stanza eq "HASH" ) { + my $content = $stanza->{raw}; + RT::Interface::Web::EscapeUTF8(\$content); + $m->comp('/Elements/Callback', content => \$content, %ARGS); + $content =~ s/\n/
/gi; + + +<%$content |n%>
+% } +% } +<%INIT> +use URI::URL; +my $server = 'fsck.com'; +my @colors = ('#000000', '#660000', '#006600', '#000066', '#cc0000', '#00cc00', '#0000cc', '#ff0000', '#00ff00', '#0000ff'); + +<%ARGS> +$Message => undef +$Depth => 0 +$Transaction => undef + diff --git a/rt/html/Ticket/Elements/ShowPeople b/rt/html/Ticket/Elements/ShowPeople new file mode 100644 index 000000000..0b8026949 --- /dev/null +++ b/rt/html/Ticket/Elements/ShowPeople @@ -0,0 +1,45 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK + + + + + + + + + + + + + + + + + +
<&|/l&>Owner:<%$Ticket->OwnerObj->Name%>
<&|/l&>Requestors:<%$Ticket->RequestorAddresses%>
<&|/l&>Cc:<%$Ticket->CcAddresses%>
<&|/l&>AdminCc:<%$Ticket->AdminCcAddresses%>
+<%ARGS> +$Ticket => undef + + diff --git a/rt/html/Ticket/Elements/ShowReferences b/rt/html/Ticket/Elements/ShowReferences new file mode 100644 index 000000000..831923b2b --- /dev/null +++ b/rt/html/Ticket/Elements/ShowReferences @@ -0,0 +1,50 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +
    +% while (my $Link = $Ticket->RefersTo->Next) { +
  • +% if ($Link->TargetURI->IsLocal) { +% my $member = $Link->TargetObj; + +<%$member->Id%>: (<%$member->OwnerObj->Name%>) <%$member->Subject%> [<%$member->Status%>]
    +% } else { +<%$Link->Target%> +% } +%} + + + +% while (my $Link = $Ticket->ReferredToBy->Next) { +
  • +% if ($Link->BaseURI->IsLocal) { +% my $member = $Link->BaseObj; +<%$member->Id%>: (<%$member->OwnerObj->Name%>) <%$member->Subject%> [<%$member->Status%>]
    +% } else { +<%$Link->Base%> +%} +% } +
+<%ARGS> +$Ticket => undef + diff --git a/rt/html/Ticket/Elements/ShowRequestor b/rt/html/Ticket/Elements/ShowRequestor new file mode 100644 index 000000000..cc91f590f --- /dev/null +++ b/rt/html/Ticket/Elements/ShowRequestor @@ -0,0 +1,59 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<%PERL> +my $rows = 10; +my $people = $Ticket->Requestors->MembersObj; +while (my $member=$people->Next) { +my $requestor = $member->MemberObj->Object; +my $name=$requestor->RealName || $requestor->EmailAddress; +my $tickets = RT::Tickets->new($session{'CurrentUser'}); +$tickets->LimitWatcher(TYPE => 'Requestor', VALUE => $requestor->EmailAddress ); +$tickets->LimitStatus( VALUE => 'open'); +$tickets->LimitStatus( VALUE => 'new'); +$tickets->RowsPerPage($rows); +$tickets->OrderBy(FIELD => 'Priority', + ORDER => 'DESC'); + + +% unless ($requestor->Privileged) { +<& /Elements/TitleBoxStart, + title => "id."\">".loc("More about [_1]", $name)."" &> + +<&|/l&>Comments about this user:
+<% ($requestor->Comments || loc("No comment entered about this user")) %>
+ +<&|/l, $rows &>This user's [_1] highest priority tickets:
+ +<& /Elements/TitleBoxEnd &> + +% } +%} +<%ARGS> +$Ticket=>undef +$DisplayPath => "/Ticket/Display.html" + diff --git a/rt/html/Ticket/Elements/ShowSummary b/rt/html/Ticket/Elements/ShowSummary new file mode 100644 index 000000000..6ae875832 --- /dev/null +++ b/rt/html/Ticket/Elements/ShowSummary @@ -0,0 +1,82 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK + + + + + +
+ <& /Elements/TitleBoxStart, title => loc('The Basics'), + title_href =>"$RT::WebPath/Ticket/Modify.html?id=".$Ticket->Id, + title_class=> 'inverse', + color => "#993333" &> + <& /Ticket/Elements/ShowBasics, Ticket => $Ticket &> + <& /Elements/TitleBoxEnd &> +
+% if ($Ticket->QueueObj->CustomFields()->First) { + <& /Elements/TitleBoxStart, title => loc('Custom Fields'), + title_href =>"$RT::WebPath/Ticket/Modify.html?id=".$Ticket->Id, + title_class=> 'inverse', + color => "#993333" &> + <& /Ticket/Elements/ShowCustomFields, Ticket => $Ticket &> + <& /Elements/TitleBoxEnd &> + +
+% } + <& /Elements/TitleBoxStart, title => loc('People'), + title_href =>"$RT::WebPath/Ticket/ModifyPeople.html?id=".$Ticket->Id, + title_class=> 'inverse', + color => "#333399" &> + <& /Ticket/Elements/ShowPeople, Ticket => $Ticket &> + <& /Elements/TitleBoxEnd &> +
+
+ + <& /Elements/TitleBoxStart, title => loc("Dates"), + title_href =>"$RT::WebPath/Ticket/ModifyDates.html?id=".$Ticket->Id, + title_class=> 'inverse', + color => "#663366" &> + <& /Ticket/Elements/ShowDates, Ticket => $Ticket &> + <& /Elements/TitleBoxEnd &> +
+ <& /Elements/TitleBoxStart, title => loc('Relationships'), + title_href => "$RT::WebPath/Ticket/ModifyLinks.html?id=".$Ticket->Id, + title_class=> 'inverse', + titleright => '', color=> "#336633" &> + <& /Ticket/Elements/ShowLinks, Ticket => $Ticket &> + <& /Elements/TitleBoxEnd &> +
+ <& /Ticket/Elements/ShowAttachments, Ticket => $Ticket &> + + <& /Ticket/Elements/ShowRequestor, Ticket => $Ticket &> + + +
+<%ARGS> +$Ticket => undef + + + + + diff --git a/rt/html/Ticket/Elements/ShowTransaction b/rt/html/Ticket/Elements/ShowTransaction new file mode 100644 index 000000000..f2f89d35c --- /dev/null +++ b/rt/html/Ticket/Elements/ShowTransaction @@ -0,0 +1,169 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK + +#  +   +<% $transdate|n %>  +% my $desc = $Transaction->BriefDescription; +% $m->comp('/Elements/Callback', _CallbackName => 'ModifyDisplay', text => \$desc, Transaction => $Transaction, %ARGS); +<%$Transaction->CreatorObj->Name%> - <%$TicketString%> <%$desc%> + + +<%$TimeTaken%>  +<%$titlebar_commands|n%> + +<%PERL> + +unless ($Collapsed) { + $attachments->GotoFirstItem; + while (my $message=$attachments->Next) { + #we don't want to show any empty transactions, unless they have kids + next unless ($message->ContentLength || $message->Children->Count); + + 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 + } + # 13456 is a random # of about the biggest size we want to see inline text + my $MAX_INLINE_BODY = 13456; + if ($message->ContentType =~ m{^(text/plain|message|text$)}i && + $message->ContentLength < $MAX_INLINE_BODY ) { + require Text::Quoted; + $quoted = Text::Quoted::extract($message->Content); + } + + + +    +    + + +
+<& ShowMessageHeaders, Headers => $headers, Transaction => $Transaction &>
+
+<& ShowMessageStanza, Depth => 0, Message => $quoted, Transaction => $Transaction &> +
+ + + +% if ($message->Parent == 0 ) { +
+% } +<%PERL> +my $size = $message->ContentLength; + +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 %> +% } + + +% } +% } + + + +<%ARGS> +$Ticket => undef +$Transaction => undef +$ShowHeaders => 0 +$Collapsed => undef +$ShowTitleBarCommands => 1 +$RowNum => 1 + + +<%INIT> + + +my ($TimeTaken, $TicketString, $bgcolor); + +my $transdate = $Transaction->CreatedAsString(); +$transdate =~ s/\s/ /g; + +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"; +} + +if ($Ticket->Id != $Transaction->Ticket) { + $TicketString = "Ticket ".$Transaction->Ticket .": "; +} + +if ($Transaction->TimeTaken > 0) { + $TimeTaken = $Transaction->TimeTaken." min" +} +my $attachments = $Transaction->Attachments; + +my $titlebar_commands=' '; + +# If the transaction has anything attached to it at all +if ($Transaction->Attachments->First && $ShowTitleBarCommands) { + if ($Transaction->TicketObj->CurrentUserHasRight('ReplyToTicket')) { + $titlebar_commands .= + "[Ticket . "&QuoteTransaction=".$Transaction->Id. + "&Action=Respond\">". loc('Reply') ."] "; + } + if ($Transaction->TicketObj->CurrentUserHasRight('CommentOnTicket')) { + $titlebar_commands .= + "[Ticket. + "&QuoteTransaction=".$Transaction->Id. + "&Action=Comment\">". loc('Comment') ."]"; + } +} + + diff --git a/rt/html/Ticket/Elements/Tabs b/rt/html/Ticket/Elements/Tabs new file mode 100644 index 000000000..81c92e8c2 --- /dev/null +++ b/rt/html/Ticket/Elements/Tabs @@ -0,0 +1,170 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<& /Elements/Callback, Ticket => $Ticket, actions=> $actions, tabs => $tabs, %ARGS &> +<& /Elements/Tabs, + tabs => $tabs, + actions => $actions, + current_tab => $current_tab, + current_toptab => $current_toptab, + Title => $Title &> +<%INIT> + +my $tabs = {}; +my $current_toptab = "Search/Listing.html", + my $searchtabs = { new => { title => loc('New Search'), + path => 'Search/Listing.html?ClearRestrictions=1'} + + +} ; +my $actions; + +if ( $Ticket) { + +my $id = $Ticket->id(); + +if ( defined $session{'tickets'} ) { + + +my $item_map = $session{'tickets'}->ItemMap; + + # Don't $current_toptab = display prev links if we're on the first ticket + + if ($item_map->{$Ticket->Id}->{prev}) { + $searchtabs->{'_a'} = { + class => "nav", + path => "Ticket/Display.html?id=" . $item_map->{first}, + title => '<< ' . loc('First') }; + $searchtabs->{"_b"} = { class => "nav", + path => "Ticket/Display.html?id=" . $item_map->{$Ticket->Id}->{prev}, + title => '< ' . loc('Prev') }; + } + + + # Don't display next links if we're on the last ticket + if ($item_map->{$Ticket->Id}->{next}) { + $searchtabs->{'d'} = { class => "nav", + path => "Ticket/Display.html?id=" . $item_map->{$Ticket->Id}->{next}, + title => loc('Next') . ' >' }; + $searchtabs->{'e'} = { + class => "nav", + path => "Ticket/Display.html?id=" . $item_map->{last}, + title => loc('Last') . ' >>' }; + } +} + + + +$tabs->{"this"} = { class => "currentnav", + path => "Ticket/Display.html?id=" . $Ticket->id, + title => "#" . $id, + current_subtab => $current_subtab }; + +my $ticket_page_tabs = { + _A => { title => loc('Display'), + path => "Ticket/Display.html?id=" . $id, }, + + _Ab => { title => loc('History'), + path => "Ticket/History.html?id=" . $id, }, + _B => { title => loc('Basics'), + path => "Ticket/Modify.html?id=" . $id, }, + + _C => { title => loc('Dates'), + path => "Ticket/ModifyDates.html?id=" . $id, }, + _D => + { title => loc('People'), path => "Ticket/ModifyPeople.html?id=" . $id, }, + _E => { title => loc('Links'), + path => "Ticket/ModifyLinks.html?id=" . $id, }, + _F => { title => loc('Jumbo'), + path => "Ticket/ModifyAll.html?id=" . $id, + seperator => 1 + }, + +}; + +foreach my $tab ( sort keys %{$ticket_page_tabs} ) { + if ( $ticket_page_tabs->{$tab}->{'path'} eq $current_tab ) { + $ticket_page_tabs->{$tab}->{"subtabs"} = $subtabs; + $tabs->{'this'}->{"current_subtab"} = + $ticket_page_tabs->{$tab}->{"path"}; + } +} +$tabs->{'this'}->{"subtabs"} = $ticket_page_tabs; +$current_tab = "Ticket/Display.html?id=" . $id; + + + + + +if ( $Ticket->CurrentUserHasRight('ModifyTicket') + or $Ticket->CurrentUserHasRight('ReplyToTicket') ) { + $actions->{'A'} = { title => loc('Reply'), + path => "Ticket/Update.html?Action=Respond&id=" . $id, + }; +} + +if ( $Ticket->CurrentUserHasRight('ModifyTicket') ) { + if ( $Ticket->Status ne 'resolved' ) { + $actions->{'B'} = { + + path => "Ticket/Update.html?Action=Comment&DefaultStatus=resolved&id=" . $id, + title => loc('Resolve') }; + } + if ( $Ticket->Status ne 'open' ) { + $actions->{'C'} = { path => "Ticket/Display.html?Status=open&id=" . $id, + title => loc('Open it') }; + } +} + +if ( $Ticket->CurrentUserHasRight('OwnTicket') ) { + if ( $Ticket->OwnerObj->id == $RT::Nobody->id ) { + $actions->{'D'} = { path => "Ticket/Display.html?Action=Take&id=" . $id, + title => loc('Take') }; + } + elsif ( $Ticket->OwnerObj->id != $session{CurrentUser}->id ) { + $actions->{'E'} = {path => "Ticket/Display.html?Action=Steal&id=" . $id, + title => loc('Steal') }; + } +} + +if ( $Ticket->CurrentUserHasRight('ModifyTicket') + or $Ticket->CurrentUserHasRight('CommentOnTicket') ) { + $actions->{'F'} = { title => loc('Comment'), + path => "Ticket/Update.html?Action=Comment&id=" . $id, + }; +} +} +$tabs->{"g"} = { path => 'Search/Listing.html', + title => loc('Search'), + separator => 1, + subtabs => $searchtabs }; + + + +<%ARGS> +$Ticket => undef +$subtabs => undef +$current_tab => undef +$current_subtab => undef +$Title => undef + diff --git a/rt/html/Ticket/History.html b/rt/html/Ticket/History.html new file mode 100644 index 000000000..cb02f1c75 --- /dev/null +++ b/rt/html/Ticket/History.html @@ -0,0 +1,52 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<& /Elements/Header, Title => loc("Ticket History # [_1] [_2]", $Ticket->Id, $Ticket->Subject) &> +<& /Ticket/Elements/Tabs, + Ticket => $Ticket, current_tab => 'Ticket/History.html?id='.$Ticket->id, + Title => loc("Ticket History # [_1] [_2]", $Ticket->Id, $Ticket->Subject) &> + +
+ +<& /Ticket/Elements/ShowHistory , Ticket => $Ticket, ShowHeaders => $ARGS{'ShowHeaders'}, URIFile => 'History.html' &> + + +<%ARGS> +$id => undef + + +<%INIT> + + + +my $Ticket = LoadTicket ($id); + +unless ($Ticket->CurrentUserHasRight('ShowTicket')) { + Abort("No permission to view ticket"); +} + + + + + + diff --git a/rt/html/Ticket/Modify.html b/rt/html/Ticket/Modify.html new file mode 100644 index 000000000..c97fd0994 --- /dev/null +++ b/rt/html/Ticket/Modify.html @@ -0,0 +1,63 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<& /Elements/Header, Title => loc('Modify ticket #[_1]', $TicketObj->Id) &> +<& /Ticket/Elements/Tabs, + Ticket => $TicketObj, current_subtab => "Ticket/Modify.html?id=".$TicketObj->Id, + Title => loc('Modify ticket #[_1]', $TicketObj->Id) &> + +<& /Elements/ListActions, actions => \@results &> +
+ + +<& /Elements/TitleBoxStart, title => loc('Modify ticket #[_1]',$TicketObj->Id), color=> "#993333", width => "100%" &> +<& Elements/EditBasics, TicketObj => $TicketObj &> +<& Elements/EditCustomFields, TicketObj => $TicketObj &> +<& /Elements/TitleBoxEnd &> + +<& /Elements/Submit, Label => loc('Save Changes'), Caption => loc("If you've updated anything above, be sure to"), color => "#993333" &> +
+<%INIT> + +my $TicketObj = LoadTicket($id); +my $CustomFields = $TicketObj->QueueObj->CustomFields(); + +# Now let callbacks have a chance at editing %ARGS +$m->comp('/Elements/Callback', TicketObj => $TicketObj, CustomFields => $CustomFields, %ARGS); + +my @results = ProcessTicketBasics(TicketObj => $TicketObj, ARGSRef => \%ARGS); +my @cf_results = ProcessTicketCustomFieldUpdates(ARGSRef => \%ARGS); +push (@results, @cf_results); + +# TODO: display the results, even if we can't display the ticket + +unless ($TicketObj->CurrentUserHasRight('ShowTicket')) { + Abort("No permission to view ticket"); +} + + + + +<%ARGS> +$id => undef + diff --git a/rt/html/Ticket/ModifyAll.html b/rt/html/Ticket/ModifyAll.html new file mode 100644 index 000000000..a50689398 --- /dev/null +++ b/rt/html/Ticket/ModifyAll.html @@ -0,0 +1,158 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<& /Elements/Header, Title => loc("Ticket #[_1] Jumbo update: [_2]", $Ticket->Id, $Ticket->Subject) &> +<& /Ticket/Elements/Tabs, + Ticket => $Ticket, + current_tab => "Ticket/ModifyAll.html?id=".$Ticket->Id, + Title => loc("Ticket #[_1] Jumbo update: [_2]", $Ticket->Id, $Ticket->Subject) &> + +<& /Elements/ListActions, actions => \@results &> + +
+ + + +<& /Elements/TitleBoxStart, title => loc('Modify ticket # [_1]', $Ticket->Id), color=> "#993333", width => "100%" &> +<& Elements/EditBasics, TicketObj => $Ticket &> +<& Elements/EditCustomFields, TicketObj => $Ticket &> +<& /Elements/TitleBoxEnd &> + +
+ +<& /Elements/TitleBoxStart, title => loc('Dates'), width => "100%", color => "#663366" &> +<& Elements/EditDates, TicketObj => $Ticket &> +<& /Elements/TitleBoxEnd &> + +
+ + +<& /Elements/TitleBoxStart, title => loc('People'),width => "100%", color=> "#333399" &> +<& Elements/EditPeople, Ticket => $Ticket, UserField => $UserField, UserString => $UserString, UserOp => $UserOp &> +<& /Elements/TitleBoxEnd &> + +
+ +<& /Elements/TitleBoxStart, title => loc('Relationships'), color => "#336633"&> +<& Elements/EditLinks, Ticket => $Ticket &> +<& /Elements/TitleBoxEnd &> + +
+ +<& /Elements/TitleBoxStart, title => loc('Update ticket') &> + + + + + + + + + + + + + + + + + +
<&|/l&>Update Type: + +
<&|/l&>Subject:
<&|/l&>Attach:
<&|/l&>Content:<& /Elements/MessageBox, Name=>"UpdateContent", QuoteTransaction=>$ARGS{QuoteTransaction} &>
+<& /Elements/TitleBoxEnd &> + + +<& /Elements/Submit, Label => loc('Save Changes'), Caption => loc("If you've updated anything above, be sure to"), color => "#333399" &> +
+ +<%INIT> + + + +my $Ticket = LoadTicket($id); + +my $CanRespond = 0; +my $CanComment = 0; + + +$CanRespond = 1 if ( $Ticket->CurrentUserHasRight('ReplyToTicket') or + $Ticket->CurrentUserHasRight('ModifyTicket') ); + +$CanComment = 1 if ( $Ticket->CurrentUserHasRight('CommentOnTicket') or + $Ticket->CurrentUserHasRight('ModifyTicket') ); + + +my (@wresults, @results, @dresults, @lresults, @cf_results); + +unless ($OnlySearchForPeople) { + @wresults = ProcessTicketWatchers( TicketObj => $Ticket, ARGSRef => \%ARGS); + @results = ProcessTicketBasics( TicketObj => $Ticket, ARGSRef => \%ARGS); + @cf_results = ProcessTicketCustomFieldUpdates(ARGSRef => \%ARGS); + @dresults = ProcessTicketDates( TicketObj => $Ticket, ARGSRef => \%ARGS); + @lresults = ProcessTicketLinks( TicketObj => $Ticket, ARGSRef => \%ARGS); + + $ARGS{'UpdateContent'} =~ s/\r\n/\n/g; + + if ($ARGS{'UpdateContent'} && + $ARGS{'UpdateContent'} ne '' && + $ARGS{'UpdateContent'} ne "-- \n" . + $session{'CurrentUser'}->UserObj->Signature + ) { + ProcessUpdateMessage(TicketObj => $Ticket, + ARGSRef=>\%ARGS, + Actions=>\@results); + } +} +push @results, @wresults; +push @results, @dresults; +push @results, @lresults; +push @results, @cf_results; + +# If they've gone and moved the ticket to somewhere they can't see, etc... +# TODO: display the results, even if we can't display the ticket. + +unless ($Ticket->CurrentUserHasRight('ShowTicket')) { + Abort("No permission to view ticket"); +} + + + + + + +<%ARGS> +$OnlySearchForPeople => undef +$UserField => undef +$UserOp => undef +$UserString => undef +$id => undef + + diff --git a/rt/html/Ticket/ModifyDates.html b/rt/html/Ticket/ModifyDates.html new file mode 100644 index 000000000..3ccae4431 --- /dev/null +++ b/rt/html/Ticket/ModifyDates.html @@ -0,0 +1,52 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<& /Elements/Header, Title => loc('Modify dates for #[_1]', $TicketObj->Id) &> +<& /Ticket/Elements/Tabs, + Ticket => $TicketObj, + current_tab => "Ticket/ModifyDates.html?id=".$TicketObj->Id, + Title => loc('Modify dates for #[_1]', $TicketObj->Id) &> + +<& /Elements/ListActions, actions => \@results &> + +
+ +<& /Elements/TitleBoxStart, title => loc('Modify dates for ticket # [_1]', $TicketObj->Id), width => "100%", color => "#663366" &> + +<& Elements/EditDates, TicketObj => $TicketObj &> +<& /Elements/TitleBoxEnd &> +<& /Elements/Submit, color => "#663366" &> +
+ + +<%INIT> + +my $TicketObj = LoadTicket($id); +my @results = ProcessTicketDates( TicketObj => $TicketObj, ARGSRef => \%ARGS); + + + + +<%ARGS> +$id => undef + diff --git a/rt/html/Ticket/ModifyLinks.html b/rt/html/Ticket/ModifyLinks.html new file mode 100644 index 000000000..1d050088b --- /dev/null +++ b/rt/html/Ticket/ModifyLinks.html @@ -0,0 +1,54 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<& /Elements/Header, Title => loc("Link ticket #[_1]", $Ticket->Id) &> +<& /Ticket/Elements/Tabs, + Ticket => $Ticket, + current_tab => "Ticket/ModifyLinks.html?id=".$Ticket->Id, + Title => loc("Link ticket #[_1]", $Ticket->Id) &> + +<& /Elements/ListActions, actions => \@results &> + +
+ + +<& /Elements/TitleBoxStart, title => loc('Edit Relationships'), color => "#336633"&> +<& Elements/EditLinks, Ticket => $Ticket &> +<& /Elements/TitleBoxEnd &> +<& /Elements/Submit, color => "#336633", Caption=> loc('Save Changes') &> +
+ + + + +<%INIT> + +my $Ticket = LoadTicket($id); +my @results = ProcessTicketLinks( TicketObj => $Ticket, ARGSRef => \%ARGS); + + + + +<%ARGS> +$id => undef + diff --git a/rt/html/Ticket/ModifyPeople.html b/rt/html/Ticket/ModifyPeople.html new file mode 100644 index 000000000..2e41664d9 --- /dev/null +++ b/rt/html/Ticket/ModifyPeople.html @@ -0,0 +1,67 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<& /Elements/Header, Title => loc('Modify people related to ticket #[_1]', $Ticket->id) &> +<& /Ticket/Elements/Tabs, + Ticket => $Ticket, + current_tab => "Ticket/ModifyPeople.html?id=".$Ticket->Id, + Title => loc('Modify people related to ticket #[_1]', $Ticket->id) &> + +<& /Elements/ListActions, actions => \@results &> + +
+ +<& /Elements/TitleBoxStart, title => loc('Modify people related to ticket #[_1]', $Ticket->Id), width => "100%", color=> "#333399" &> +<& Elements/EditPeople, Ticket => $Ticket, UserField => $UserField, UserString => $UserString, UserOp => $UserOp, GroupString => $GroupString, GroupOp => $GroupOp, GroupField => $GroupField &> +<& /Elements/TitleBoxEnd &> +<& /Elements/Submit, Label => loc('Save Changes'), Caption => loc("If you've updated anything above, be sure to"), color => "#333399" &> +
+ +<%INIT> + +my (@results, @wresults); + +my $Ticket = LoadTicket($id); + +# if we're trying to search for watchers and nothing else +unless ($OnlySearchForPeople) { + @results = ProcessTicketBasics( TicketObj => $Ticket, ARGSRef => \%ARGS); + @wresults = ProcessTicketWatchers( TicketObj => $Ticket, ARGSRef => \%ARGS); +} + +push @results, @wresults; + + + + +<%ARGS> +$OnlySearchForPeople => undef +$UserField => undef +$UserOp => undef +$UserString => undef +$GroupField => undef +$GroupOp => undef +$GroupString => undef +$id => undef + + diff --git a/rt/html/Ticket/Update.html b/rt/html/Ticket/Update.html new file mode 100644 index 000000000..e19aacf6a --- /dev/null +++ b/rt/html/Ticket/Update.html @@ -0,0 +1,205 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<& /Elements/Header, Title => $title &> +<& /Ticket/Elements/Tabs, + Ticket => $Ticket , + Title=> $title &> + +
+ + + + + + + + + + +
+<&|/l&>Ticket watchers +<&|/l&>Requestor: + +<% $Ticket->RequestorAddresses %> +
  +<&|/l&>Cc: + +<% $Ticket->CcAddresses %> +
  +<&|/l&>AdminCc: + +<% $Ticket->AdminCcAddresses %> +
+
+ + + + + + + + + + +% if (exists $session{'Attachments'}) { + + + + +% } # end of if + + +
+
<&|/l&>Status: +<& /Elements/SelectStatus, Name=>"Status", Default => $DefaultStatus &> +<&|/l&>Owner: +<& /Elements/SelectOwner, Name=>"Owner", Default => ($ARGS{'Owner'} || $Ticket->OwnerObj->Id()), QueueObj => $Ticket->QueueObj, TicketObj => $Ticket &> +<&|/l&>Worked: <&|/l&>minutes
<&|/l&>Update Type: +
<&|/l&>Subject:
<&|/l&>Cc: >
+ +<&|/l&>(Sends a carbon-copy of this update to a comma-delimited list of email addresses. Does not change who will receive future updates.) +
<&|/l&>Bcc:
+ +<&|/l&>(Sends a blind carbon-copy of this update to a comma-delimited list of email addresses. Does not change who will receive future updates.) +
+<&|/l&>Attached file: + +<&|/l&>Check box to delete
+% foreach my $attach_name (keys %{$session{'Attachments'}}) { +<%$attach_name%>
+% } # end of foreach +
<&|/l&>Attach: +
<&|/l&>Message: +<& /Elements/Callback, _CallbackName => 'BeforeMessageBox', %ARGS &> +% if (exists $ARGS{UpdateContent}) { +% delete $ARGS{'QuoteTransaction'}; +<& /Elements/MessageBox, Name=>"UpdateContent", Default=>$ARGS{UpdateContent}, %ARGS&> +% } else { +<& /Elements/MessageBox, Name=>"UpdateContent", %ARGS &> +% } +
+ + + + +<& /Elements/Submit, Name => 'SubmitTicket' &> + + + + +<%INIT> + +my $CanRespond = 0; +my $CanComment = 0; +my $title; + +my $Ticket = LoadTicket($id); + +unless($DefaultStatus){ + $DefaultStatus=($ARGS{'Status'} ||$Ticket->Status()); +} + +if ($DefaultStatus =~ '^new$'){ + $DefaultStatus='open'; +} + +if ($DefaultStatus eq 'resolved') { + $title = loc("Resolve ticket #[_1] ([_2])", $Ticket->id, $Ticket->Subject); +} else { + $title = loc("Update ticket #[_1] ([_2])", $Ticket->id, $Ticket->Subject); +} + +# Things needed in the template - we'll do the processing here, just +# for the convenience: + +my ($CommentDefault, $ResponseDefault); +if (($Action eq 'Comment') or ($ARGS{'UpdateType'} eq 'private')) { + $CommentDefault = "SELECTED"; +} else { + $ResponseDefault = "SELECTED"; +} + + +$CanRespond = 1 if ( $Ticket->CurrentUserHasRight('ReplyToTicket') or + $Ticket->CurrentUserHasRight('ModifyTicket') ); + +$CanComment = 1 if ( $Ticket->CurrentUserHasRight('CommentOnTicket') or + $Ticket->CurrentUserHasRight('ModifyTicket') ); + + +# {{{ deal with deleting uploaded attachments +foreach my $key (keys %ARGS) { + if ($key =~ m/^DeleteAttach-(.+)$/) { + delete $session{'Attachments'}{$1}; + } + $session{'Attachments'} = { %{$session{'Attachments'} || {}} }; +} + +# {{{ store the uploaded attachment in session +if ($ARGS{'Attach'}) { # attachment? + $session{'Attachments'} = {} unless defined $session{'Attachments'}; + + my $subject = "$ARGS{'Attach'}"; + # since CGI.pm deutf8izes the magic field, we need to add it back. + Encode::_utf8_on($subject); + # strip leading directories + $subject =~ s#^.*[\\/]##; + + my $attachment = MakeMIMEEntity( + Subject => $subject, + Body => "", + AttachmentFieldName => 'Attach' + ); + + $session{'Attachments'} = { %{$session{'Attachments'} || {}}, + $ARGS{'Attach'} => $attachment }; +} +# }}} + +# delete temporary storage entry to make WebUI clean +unless (keys %{$session{'Attachments'}} and $ARGS{'UpdateAttach'}) { + delete $session{'Attachments'}; +} +# }}} + +if ( exists $ARGS{SubmitTicket} ) { + $m->comp('Display.html', %ARGS); + return; +} + + +<%ARGS> +$id => undef +$Action => undef +$DefaultStatus => undef + -- cgit v1.2.1 From 289340780927b5bac2c7604d7317c3063c6dd8cc Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 11 Mar 2004 02:05:38 +0000 Subject: import of rt 3.0.9 --- rt/html/Ticket/Attachment/dhandler | 4 +- rt/html/Ticket/Create.html | 69 ++++++++++++++++------------ rt/html/Ticket/Display.html | 76 ++++++++++++++++--------------- rt/html/Ticket/Elements/AddWatchers | 2 + rt/html/Ticket/Elements/EditCustomField | 4 ++ rt/html/Ticket/Elements/EditLinks | 29 +++--------- rt/html/Ticket/Elements/EditPeople | 3 +- rt/html/Ticket/Elements/ShowAttachments | 5 +- rt/html/Ticket/Elements/ShowDates | 11 ++++- rt/html/Ticket/Elements/ShowHistory | 2 +- rt/html/Ticket/Elements/ShowMessageStanza | 12 ++++- rt/html/Ticket/Elements/ShowPeople | 6 +-- rt/html/Ticket/Elements/ShowTransaction | 24 +++++++--- rt/html/Ticket/Elements/Tabs | 10 +++- rt/html/Ticket/Modify.html | 2 +- rt/html/Ticket/ModifyAll.html | 2 +- rt/html/Ticket/ModifyPeople.html | 3 +- rt/html/Ticket/Update.html | 36 +++++++-------- 18 files changed, 171 insertions(+), 129 deletions(-) (limited to 'rt/html/Ticket') diff --git a/rt/html/Ticket/Attachment/dhandler b/rt/html/Ticket/Attachment/dhandler index e0f00f57a..ba82b5f2e 100644 --- a/rt/html/Ticket/Attachment/dhandler +++ b/rt/html/Ticket/Attachment/dhandler @@ -65,4 +65,6 @@ $m->out($AttachmentObj->OriginalContent); $m->abort; - +<%attr> +AutoFlush => 0 + diff --git a/rt/html/Ticket/Create.html b/rt/html/Ticket/Create.html index 5b8c908a1..435447a8f 100644 --- a/rt/html/Ticket/Create.html +++ b/rt/html/Ticket/Create.html @@ -34,55 +34,55 @@
<& /Elements/TitleBoxStart, contentbg => "#cccccc", title => loc("Create a new ticket") &> - - + - - - - - - - - - - - - @@ -93,7 +93,7 @@ % if (exists $session{'Attachments'}) { - - @@ -152,8 +152,8 @@
<&|/l&>Queue<% $QueueObj->Name %> +
<&|/l&>Queue:<% $QueueObj->Name %> <&|/l&>Status: +<&|/l&>Status: + <& /Elements/SelectStatus, Name => "Status", Default => $ARGS{Status}||'new' &> + <&|/l&>Owner: + <& /Elements/SelectOwner, Name => "Owner", QueueObj => $QueueObj, Default => $ARGS{Owner}||undef &>
+ <&|/l&>Requestors: +
+ <&|/l&>Cc: ->
+
+
<&|/l&>(Sends a carbon-copy of this update to a comma-delimited list of email addresses. These people will receive future updates.)
+ <&|/l&>Admin Cc: ->
+
+
<&|/l&>(Sends a carbon-copy of this update to a comma-delimited list of administrative email addresses. These people will receive future updates.)
+ <&|/l&>Subject: +
+ <&|/l&>Attached file: @@ -108,7 +108,7 @@ <&|/l&>Attach file: +
- - + +
<&|/l&>Priority:
<&|/l&>Final Priority:
<&|/l&>Time Worked:>
<&|/l&>Time Left:>
<&|/l&>Time Worked:
<&|/l&>Time Left:
<& /Elements/TitleBoxEnd &>
@@ -162,8 +162,9 @@ color => "#663366" &> - - + +
<&|/l&>Starts:>
<&|/l&>Due:>
<&|/l&>Starts:
<&|/l&>Due:
<& /Elements/TitleBoxEnd &>
@@ -176,12 +177,12 @@ <&|/l&>(Enter ticket ids or URLs, seperated with spaces) - - - - - - + + + + + +
<&|/l&>Depends on>
<&|/l&>Depended on by>
<&|/l&>Parents>
<&|/l&>Children>
<&|/l&>Refers to>
<&|/l&>Referred to by>
<&|/l&>Depends on
<&|/l&>Depended on by
<&|/l&>Parents
<&|/l&>Children
<&|/l&>Refers to
<&|/l&>Referred to by
@@ -200,10 +201,20 @@










<%INIT> + + + my $QueueObj = new RT::Queue($session{'CurrentUser'}); $QueueObj->Load($Queue) || Abort(loc("Queue could not be loaded.")); my $CFs = $QueueObj->CustomFields(); +if ($QueueObj->DefaultDueIn) { + my $default_due = RT::Date->new($session{'CurrentUser'}); + $default_due->SetToNow(); + $default_due->AddDays($QueueObj->DefaultDueIn); + $ARGS{'Due'} = $default_due->ISO(); +} + # {{{ deal with deleting uploaded attachments foreach my $key (keys %ARGS) { if ($key =~ m/^DeleteAttach-(.+)$/) { @@ -218,8 +229,6 @@ if ($ARGS{'Attach'}) { # attachment? my $subject = "$ARGS{'Attach'}"; - # since CGI.pm deutf8izes the magic field, we need to add it back. - Encode::_utf8_on($subject); # strip leading directories $subject =~ s#^.*[\\/]##; diff --git a/rt/html/Ticket/Display.html b/rt/html/Ticket/Display.html index cf32dce9d..276cee62a 100644 --- a/rt/html/Ticket/Display.html +++ b/rt/html/Ticket/Display.html @@ -22,20 +22,20 @@ %# %# END LICENSE BLOCK <& /Elements/Header, - Title => loc("#[_1]: [_2]", $Ticket->Id, $Ticket->Subject) &> + Title => loc("#[_1]: [_2]", $TicketObj->Id, $TicketObj->Subject) &> <& /Ticket/Elements/Tabs, - Ticket => $Ticket, - current_tab => 'Ticket/Display.html?id='.$Ticket->id, - Title => loc("#[_1]: [_2]", $Ticket->Id, $Ticket->Subject) &> + Ticket => $TicketObj, + current_tab => 'Ticket/Display.html?id='.$TicketObj->id, + Title => loc("#[_1]: [_2]", $TicketObj->Id, $TicketObj->Subject) &> <& /Elements/ListActions, actions => \@Actions &> -<& /Ticket/Elements/ShowSummary, Ticket => $Ticket &> +<& /Ticket/Elements/ShowSummary, Ticket => $TicketObj &>
<& /Ticket/Elements/ShowHistory , - Ticket => $Ticket, + Ticket => $TicketObj, Collapsed => $ARGS{'Collapsed'}, ShowHeaders => $ARGS{'ShowHeaders'} &> @@ -45,14 +45,13 @@ $id => undef $Create => undef $ShowHeaders => undef $Collapsed => undef +$TicketObj => undef <%INIT> - my ($linkid, $message, $tid, $Ticket, @Actions); + my ($linkid, $message, $tid, @Actions); -$Ticket = new RT::Ticket($session{'CurrentUser'}); - -unless ($id) { +unless ($id || $TicketObj) { Abort('No ticket specified'); } @@ -67,47 +66,50 @@ if ($ARGS{'id'} eq 'new') { unless ($Queue->CurrentUserHasRight('CreateTicket')) { Abort('You have no permission to create tickets in that queue.'); } - ($Ticket, @Actions) = - CreateTicket(Attachments => $session{'Attachments'}, %ARGS); + ($TicketObj, @Actions) = + CreateTicket(Attachments => $session{'Attachments'}, %ARGS); delete $session{'Attachments'}; - unless ($Ticket->CurrentUserHasRight('ShowTicket')) { - Abort("No permission to view newly created ticket #".$Ticket->id."."); - } + unless ($TicketObj->CurrentUserHasRight('ShowTicket')) { + Abort("No permission to view newly created ticket #".$TicketObj->id."."); + } # }}} -} +} else { + if (!$TicketObj) { -else { - $Ticket = LoadTicket($ARGS{'id'}); - unless ($Ticket->CurrentUserHasRight('ShowTicket')) { - Abort("No permission to view ticket"); - } + $TicketObj = RT::Ticket->new($session{'CurrentUser'}); + $TicketObj = LoadTicket($ARGS{'id'}); + unless ($TicketObj->CurrentUserHasRight('ShowTicket')) { + Abort("No permission to view ticket"); + } + } -if (defined $ARGS{'Action'}) { - if ($ARGS{'Action'} =~ /^(Steal|Kill|Take|SetTold)$/) { - my $action = $1; - my ($res, $msg)=$Ticket->$action(); - push(@Actions, $msg); - } -} + if (defined $ARGS{'Action'}) { + if ($ARGS{'Action'} =~ /^(Steal|Kill|Take|SetTold)$/) { + my $action = $1; + my ($res, $msg)=$TicketObj->$action(); + push(@Actions, $msg); + } + } - if ( $ARGS{'UpdateContent'} ) { + if ( $ARGS{'UpdateContent'} || $session{'Attachments'}) { $ARGS{'UpdateContent'} =~ s/\r\n/\n/g; - if ( $ARGS{'UpdateContent'} ne '' - && $ARGS{'UpdateContent'} ne "-- \n" - . $session{'CurrentUser'}->UserObj->Signature ) { + if ( $session{'Attachments'} || + ( $ARGS{'UpdateContent'} ne '' + && $ARGS{'UpdateContent'} ne "-- \n" + . $session{'CurrentUser'}->UserObj->Signature )) { $ARGS{UpdateAttachments} = $session{'Attachments'}; ProcessUpdateMessage( ARGSRef => \%ARGS, Actions => \@Actions, - TicketObj => $Ticket ); + TicketObj => $TicketObj ); delete $session{'Attachments'}; } } -#Process status updates -my @BasicActions = ProcessTicketBasics(ARGSRef => \%ARGS, TicketObj=>$Ticket); -my @results = ProcessTicketLinks( TicketObj => $Ticket, ARGSRef => \%ARGS); + #Process status updates + my @BasicActions = ProcessTicketBasics(ARGSRef => \%ARGS, TicketObj=>$TicketObj); + my @results = ProcessTicketLinks( TicketObj => $TicketObj, ARGSRef => \%ARGS); -push (@Actions, @BasicActions, @results); + push (@Actions, @BasicActions, @results); } diff --git a/rt/html/Ticket/Elements/AddWatchers b/rt/html/Ticket/Elements/AddWatchers index e9f651593..96dd38f08 100644 --- a/rt/html/Ticket/Elements/AddWatchers +++ b/rt/html/Ticket/Elements/AddWatchers @@ -77,6 +77,7 @@ my ($msg, $Users, $Groups); if ($UserString) { $Users = RT::Users->new($session{'CurrentUser'}); $Users->Limit(FIELD => $UserField, VALUE => $UserString, OPERATOR => $UserOp); + $Users->LimitToPrivileged if $PrivilegedOnly; } if ($GroupString) { @@ -94,4 +95,5 @@ $UserString => undef $GroupField => 'Name' $GroupOp => '=' $GroupString => undef +$PrivilegedOnly => undef diff --git a/rt/html/Ticket/Elements/EditCustomField b/rt/html/Ticket/Elements/EditCustomField index 1fc7d4388..16348061e 100644 --- a/rt/html/Ticket/Elements/EditCustomField +++ b/rt/html/Ticket/Elements/EditCustomField @@ -30,6 +30,8 @@ size="<%$Cols%>" % if ($TicketObj) { value="<%$Values->Count ? $Values->First->Content : ''%>" +% } elsif ($Default) { + value="<%$Default ? $Default : ''%>" % } > % } elsif ($CustomField->Type eq 'FreeformMultiple') { @@ -38,6 +40,8 @@ % while (my $value = $Values->Next ) { % $content .= $value->Content; % } +% } elsif ($Default) { + value="<%$Default ? $Default : ''%>" % } diff --git a/rt/html/Ticket/Elements/EditLinks b/rt/html/Ticket/Elements/EditLinks index 7a522dda6..bdb8a6b7d 100644 --- a/rt/html/Ticket/Elements/EditLinks +++ b/rt/html/Ticket/Elements/EditLinks @@ -35,10 +35,8 @@ <&|/l&>Depends on: % while (my $link = $Ticket->DependsOn->Next) { -% my $member = $link->TargetObj; - <%$member->Id%>: (<%$member->OwnerObj->Name%>) <%$member->Subject%> - [<%$member->Status%>]
+ <& ShowLink, URI => $link->TargetURI &>
% } @@ -48,8 +46,7 @@ % while (my $link = $Ticket->DependedOnBy->Next) { % my $member = $link->BaseObj; - <%$member->Id%>: (<%$member->OwnerObj->Name%>) <%$member->Subject%> - [<%$member->Status%>]
+ <& ShowLink, URI => $link->BaseURI &>
% } @@ -57,10 +54,8 @@ <&|/l&>Parents: % while (my $link = $Ticket->MemberOf->Next) { -% my $member = $link->TargetObj; - <%$member->Id%>: (<%$member->OwnerObj->Name%>) <%$member->Subject%> - [<%$member->Status%>]
+ <& ShowLink, URI => $link->TargetURI &>
% } @@ -69,9 +64,7 @@ % while (my $link = $Ticket->Members->Next) { -% my $member = $link->BaseObj; - <%$member->Id%>: (<%$member->OwnerObj->Name%>) <%$member->Subject%> - [<%$member->Status%>]
+ <& ShowLink, URI => $link->BaseURI &>
% } @@ -80,12 +73,7 @@ % while (my $link = $Ticket->RefersTo->Next) { -% if ($link->TargetURI->IsLocal) { -% my $member = $link->TargetObj; - <%$member->Id%>: (<%$member->OwnerObj->Name%>) <%$member->Subject%> [<%$member->Status%>]
-% } else { - <%$link->TargetURI->Resolver->AsString%>
-% } + <& ShowLink, URI => $link->TargetURI &>
%} @@ -94,12 +82,7 @@ % while (my $link = $Ticket->ReferredToBy->Next) { -% if ($link->BaseURI->IsLocal) { -% my $member = $link->BaseObj; - <%$member->Id%>: (<%$member->OwnerObj->Name%>) <%$member->Subject%> [<%$member->Status%>]
-% } else { - <%$link->BaseURI->Resolver->AsString%>
-%} + <& ShowLink, URI => $link->BaseURI &>
% } diff --git a/rt/html/Ticket/Elements/EditPeople b/rt/html/Ticket/Elements/EditPeople index 1ab8f4ace..a1fc0111a 100644 --- a/rt/html/Ticket/Elements/EditPeople +++ b/rt/html/Ticket/Elements/EditPeople @@ -37,7 +37,7 @@ <& AddWatchers, Ticket => $Ticket, UserString => $UserString, UserOp => $UserOp, UserField => $UserField, GroupString => $GroupString, GroupOp => $GroupOp, - GroupField => $GroupField &> + GroupField => $GroupField, PrivilegedOnly => $PrivilegedOnly &>

<&|/l&>Owner

<&|/l&>Owner: <& /Elements/SelectOwner, Name => 'Owner', QueueObj => $Ticket->QueueObj, TicketObj => $Ticket, Default => $Ticket->OwnerObj->Id &> @@ -64,5 +64,6 @@ $UserString => undef $GroupField => undef $GroupOp => undef $GroupString => undef +$PrivilegedOnly => undef $Ticket => undef diff --git a/rt/html/Ticket/Elements/ShowAttachments b/rt/html/Ticket/Elements/ShowAttachments index 22b60d11b..590a011fb 100644 --- a/rt/html/Ticket/Elements/ShowAttachments +++ b/rt/html/Ticket/Elements/ShowAttachments @@ -47,7 +47,7 @@ if ($size) {
  • > - <%$rev->CreatedAsString%> (<% $size %>)
  • + <%$rev->CreatedAsString%> (<% $size %>)
    % } % $fontsize='size="-2"'; % } @@ -63,6 +63,9 @@ my %documents; my $transactions = $Ticket->Transactions(); while (my $trans = $transactions->Next()) { my $attachments = $trans->Attachments(); + $attachments->Columns( qw( Id Filename ContentType Headers Subject Parent ContentEncoding ContentType TransactionId) ); + $attachments->Limit(FIELD => 'Filename', OPERATOR => 'IS NOT', VALUE => 'NULL', QUOTEVALUE => 0, ENTRYAGGREGATOR => 'AND'); + $attachments->Limit(FIELD => 'Filename', OPERATOR => '!=', VALUE => '', ENTRYAGGREGATOR => 'AND'); while (my $attach = $attachments->Next()) { next unless ($attach->Filename()); # most recent at the top diff --git a/rt/html/Ticket/Elements/ShowDates b/rt/html/Ticket/Elements/ShowDates index da7f75bb6..b09b4bf7b 100644 --- a/rt/html/Ticket/Elements/ShowDates +++ b/rt/html/Ticket/Elements/ShowDates @@ -21,6 +21,7 @@ %# %# %# END LICENSE BLOCK + @@ -35,7 +36,7 @@ - + @@ -48,9 +49,15 @@ - +% my $UpdatedString = $Ticket->LastUpdated ? (loc("[_1] by [_2]", $Ticket->LastUpdatedAsString, $Ticket->LastUpdatedByObj->Name)) : loc("Never"); +% if ($UpdatedLink) { + +% } else { + +% }
    <&|/l&>Created:<% $Ticket->StartedObj->AsString %>
    <&|/l&>Last Contact:<&|/l&>Last Contact: <% $Ticket->ToldObj->AsString %>
    <&|/l&>Updated:<% $Ticket->LastUpdated ? (loc("[_1] by [_2]", $Ticket->LastUpdatedAsString, $Ticket->LastUpdatedByObj->Name)) : loc("Never") | h %><% $UpdatedString | h %><% $UpdatedString | h %>
    <%ARGS> $Ticket => undef +$UpdatedLink => 1 diff --git a/rt/html/Ticket/Elements/ShowHistory b/rt/html/Ticket/Elements/ShowHistory index 2958f8706..194be9b37 100644 --- a/rt/html/Ticket/Elements/ShowHistory +++ b/rt/html/Ticket/Elements/ShowHistory @@ -62,7 +62,7 @@ else { % if ($Transactions->IsLast) { % } - <& ShowTransaction, Ticket => $Ticket, Transaction => $Transaction, ShowHeaders => $ShowHeaders, Collapsed => $Collapsed, RowNum => $i, ShowTitleBarCommands => $ShowTitleBarCommands &> + <& ShowTransaction, Ticket => $Ticket, Transaction => $Transaction, ShowHeaders => $ShowHeaders, Collapsed => $Collapsed, RowNum => $i, ShowTitleBarCommands => $ShowTitleBarCommands, %ARGS &> % } % if ($ShowDisplayModes or $ShowTitle) { diff --git a/rt/html/Ticket/Elements/ShowMessageStanza b/rt/html/Ticket/Elements/ShowMessageStanza index b0998068f..8e3045a36 100644 --- a/rt/html/Ticket/Elements/ShowMessageStanza +++ b/rt/html/Ticket/Elements/ShowMessageStanza @@ -21,6 +21,8 @@ %# %# %# END LICENSE BLOCK +% if (ref($Message)) { + <%perl> foreach my $stanza (@$Message) { if ( ref $stanza eq "ARRAY" ) { @@ -36,8 +38,16 @@ foreach my $stanza (@$Message) { $content =~ s/\n/
    /gi; -<%$content |n%>
    +<%$content |n%>
    % } +% } # end foreach +
    +% } else { +% my $content = $Message; +% RT::Interface::Web::EscapeUTF8(\$content); +% $m->comp('/Elements/Callback', content => \$content, %ARGS); +% $content =~ s/\n/
    /gi; +<%$content |n%>
    % } <%INIT> use URI::URL; diff --git a/rt/html/Ticket/Elements/ShowPeople b/rt/html/Ticket/Elements/ShowPeople index 0b8026949..160da70d9 100644 --- a/rt/html/Ticket/Elements/ShowPeople +++ b/rt/html/Ticket/Elements/ShowPeople @@ -27,15 +27,15 @@ <%$Ticket->OwnerObj->Name%> - <&|/l&>Requestors: + <&|/l&>Requestors: <%$Ticket->RequestorAddresses%> - <&|/l&>Cc: + <&|/l&>Cc: <%$Ticket->CcAddresses%> - <&|/l&>AdminCc: + <&|/l&>AdminCc: <%$Ticket->AdminCcAddresses%> diff --git a/rt/html/Ticket/Elements/ShowTransaction b/rt/html/Ticket/Elements/ShowTransaction index f2f89d35c..2d710fcbc 100644 --- a/rt/html/Ticket/Elements/ShowTransaction +++ b/rt/html/Ticket/Elements/ShowTransaction @@ -38,8 +38,6 @@ unless ($Collapsed) { $attachments->GotoFirstItem; while (my $message=$attachments->Next) { - #we don't want to show any empty transactions, unless they have kids - next unless ($message->ContentLength || $message->Children->Count); my ($headers, $quoted); if ($ShowHeaders && ($ShowHeaders == $Ticket->Id)) { @@ -53,11 +51,18 @@ unless ($Collapsed) { eval {$headers =~ s/^([^:]+)(?=:)/loc($1)/em; } # we eval here to catch errors when 5.6 panics } # 13456 is a random # of about the biggest size we want to see inline text - my $MAX_INLINE_BODY = 13456; + # It's here to catch anyone who hasn't updated RT_Config.pm since this + # constant was moved out there. + my $MAX_INLINE_BODY = $RT::MaxInlineBody || 13456; if ($message->ContentType =~ m{^(text/plain|message|text$)}i && $message->ContentLength < $MAX_INLINE_BODY ) { + eval { require Text::Quoted; - $quoted = Text::Quoted::extract($message->Content); + $quoted = Text::Quoted::extract($message->Content); + }; + if ($@) { + $quoted = $message->Content; + } } @@ -69,7 +74,12 @@ unless ($Collapsed) {
     <& ShowMessageHeaders, Headers => $headers, Transaction => $Transaction &>
     
    +% if (!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 &> +% } @@ -78,7 +88,7 @@ unless ($Collapsed) {
    % } <%PERL> -my $size = $message->ContentLength; +my $size = $message->ContentLength or next; if ($size) { if ($size > 1024) { @@ -88,7 +98,7 @@ if ($size) { $size = loc("[_1]b", $size); } -<&|/l&>Download <% $message->Filename|| loc('(untitled)') %> <% $size %> +<&|/l&>Download <% $message->Filename|| loc('(untitled)') %> <% $size %> % } @@ -104,6 +114,7 @@ $ShowHeaders => 0 $Collapsed => undef $ShowTitleBarCommands => 1 $RowNum => 1 +$AttachPath => $RT::WebPath."/Ticket/Attachment" <%INIT> @@ -147,6 +158,7 @@ if ($Transaction->TimeTaken > 0) { $TimeTaken = $Transaction->TimeTaken." min" } my $attachments = $Transaction->Attachments; +$attachments->Columns( qw( Id Filename ContentType Headers Subject Parent ContentEncoding ContentType TransactionId) ); my $titlebar_commands=' '; diff --git a/rt/html/Ticket/Elements/Tabs b/rt/html/Ticket/Elements/Tabs index 81c92e8c2..cba45df91 100644 --- a/rt/html/Ticket/Elements/Tabs +++ b/rt/html/Ticket/Elements/Tabs @@ -45,11 +45,17 @@ my $id = $Ticket->id(); if ( defined $session{'tickets'} ) { + # we have to update session data if we get new ItemMap + my $updatesession = 1 unless($session{'tickets'}->{'item_map'}); -my $item_map = $session{'tickets'}->ItemMap; + my $item_map = $session{'tickets'}->ItemMap; - # Don't $current_toptab = display prev links if we're on the first ticket + if ($updatesession) { + $session{'i'}++; + $session{'tickets'}->PrepForSerialization(); + } + # Don't $current_toptab = display prev links if we're on the first ticket if ($item_map->{$Ticket->Id}->{prev}) { $searchtabs->{'_a'} = { class => "nav", diff --git a/rt/html/Ticket/Modify.html b/rt/html/Ticket/Modify.html index c97fd0994..e504a3cba 100644 --- a/rt/html/Ticket/Modify.html +++ b/rt/html/Ticket/Modify.html @@ -46,7 +46,7 @@ my $CustomFields = $TicketObj->QueueObj->CustomFields(); $m->comp('/Elements/Callback', TicketObj => $TicketObj, CustomFields => $CustomFields, %ARGS); my @results = ProcessTicketBasics(TicketObj => $TicketObj, ARGSRef => \%ARGS); -my @cf_results = ProcessTicketCustomFieldUpdates(ARGSRef => \%ARGS); +my @cf_results = ProcessTicketCustomFieldUpdates(TicketObj => $TicketObj, ARGSRef => \%ARGS); push (@results, @cf_results); # TODO: display the results, even if we can't display the ticket diff --git a/rt/html/Ticket/ModifyAll.html b/rt/html/Ticket/ModifyAll.html index a50689398..1163f3fa5 100644 --- a/rt/html/Ticket/ModifyAll.html +++ b/rt/html/Ticket/ModifyAll.html @@ -115,7 +115,7 @@ my (@wresults, @results, @dresults, @lresults, @cf_results); unless ($OnlySearchForPeople) { @wresults = ProcessTicketWatchers( TicketObj => $Ticket, ARGSRef => \%ARGS); @results = ProcessTicketBasics( TicketObj => $Ticket, ARGSRef => \%ARGS); - @cf_results = ProcessTicketCustomFieldUpdates(ARGSRef => \%ARGS); + @cf_results = ProcessTicketCustomFieldUpdates( TicketObj => $Ticket, ARGSRef => \%ARGS); @dresults = ProcessTicketDates( TicketObj => $Ticket, ARGSRef => \%ARGS); @lresults = ProcessTicketLinks( TicketObj => $Ticket, ARGSRef => \%ARGS); diff --git a/rt/html/Ticket/ModifyPeople.html b/rt/html/Ticket/ModifyPeople.html index 2e41664d9..debd27a97 100644 --- a/rt/html/Ticket/ModifyPeople.html +++ b/rt/html/Ticket/ModifyPeople.html @@ -44,7 +44,7 @@ my (@results, @wresults); my $Ticket = LoadTicket($id); # if we're trying to search for watchers and nothing else -unless ($OnlySearchForPeople) { +unless ($OnlySearchForPeople or $OnlySearchForGroup) { @results = ProcessTicketBasics( TicketObj => $Ticket, ARGSRef => \%ARGS); @wresults = ProcessTicketWatchers( TicketObj => $Ticket, ARGSRef => \%ARGS); } @@ -56,6 +56,7 @@ push @results, @wresults; <%ARGS> $OnlySearchForPeople => undef +$OnlySearchForGroup => undef $UserField => undef $UserOp => undef $UserString => undef diff --git a/rt/html/Ticket/Update.html b/rt/html/Ticket/Update.html index e19aacf6a..ad3b21787 100644 --- a/rt/html/Ticket/Update.html +++ b/rt/html/Ticket/Update.html @@ -23,7 +23,7 @@ %# END LICENSE BLOCK <& /Elements/Header, Title => $title &> <& /Ticket/Elements/Tabs, - Ticket => $Ticket , + Ticket => $TicketObj, Title=> $title &>
    -<&|/l&>Ticket watchers +<&|/l&>Ticket watchers <&|/l&>Requestor: -<% $Ticket->RequestorAddresses %> +<% $TicketObj->RequestorAddresses %>   <&|/l&>Cc: -<% $Ticket->CcAddresses %> +<% $TicketObj->CcAddresses %>   <&|/l&>AdminCc: -<% $Ticket->AdminCcAddresses %> +<% $TicketObj->AdminCcAddresses %> @@ -60,7 +60,7 @@ <& /Elements/SelectStatus, Name=>"Status", Default => $DefaultStatus &> <&|/l&>Owner: -<& /Elements/SelectOwner, Name=>"Owner", Default => ($ARGS{'Owner'} || $Ticket->OwnerObj->Id()), QueueObj => $Ticket->QueueObj, TicketObj => $Ticket &> +<& /Elements/SelectOwner, Name=>"Owner", Default => ($ARGS{'Owner'} || $TicketObj->OwnerObj->Id()), QueueObj => $TicketObj->QueueObj, TicketObj => $TicketObj &> <&|/l&>Worked: <&|/l&>minutes <&|/l&>Update Type: -<&|/l&>Subject: +<&|/l&>Subject: <&|/l&>Cc: >
    @@ -101,12 +101,12 @@ value=<% $ARGS{UpdateCc} %>>
    <& /Elements/Callback, _CallbackName => 'BeforeMessageBox', %ARGS &> % if (exists $ARGS{UpdateContent}) { % delete $ARGS{'QuoteTransaction'}; -<& /Elements/MessageBox, Name=>"UpdateContent", Default=>$ARGS{UpdateContent}, %ARGS&> +<& /Elements/MessageBox, Name=>"UpdateContent", Default=>$ARGS{UpdateContent}, IncludeSignature => 0, %ARGS&> % } else { <& /Elements/MessageBox, Name=>"UpdateContent", %ARGS &> % } -
    +
    @@ -123,10 +123,10 @@ my $CanRespond = 0; my $CanComment = 0; my $title; -my $Ticket = LoadTicket($id); +my $TicketObj = LoadTicket($id); unless($DefaultStatus){ - $DefaultStatus=($ARGS{'Status'} ||$Ticket->Status()); + $DefaultStatus=($ARGS{'Status'} ||$TicketObj->Status()); } if ($DefaultStatus =~ '^new$'){ @@ -134,9 +134,9 @@ if ($DefaultStatus =~ '^new$'){ } if ($DefaultStatus eq 'resolved') { - $title = loc("Resolve ticket #[_1] ([_2])", $Ticket->id, $Ticket->Subject); + $title = loc("Resolve ticket #[_1] ([_2])", $TicketObj->id, $TicketObj->Subject); } else { - $title = loc("Update ticket #[_1] ([_2])", $Ticket->id, $Ticket->Subject); + $title = loc("Update ticket #[_1] ([_2])", $TicketObj->id, $TicketObj->Subject); } # Things needed in the template - we'll do the processing here, just @@ -150,11 +150,11 @@ if (($Action eq 'Comment') or ($ARGS{'UpdateType'} eq 'private')) { } -$CanRespond = 1 if ( $Ticket->CurrentUserHasRight('ReplyToTicket') or - $Ticket->CurrentUserHasRight('ModifyTicket') ); +$CanRespond = 1 if ( $TicketObj->CurrentUserHasRight('ReplyToTicket') or + $TicketObj->CurrentUserHasRight('ModifyTicket') ); -$CanComment = 1 if ( $Ticket->CurrentUserHasRight('CommentOnTicket') or - $Ticket->CurrentUserHasRight('ModifyTicket') ); +$CanComment = 1 if ( $TicketObj->CurrentUserHasRight('CommentOnTicket') or + $TicketObj->CurrentUserHasRight('ModifyTicket') ); # {{{ deal with deleting uploaded attachments @@ -193,7 +193,7 @@ unless (keys %{$session{'Attachments'}} and $ARGS{'UpdateAttach'}) { # }}} if ( exists $ARGS{SubmitTicket} ) { - $m->comp('Display.html', %ARGS); + $m->comp('Display.html', TicketObj => $TicketObj, %ARGS); return; } -- cgit v1.2.1 From c582e92888b4a5553e1b4e5214cf35217e4a0cf0 Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 11 Nov 2004 12:13:50 +0000 Subject: import rt 3.0.12 --- rt/html/Ticket/Create.html | 12 +++--- rt/html/Ticket/Display.html | 36 ++++++++++------ rt/html/Ticket/Elements/FindAttachments | 46 ++++++++++++++++++++ rt/html/Ticket/Elements/LoadTextAttachments | 39 +++++++++++++++++ rt/html/Ticket/Elements/ShowAttachments | 22 +++++----- rt/html/Ticket/Elements/ShowDates | 2 +- rt/html/Ticket/Elements/ShowHistory | 66 +++++++++++++++++++++++----- rt/html/Ticket/Elements/ShowRequestor | 5 +-- rt/html/Ticket/Elements/ShowSummary | 3 +- rt/html/Ticket/Elements/ShowTransaction | 67 +++++++++++++++++------------ rt/html/Ticket/History.html | 13 +++++- rt/html/Ticket/ModifyAll.html | 28 +++++++++--- rt/html/Ticket/ModifyDates.html | 2 +- rt/html/Ticket/ModifyLinks.html | 2 +- rt/html/Ticket/Update.html | 2 +- 15 files changed, 261 insertions(+), 84 deletions(-) create mode 100755 rt/html/Ticket/Elements/FindAttachments create mode 100755 rt/html/Ticket/Elements/LoadTextAttachments (limited to 'rt/html/Ticket') diff --git a/rt/html/Ticket/Create.html b/rt/html/Ticket/Create.html index 435447a8f..9b5783cee 100644 --- a/rt/html/Ticket/Create.html +++ b/rt/html/Ticket/Create.html @@ -117,7 +117,7 @@ <&|/l&>Describe the issue below:
    % if (exists $ARGS{Content}) { -<& /Elements/MessageBox, Default => $ARGS{Content} &> +<& /Elements/MessageBox, Default => $ARGS{Content}, IncludeSignature => 0 &> % } else { <& /Elements/MessageBox, QuoteTransaction => $QuoteTransaction &> %} @@ -152,8 +152,8 @@ - - + +
    <&|/l&>Priority:
    <&|/l&>Final Priority:
    <&|/l&>Time Worked:
    <&|/l&>Time Left:
    <&|/l&>Time Worked:<&|/l,''&>[_1] min
    <&|/l&>Time Left:<&|/l,''&>[_1] min
    <& /Elements/TitleBoxEnd &>
    @@ -175,7 +175,7 @@ $ARGS{Due}%>"> title_class=> 'inverse', titleright => '', color=> "#336633" &> -<&|/l&>(Enter ticket ids or URLs, seperated with spaces) +<&|/l&>(Enter ticket ids or URLs, separated with spaces) @@ -208,7 +208,9 @@ my $QueueObj = new RT::Queue($session{'CurrentUser'}); $QueueObj->Load($Queue) || Abort(loc("Queue could not be loaded.")); my $CFs = $QueueObj->CustomFields(); -if ($QueueObj->DefaultDueIn) { +# if no due date has been set explicitly, then use the +# queue's default if it exists +if ($QueueObj->DefaultDueIn && !$ARGS{'Due'}) { my $default_due = RT::Date->new($session{'CurrentUser'}); $default_due->SetToNow(); $default_due->AddDays($QueueObj->DefaultDueIn); diff --git a/rt/html/Ticket/Display.html b/rt/html/Ticket/Display.html index 276cee62a..4a8983e6e 100644 --- a/rt/html/Ticket/Display.html +++ b/rt/html/Ticket/Display.html @@ -30,14 +30,18 @@ <& /Elements/ListActions, actions => \@Actions &> -<& /Ticket/Elements/ShowSummary, Ticket => $TicketObj &> +<& /Ticket/Elements/ShowSummary, Ticket => $TicketObj, Attachments => $attachments &>
    <& /Ticket/Elements/ShowHistory , Ticket => $TicketObj, Collapsed => $ARGS{'Collapsed'}, - ShowHeaders => $ARGS{'ShowHeaders'} &> + ShowHeaders => $ARGS{'ShowHeaders'}, + Attachments => $attachments, + AttachmentContent => $attachment_content + + &> <%ARGS> @@ -92,18 +96,17 @@ if ($ARGS{'id'} eq 'new') { } } - if ( $ARGS{'UpdateContent'} || $session{'Attachments'}) { - $ARGS{'UpdateContent'} =~ s/\r\n/\n/g; - if ( $session{'Attachments'} || - ( $ARGS{'UpdateContent'} ne '' - && $ARGS{'UpdateContent'} ne "-- \n" - . $session{'CurrentUser'}->UserObj->Signature )) { - $ARGS{UpdateAttachments} = $session{'Attachments'}; - ProcessUpdateMessage( ARGSRef => \%ARGS, - Actions => \@Actions, - TicketObj => $TicketObj ); - delete $session{'Attachments'}; - } + $ARGS{'UpdateContent'} =~ s/\r\n/\n/g; + if ( $ARGS{'UpdateTimeWorked'} || + $session{'Attachments'} || + ( $ARGS{'UpdateContent'} ne '' + && $ARGS{'UpdateContent'} ne "-- \n" + . $session{'CurrentUser'}->UserObj->Signature )) { + $ARGS{UpdateAttachments} = $session{'Attachments'}; + ProcessUpdateMessage( ARGSRef => \%ARGS, + Actions => \@Actions, + TicketObj => $TicketObj ); + delete $session{'Attachments'}; } #Process status updates my @BasicActions = ProcessTicketBasics(ARGSRef => \%ARGS, TicketObj=>$TicketObj); @@ -111,6 +114,11 @@ if ($ARGS{'id'} eq 'new') { push (@Actions, @BasicActions, @results); } + +my $attachments = $m->comp('Elements/FindAttachments', Ticket => $TicketObj); +my $attachment_content = $m->comp('Elements/LoadTextAttachments', Ticket => $TicketObj); + + diff --git a/rt/html/Ticket/Elements/FindAttachments b/rt/html/Ticket/Elements/FindAttachments new file mode 100755 index 000000000..b8a0dd8b6 --- /dev/null +++ b/rt/html/Ticket/Elements/FindAttachments @@ -0,0 +1,46 @@ +<%INIT> +my %documents; + +#A default implementation here loops through all transactions and pulls out all their attachments. +# We end up doing an end-run around that to get a bit more performance + +# 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 $tickets = $attachments->NewAlias('Tickets'); + + $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" ); + } +} +return ($attachments); + +<%ARGS> +$Ticket => undef + + diff --git a/rt/html/Ticket/Elements/LoadTextAttachments b/rt/html/Ticket/Elements/LoadTextAttachments new file mode 100755 index 000000000..084502e4c --- /dev/null +++ b/rt/html/Ticket/Elements/LoadTextAttachments @@ -0,0 +1,39 @@ +<%INIT> + +my $attachments = RT::Attachments->new( $session{'CurrentUser'} ); + +$attachments->Columns( qw(id Content ContentType TransactionId ContentEncoding)); + +if ( $Ticket->CurrentUserHasRight('ShowTicket') ) { + my $transactions = $attachments->NewAlias('Transactions'); + $attachments->Join( ALIAS1 => 'main', + FIELD1 => 'TransactionId', + ALIAS2 => $transactions, + FIELD2 => 'id' ); + + my $tickets = $attachments->NewAlias('Tickets'); + + $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" ); + } + + $attachments->Limit ( FIELD => 'ContentType', OPERATOR => '=', VALUE => 'text/plain'); + $attachments->Limit ( FIELD => 'ContentType', OPERATOR => 'STARTSWITH', VALUE => 'message/'); + $attachments->Limit ( FIELD => 'ContentType', OPERATOR => '=', VALUE => 'text'); + +} +return ($attachments); + +<%ARGS> +$Ticket => undef + + diff --git a/rt/html/Ticket/Elements/ShowAttachments b/rt/html/Ticket/Elements/ShowAttachments index 590a011fb..bdda1692c 100644 --- a/rt/html/Ticket/Elements/ShowAttachments +++ b/rt/html/Ticket/Elements/ShowAttachments @@ -47,7 +47,10 @@ if ($size) {
  • > - <%$rev->CreatedAsString%> (<% $size %>)
  • + +<&|/l, $rev->CreatedAsString, $size, $rev->CreatorObj->Name &>[_1] ([_2]) by [_3] + + % } % $fontsize='size="-2"'; % } @@ -60,20 +63,15 @@ if ($size) { <%INIT> my %documents; -my $transactions = $Ticket->Transactions(); -while (my $trans = $transactions->Next()) { - my $attachments = $trans->Attachments(); - $attachments->Columns( qw( Id Filename ContentType Headers Subject Parent ContentEncoding ContentType TransactionId) ); - $attachments->Limit(FIELD => 'Filename', OPERATOR => 'IS NOT', VALUE => 'NULL', QUOTEVALUE => 0, ENTRYAGGREGATOR => 'AND'); - $attachments->Limit(FIELD => 'Filename', OPERATOR => '!=', VALUE => '', ENTRYAGGREGATOR => 'AND'); - while (my $attach = $attachments->Next()) { - next unless ($attach->Filename()); - # most recent at the top - unshift (@{$documents{$attach->Filename}}, $attach); - } + +while ( my $attach = $Attachments->Next() ) { + next unless ($attach->Filename()); + unshift( @{ $documents{ $attach->Filename } }, $attach ); } + <%ARGS> $Ticket => undef +$Attachments => undef diff --git a/rt/html/Ticket/Elements/ShowDates b/rt/html/Ticket/Elements/ShowDates index b09b4bf7b..70c95efc0 100644 --- a/rt/html/Ticket/Elements/ShowDates +++ b/rt/html/Ticket/Elements/ShowDates @@ -36,7 +36,7 @@ - + diff --git a/rt/html/Ticket/Elements/ShowHistory b/rt/html/Ticket/Elements/ShowHistory index 194be9b37..c4fe41747 100644 --- a/rt/html/Ticket/Elements/ShowHistory +++ b/rt/html/Ticket/Elements/ShowHistory @@ -54,16 +54,50 @@ else { % }
    <&|/l&>Depends on
    <&|/l&>Depended on by
    <% $Ticket->StartedObj->AsString %>
    <&|/l&>Last Contact:<&|/l&>Last Contact: <% $Ticket->ToldObj->AsString %>
    -% while (my $Transaction = $Transactions->Next) { -% my $skip = 0; -% $m->comp('/Elements/Callback', _CallbackName => 'SkipTransaction', Transaction => $Transaction, skip => \$skip, %ARGS); -% next if $skip; -% $i++; -% if ($Transactions->IsLast) { - -% } - <& ShowTransaction, Ticket => $Ticket, Transaction => $Transaction, ShowHeaders => $ShowHeaders, Collapsed => $Collapsed, RowNum => $i, ShowTitleBarCommands => $ShowTitleBarCommands, %ARGS &> -% } +<%perl> +my @attachments = @{$Attachments->ItemsArrayRef()}; +my @attachment_content = @{$AttachmentContent->ItemsArrayRef()}; + + + + + +while ( my $Transaction = $Transactions->Next ) { + my $skip = 0; + $m->comp( '/Elements/Callback', + _CallbackName => 'SkipTransaction', + Transaction => $Transaction, + skip => \$skip, + %ARGS ); + next if $skip; + $i++; + + $m->out('') if ( $Transactions->IsLast ); + + my @trans_attachments = grep { $_->TransactionId == $Transaction->Id } @attachments; + + my $trans_content = {}; + grep { ($_->TransactionId == $Transaction->Id ) && ($trans_content->{$_->Id} = $_) } @attachment_content; + + + #Args is first because we're clobbering the "Attachments" parameter + $m->comp( 'ShowTransaction', + %ARGS, + + AttachPath => $AttachPath, + UpdatePath => $UpdatePath, + Ticket => $Ticket, + Transaction => $Transaction, + ShowHeaders => $ShowHeaders, + Collapsed => $Collapsed, + RowNum => $i, + ShowTitleBarCommands => $ShowTitleBarCommands, + Attachments => \@trans_attachments, + AttachmentContent => $trans_content + ); +} + +
    % if ($ShowDisplayModes or $ShowTitle) { <& /Elements/TitleBoxEnd &> @@ -74,13 +108,23 @@ my $Transactions = $Ticket->Transactions; my $i; +$Attachments ||= $m->comp('/Ticket/Elements/FindAttachments', Ticket => $Ticket); +$AttachmentContent ||= $m->comp('/Ticket/Elements/LoadTextAttachments', Ticket => $Ticket); + + + <%ARGS> -$URIFile => 'Display.html' +$URIFile => $RT::WebPath."/Ticket/Display.html" $Ticket => undef +$Attachments => undef +$AttachmentContent => undef $ShowHeaders => undef $Collapsed => undef $ShowTitle => 1 $ShowDisplayModes => 1 $ShowTitleBarCommands => 1 +$AttachPath => $RT::WebPath."/Ticket/Attachment" +$UpdatePath => $RT::WebPath."/Ticket/Update.html" + diff --git a/rt/html/Ticket/Elements/ShowRequestor b/rt/html/Ticket/Elements/ShowRequestor index cc91f590f..a6398efc7 100644 --- a/rt/html/Ticket/Elements/ShowRequestor +++ b/rt/html/Ticket/Elements/ShowRequestor @@ -23,9 +23,8 @@ %# END LICENSE BLOCK <%PERL> my $rows = 10; -my $people = $Ticket->Requestors->MembersObj; -while (my $member=$people->Next) { -my $requestor = $member->MemberObj->Object; +my $people = $Ticket->Requestors->UserMembersObj; +while (my $requestor=$people->Next) { my $name=$requestor->RealName || $requestor->EmailAddress; my $tickets = RT::Tickets->new($session{'CurrentUser'}); $tickets->LimitWatcher(TYPE => 'Requestor', VALUE => $requestor->EmailAddress ); diff --git a/rt/html/Ticket/Elements/ShowSummary b/rt/html/Ticket/Elements/ShowSummary index 6ae875832..5bcc94b41 100644 --- a/rt/html/Ticket/Elements/ShowSummary +++ b/rt/html/Ticket/Elements/ShowSummary @@ -65,7 +65,7 @@ <& /Ticket/Elements/ShowLinks, Ticket => $Ticket &> <& /Elements/TitleBoxEnd &>
    - <& /Ticket/Elements/ShowAttachments, Ticket => $Ticket &> + <& /Ticket/Elements/ShowAttachments, Ticket => $Ticket, Attachments => $Attachments &> <& /Ticket/Elements/ShowRequestor, Ticket => $Ticket &> @@ -75,6 +75,7 @@ <%ARGS> $Ticket => undef +$Attachments => undef diff --git a/rt/html/Ticket/Elements/ShowTransaction b/rt/html/Ticket/Elements/ShowTransaction index 2d710fcbc..8cde03870 100644 --- a/rt/html/Ticket/Elements/ShowTransaction +++ b/rt/html/Ticket/Elements/ShowTransaction @@ -36,8 +36,7 @@ <%PERL> unless ($Collapsed) { - $attachments->GotoFirstItem; - while (my $message=$attachments->Next) { + foreach my $message (@$Attachments) { my ($headers, $quoted); if ($ShowHeaders && ($ShowHeaders == $Ticket->Id)) { @@ -50,20 +49,31 @@ unless ($Collapsed) { # localize the common headers (like 'Subject:'), too. eval {$headers =~ s/^([^:]+)(?=:)/loc($1)/em; } # we eval here to catch errors when 5.6 panics } - # 13456 is a random # of about the biggest size we want to see inline text - # It's here to catch anyone who hasn't updated RT_Config.pm since this - # constant was moved out there. + + my $MAX_INLINE_BODY = $RT::MaxInlineBody || 13456; - if ($message->ContentType =~ m{^(text/plain|message|text$)}i && - $message->ContentLength < $MAX_INLINE_BODY ) { - eval { - require Text::Quoted; - $quoted = Text::Quoted::extract($message->Content); - }; + 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 = $message->Content; + $quoted = $content; } - } + } @@ -74,7 +84,7 @@ unless ($Collapsed) {
     <& ShowMessageHeaders, Headers => $headers, Transaction => $Transaction &>
     
    -% if (!length($quoted) && $message->ContentType =~ m#^text/#) { +% 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 { @@ -115,6 +125,9 @@ $Collapsed => undef $ShowTitleBarCommands => 1 $RowNum => 1 $AttachPath => $RT::WebPath."/Ticket/Attachment" +$UpdatePath => $RT::WebPath."/Ticket/Update.html" +$Attachments => undef +$AttachmentContent => undef <%INIT> @@ -126,12 +139,7 @@ my $transdate = $Transaction->CreatedAsString(); $transdate =~ s/\s/ /g; 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"; @@ -154,25 +162,30 @@ if ($Ticket->Id != $Transaction->Ticket) { $TicketString = "Ticket ".$Transaction->Ticket .": "; } -if ($Transaction->TimeTaken > 0) { +if ($Transaction->TimeTaken != 0) { $TimeTaken = $Transaction->TimeTaken." min" } -my $attachments = $Transaction->Attachments; -$attachments->Columns( qw( Id Filename ContentType Headers Subject Parent ContentEncoding ContentType TransactionId) ); + +unless ($Attachments) { + my $attachments = $Transaction->Attachments; + $attachments->Columns( qw( Id Filename ContentType Headers Subject Parent ContentEncoding ContentType TransactionId) ); + $Attachments = $attachments->ItemsArrayRef(); +} + my $titlebar_commands=' '; # If the transaction has anything attached to it at all -if ($Transaction->Attachments->First && $ShowTitleBarCommands) { - if ($Transaction->TicketObj->CurrentUserHasRight('ReplyToTicket')) { +if ($Attachments->[0] && $ShowTitleBarCommands) { + if ($Ticket->CurrentUserHasRight('ReplyToTicket')) { $titlebar_commands .= - "[Ticket . "&QuoteTransaction=".$Transaction->Id. "&Action=Respond\">". loc('Reply') ."] "; } - if ($Transaction->TicketObj->CurrentUserHasRight('CommentOnTicket')) { + if ($Ticket->CurrentUserHasRight('CommentOnTicket')) { $titlebar_commands .= - "[Ticket. + "[Ticket. "&QuoteTransaction=".$Transaction->Id. "&Action=Comment\">". loc('Comment') ."]"; } diff --git a/rt/html/Ticket/History.html b/rt/html/Ticket/History.html index cb02f1c75..95a21deec 100644 --- a/rt/html/Ticket/History.html +++ b/rt/html/Ticket/History.html @@ -28,7 +28,13 @@
    -<& /Ticket/Elements/ShowHistory , Ticket => $Ticket, ShowHeaders => $ARGS{'ShowHeaders'}, URIFile => 'History.html' &> +<& /Ticket/Elements/ShowHistory , + Ticket => $Ticket, + ShowHeaders => $ARGS{'ShowHeaders'}, + URIFile => 'History.html', + Attachments => $attachments, + AttachmentContent => $attachment_content + &> <%ARGS> @@ -45,6 +51,11 @@ unless ($Ticket->CurrentUserHasRight('ShowTicket')) { Abort("No permission to view ticket"); } +my $attachments = $m->comp('Elements/FindAttachments', Ticket => $Ticket); +my $attachment_content = $m->comp('Elements/LoadTextAttachments', Ticket => +$Ticket); + + diff --git a/rt/html/Ticket/ModifyAll.html b/rt/html/Ticket/ModifyAll.html index 1163f3fa5..1d0500d16 100644 --- a/rt/html/Ticket/ModifyAll.html +++ b/rt/html/Ticket/ModifyAll.html @@ -76,7 +76,7 @@ <&|/l&>Subject: - + <&|/l&>Attach: @@ -119,13 +119,29 @@ unless ($OnlySearchForPeople) { @dresults = ProcessTicketDates( TicketObj => $Ticket, ARGSRef => \%ARGS); @lresults = ProcessTicketLinks( TicketObj => $Ticket, ARGSRef => \%ARGS); - $ARGS{'UpdateContent'} =~ s/\r\n/\n/g; - - if ($ARGS{'UpdateContent'} && - $ARGS{'UpdateContent'} ne '' && + if ($ARGS{'UpdateAttachment'}) { + my $subject = "$ARGS{'UpdateAttachment'}"; + # since CGI.pm deutf8izes the magic field, we need to add it back. + Encode::_utf8_on($subject); + # strip leading directories + $subject =~ s#^.*[\\/]##; + + my $attachment = MakeMIMEEntity( + Subject => $subject, + Body => "", + AttachmentFieldName => 'UpdateAttachment' + ); + delete $ARGS{'UpdateAttachment'}; + $ARGS{'UpdateAttachments'}->{ $subject } = $attachment; + } + + $ARGS{'UpdateContent'} =~ s/\r+\n/\n/g; + + if ($ARGS{'UpdateAttachments'} || ( + $ARGS{'UpdateContent'} && $ARGS{'UpdateContent'} ne "-- \n" . $session{'CurrentUser'}->UserObj->Signature - ) { + )) { ProcessUpdateMessage(TicketObj => $Ticket, ARGSRef=>\%ARGS, Actions=>\@results); diff --git a/rt/html/Ticket/ModifyDates.html b/rt/html/Ticket/ModifyDates.html index 3ccae4431..5339e4283 100644 --- a/rt/html/Ticket/ModifyDates.html +++ b/rt/html/Ticket/ModifyDates.html @@ -35,7 +35,7 @@ <& Elements/EditDates, TicketObj => $TicketObj &> <& /Elements/TitleBoxEnd &> -<& /Elements/Submit, color => "#663366" &> +<& /Elements/Submit, Label => loc('Save Changes'), color => "#663366" &> diff --git a/rt/html/Ticket/ModifyLinks.html b/rt/html/Ticket/ModifyLinks.html index 1d050088b..d7e39f3d2 100644 --- a/rt/html/Ticket/ModifyLinks.html +++ b/rt/html/Ticket/ModifyLinks.html @@ -35,7 +35,7 @@ <& /Elements/TitleBoxStart, title => loc('Edit Relationships'), color => "#336633"&> <& Elements/EditLinks, Ticket => $Ticket &> <& /Elements/TitleBoxEnd &> -<& /Elements/Submit, color => "#336633", Caption=> loc('Save Changes') &> +<& /Elements/Submit, color => "#336633", Label => loc('Save Changes') &> diff --git a/rt/html/Ticket/Update.html b/rt/html/Ticket/Update.html index ad3b21787..1df8084e5 100644 --- a/rt/html/Ticket/Update.html +++ b/rt/html/Ticket/Update.html @@ -112,7 +112,7 @@ value=<% $ARGS{UpdateCc} %>>
    -<& /Elements/Submit, Name => 'SubmitTicket' &> +<& /Elements/Submit, Label => loc('Update Ticket'), Name => 'SubmitTicket' &> -- cgit v1.2.1 From 0d1d2630e726ab4ce32bab9c3e4a889eee43fcb4 Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 2 Dec 2004 09:59:48 +0000 Subject: second big RT integration checkin, customer linking/delinking interface --- rt/html/Ticket/Elements/AddCustomers | 65 ++++++++++++++++++++++++++++ rt/html/Ticket/Elements/EditCustomers | 79 +++++++++++++++++++++++++++++++++++ rt/html/Ticket/Elements/ShowCustomers | 40 ++++++++++++++++++ rt/html/Ticket/Elements/ShowSummary | 9 ++++ rt/html/Ticket/Elements/Tabs | 2 + rt/html/Ticket/ModifyCustomers.html | 49 ++++++++++++++++++++++ 6 files changed, 244 insertions(+) create mode 100644 rt/html/Ticket/Elements/AddCustomers create mode 100644 rt/html/Ticket/Elements/EditCustomers create mode 100644 rt/html/Ticket/Elements/ShowCustomers create mode 100644 rt/html/Ticket/ModifyCustomers.html (limited to 'rt/html/Ticket') diff --git a/rt/html/Ticket/Elements/AddCustomers b/rt/html/Ticket/Elements/AddCustomers new file mode 100644 index 000000000..b26b3a638 --- /dev/null +++ b/rt/html/Ticket/Elements/AddCustomers @@ -0,0 +1,65 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +
    +<%$msg%>
    + +% if (@Customers) { + +
    (Check box to link) + +% foreach my $customer (@Customers) { + + + +% } + +% } + +<%INIT> +my ($msg); + +my @Customers = (); +if ( $CustomerString ) { + @Customers = smart_search( 'search' => $CustomerString ); + warn scalar(@Customers); +} + +my @Services = (); +if ($ServiceString) { + @Services = (); #service_search(); +} + +eval { use FS::CGI qw( popurl small_custview ); }; +my $p = eval { popurl(3); }; + + + +<%ARGS> +$CustomerString => undef +$ServiceString => undef + diff --git a/rt/html/Ticket/Elements/EditCustomers b/rt/html/Ticket/Elements/EditCustomers new file mode 100644 index 000000000..49edb27b3 --- /dev/null +++ b/rt/html/Ticket/Elements/EditCustomers @@ -0,0 +1,79 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +
    + > +%# <% $customer->name %> + <% small_custview( $customer, scalar(FS::Conf->new->config('countrydefault')), 1 ) |n %> +
    + + + + + +
    +

    <&|/l&>Current Customers

    + + + + + + + + +
    <&|/l&>(Check box to disassociate)
    +% #while (my $link = $Ticket->MemberOf->Next) { +% foreach my $link ( +% grep { $_->TargetURI->Resolver->{'fstable'} eq 'cust_main' } +% grep { $_->TargetURI->Scheme eq 'freeside' } +% @{ $Ticket->_Links('Base')->ItemsArrayRef } +% ) { + + +%# <& ShowLink, URI => $link->TargetURI &>
    + <% $link->TargetURI->Resolver->AsStringLong |n %> +
    +% } +
    + +
    +

    <&|/l&>New Customer Links

    +<&|/l&>Find customer
    + + +
    cust #, last name, or company +
    +%#
    +%#<&|/l&>Find service
    +%# +%# +%#
    username, username@domain, domain, or IP address +%#
    + +<& AddCustomers, Ticket => $Ticket, + CustomerString => $CustomerString, + ServiceString => $ServiceString, &> + +
    + +<%ARGS> +$CustomerString => undef +$ServiceString => undef +$Ticket => undef + diff --git a/rt/html/Ticket/Elements/ShowCustomers b/rt/html/Ticket/Elements/ShowCustomers new file mode 100644 index 000000000..5519d24cf --- /dev/null +++ b/rt/html/Ticket/Elements/ShowCustomers @@ -0,0 +1,40 @@ +%# Copyright (c) 2004 Ivan Kohler +%# +%# 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. + +% my $cust = 0; +% foreach my $customerURI ( +% grep { $_->Resolver->{'fstable'} eq 'cust_main' } +% grep { $_->Scheme eq 'freeside' } +% map { $_->TargetURI } +% @{ $Ticket->_Links('Base')->ItemsArrayRef } +% ) { +% $cust++; +% my $cust_main = ''; + + + +% } +% unless ( $cust ) { + + + + +% } +
    + <% $customerURI->Resolver->AsStringLong |n %> +
    + (none) +
    +<%ARGS> +$Ticket => undef + + diff --git a/rt/html/Ticket/Elements/ShowSummary b/rt/html/Ticket/Elements/ShowSummary index 5bcc94b41..1b9f62908 100644 --- a/rt/html/Ticket/Elements/ShowSummary +++ b/rt/html/Ticket/Elements/ShowSummary @@ -47,6 +47,15 @@ color => "#333399" &> <& /Ticket/Elements/ShowPeople, Ticket => $Ticket &> <& /Elements/TitleBoxEnd &> +
    + + <& /Elements/TitleBoxStart, title => loc('Customers'), + title_href =>"$RT::WebPath/Ticket/ModifyCustomers.html?id=".$Ticket->Id, + title_class=> 'inverse', + color => "#7f007b" &> + <& /Ticket/Elements/ShowCustomers, Ticket => $Ticket &> + <& /Elements/TitleBoxEnd &> +
    diff --git a/rt/html/Ticket/Elements/Tabs b/rt/html/Ticket/Elements/Tabs index cba45df91..26b252707 100644 --- a/rt/html/Ticket/Elements/Tabs +++ b/rt/html/Ticket/Elements/Tabs @@ -101,6 +101,8 @@ my $ticket_page_tabs = { { title => loc('People'), path => "Ticket/ModifyPeople.html?id=" . $id, }, _E => { title => loc('Links'), path => "Ticket/ModifyLinks.html?id=" . $id, }, + _Eb=> { title => loc('Customers'), + path => "Ticket/ModifyCustomers.html?id=" . $id, }, _F => { title => loc('Jumbo'), path => "Ticket/ModifyAll.html?id=" . $id, seperator => 1 diff --git a/rt/html/Ticket/ModifyCustomers.html b/rt/html/Ticket/ModifyCustomers.html new file mode 100644 index 000000000..72d103b23 --- /dev/null +++ b/rt/html/Ticket/ModifyCustomers.html @@ -0,0 +1,49 @@ +%# Copyright (c) 2004 Ivan Kohler +%# +%# 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. +<& /Elements/Header, Title => loc("Customers for ticket #[_1]", $Ticket->Id) &> +<& /Ticket/Elements/Tabs, + Ticket => $Ticket, + current_tab => "Ticket/ModifyCustomers.html?id=".$Ticket->Id, + Title => loc("Customers for ticket #[_1]", $Ticket->Id) &> + +<& /Elements/ListActions, actions => \@results &> + +
    + + +<& /Elements/TitleBoxStart, title => loc('Edit Customer Links'), color => "#7f007b"&> +<& Elements/EditCustomers, Ticket => $Ticket, CustomerString => $CustomerString, ServiceString => $ServiceString &> +<& /Elements/TitleBoxEnd &> +<& /Elements/Submit, color => "#7f007b", Label => loc('Save Changes') &> +
    + + +<%INIT> + +my @results = (); +my $Ticket = LoadTicket($id); + +# if we're trying to search for customers/services and nothing else +unless ( $OnlySearchForCustomers || $OnlySearchForServices) { + @results = ProcessTicketCustomers( TicketObj => $Ticket, ARGSRef => \%ARGS); +} + + + + +<%ARGS> +$OnlySearchForCustomers => undef +$OnlySearchForServices => undef +$CustomerString => undef +$ServiceString => undef +$id => undef + -- cgit v1.2.1 From 2e01e767e3ec53eca7193e4498a449d9d92b4f89 Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 2 Dec 2004 10:18:35 +0000 Subject: fix license boilerplate and search sorting --- rt/html/Ticket/Elements/AddCustomers | 14 +------------- rt/html/Ticket/Elements/EditCustomers | 14 +------------- 2 files changed, 2 insertions(+), 26 deletions(-) (limited to 'rt/html/Ticket') diff --git a/rt/html/Ticket/Elements/AddCustomers b/rt/html/Ticket/Elements/AddCustomers index b26b3a638..66480e2f1 100644 --- a/rt/html/Ticket/Elements/AddCustomers +++ b/rt/html/Ticket/Elements/AddCustomers @@ -1,8 +1,4 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent -%# -%# (Except where explictly superceded by other copyright notices) +%# Copyright (c) 2004 Ivan Kohler %# %# 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 @@ -13,14 +9,6 @@ %# WITHOUT ANY WARRANTY; without even the implied warranty of %# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU %# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK
    <%$msg%>
    diff --git a/rt/html/Ticket/Elements/EditCustomers b/rt/html/Ticket/Elements/EditCustomers index 49edb27b3..10b9c5baf 100644 --- a/rt/html/Ticket/Elements/EditCustomers +++ b/rt/html/Ticket/Elements/EditCustomers @@ -1,8 +1,4 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent -%# -%# (Except where explictly superceded by other copyright notices) +%# Copyright (c) 2004 Ivan Kohler %# %# 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 @@ -13,14 +9,6 @@ %# WITHOUT ANY WARRANTY; without even the implied warranty of %# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU %# General Public License for more details. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK @@ -171,7 +193,7 @@ $ARGS{Due}%>">
    -- cgit v1.2.1 From d39d52aac8f38ea9115628039f0df5aa3ac826de Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 3 Dec 2004 20:40:48 +0000 Subject: import rt 3.2.2 --- rt/html/Ticket/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 &>
    -<& /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