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/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 +++++++++++++++++++++++++++++ 27 files changed, 1920 insertions(+) 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 (limited to 'rt/html/Ticket/Elements') 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 + -- 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/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 ++++++++-- 11 files changed, 68 insertions(+), 40 deletions(-) (limited to 'rt/html/Ticket/Elements') 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", -- cgit v1.2.1