From d4d0590bef31071e8809ec046717444b95b3f30a Mon Sep 17 00:00:00 2001 From: ivan Date: Sat, 15 Oct 2005 09:11:20 +0000 Subject: import rt 3.4.4 --- rt/html/Ticket/Elements/AddWatchers | 6 +- rt/html/Ticket/Elements/BulkLinks | 6 +- rt/html/Ticket/Elements/EditBasics | 8 +-- rt/html/Ticket/Elements/EditCustomField | 67 +++++----------------- rt/html/Ticket/Elements/EditCustomFields | 20 ++++--- rt/html/Ticket/Elements/EditDates | 6 +- rt/html/Ticket/Elements/EditPeople | 8 +-- rt/html/Ticket/Elements/EditWatchers | 8 +-- rt/html/Ticket/Elements/FindAttachments | 19 +++--- rt/html/Ticket/Elements/LoadTextAttachments | 14 +++-- rt/html/Ticket/Elements/PreviewScrips | 8 +-- rt/html/Ticket/Elements/ShowAttachments | 12 ++-- rt/html/Ticket/Elements/ShowBasics | 6 +- rt/html/Ticket/Elements/ShowCustomFields | 27 ++------- rt/html/Ticket/Elements/ShowDates | 6 +- rt/html/Ticket/Elements/ShowDependencies | 6 +- rt/html/Ticket/Elements/ShowGroupMembers | 6 +- rt/html/Ticket/Elements/ShowHistory | 19 +++--- rt/html/Ticket/Elements/ShowMemberOf | 8 +-- rt/html/Ticket/Elements/ShowMembers | 6 +- rt/html/Ticket/Elements/ShowMessageHeaders | 6 +- rt/html/Ticket/Elements/ShowMessageStanza | 8 +-- rt/html/Ticket/Elements/ShowPeople | 8 +-- rt/html/Ticket/Elements/ShowReferences | 10 ++-- rt/html/Ticket/Elements/ShowRequestor | 11 +++- rt/html/Ticket/Elements/ShowSummary | 8 +-- rt/html/Ticket/Elements/ShowTransaction | 13 +++-- rt/html/Ticket/Elements/ShowTransactionAttachments | 49 +++++++++------- rt/html/Ticket/Elements/ShowUserEntry | 6 +- rt/html/Ticket/Elements/Tabs | 13 +++-- 30 files changed, 186 insertions(+), 212 deletions(-) (limited to 'rt/html/Ticket/Elements') diff --git a/rt/html/Ticket/Elements/AddWatchers b/rt/html/Ticket/Elements/AddWatchers index f70e86a17..98314b9d2 100644 --- a/rt/html/Ticket/Elements/AddWatchers +++ b/rt/html/Ticket/Elements/AddWatchers @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,7 +42,7 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK +%# END BPS TAGGED BLOCK }}}
<%$msg%>
diff --git a/rt/html/Ticket/Elements/BulkLinks b/rt/html/Ticket/Elements/BulkLinks index c071bd1cc..6a3859aa3 100644 --- a/rt/html/Ticket/Elements/BulkLinks +++ b/rt/html/Ticket/Elements/BulkLinks @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,7 +42,7 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK +%# END BPS TAGGED BLOCK }}} diff --git a/rt/html/Ticket/Elements/EditBasics b/rt/html/Ticket/Elements/EditBasics index 7ad4a63b0..715685153 100644 --- a/rt/html/Ticket/Elements/EditBasics +++ b/rt/html/Ticket/Elements/EditBasics @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,7 +42,7 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK +%# END BPS TAGGED BLOCK }}}
<&|/l&>Merge into:
@@ -84,7 +84,7 @@ <%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', DefaultLabel => loc("[_1] (Unchanged)",$TicketObj->Status)); +my $SelectStatus = $m->scomp("/Elements/SelectStatus", Name => 'Status', DefaultLabel => loc("[_1] (Unchanged)",loc($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 74e57ddf3..63687acd7 100644 --- a/rt/html/Ticket/Elements/EditCustomField +++ b/rt/html/Ticket/Elements/EditCustomField @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,55 +42,14 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED 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 ($Default) { - value="<%$Default ? $Default : ''%>" -% } - - -% } elsif ($CustomField->Type =~ /^Select/) { - - -% } -<%ARGS> -$TicketObj => undef -$CustomField => undef -$NamePrefix => undef -$Rows => 5 -$Cols=> 15 -$Default => undef - +%# END BPS TAGGED BLOCK }}} +<%init> + +# RT 3.2 API compatibility glue + +$RT::Logger->debug("Ticket/Elements/EditCustomField is deprecated in RT 3.4 and will be removed in 3.6."); + +$ARGS{'NamePrefix'} =~ s/^Ticket-/Object-RT::Ticket-/; +$ARGS{'NamePrefix'} =~ s/^CustomField-/Object-RT::Ticket--CustomField-/; +$m->comp('/Elements/EditCustomField', %ARGS, Object=> $ARGS{'TicketObj'}); + diff --git a/rt/html/Ticket/Elements/EditCustomFields b/rt/html/Ticket/Elements/EditCustomFields index b049751ff..d566f4e71 100644 --- a/rt/html/Ticket/Elements/EditCustomFields +++ b/rt/html/Ticket/Elements/EditCustomFields @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,7 +42,7 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK +%# END BPS TAGGED BLOCK }}}
<&|/l&>Subject:
- + % }
@@ -66,7 +66,11 @@ <%$CustomField->Name%>
<%$CustomField->FriendlyType%>
<& EditCustomField, TicketObj => $TicketObj, CustomField => $CustomField, NamePrefix => $NamePrefix &><& /Elements/EditCustomField, + Object => $TicketObj, + CustomField => $CustomField, + NamePrefix => $NamePrefix + &>
@@ -79,12 +83,12 @@ my $CustomFields; my $NamePrefix; if ($TicketObj) { - $CustomFields = $TicketObj->QueueObj->CustomFields(); - $NamePrefix = "Ticket-".$TicketObj->Id."-CustomField-"; + $CustomFields = $TicketObj->CustomFields(); + $NamePrefix = "Object-RT::Ticket-".$TicketObj->Id."-CustomField-"; } else { - $CustomFields = $QueueObj->CustomFields(); - $NamePrefix = "CustomField-"; + $CustomFields = $QueueObj->TicketCustomFields(); + $NamePrefix = "Object-RT::Ticket--CustomField-"; } diff --git a/rt/html/Ticket/Elements/EditDates b/rt/html/Ticket/Elements/EditDates index 8e12f2534..a19774192 100644 --- a/rt/html/Ticket/Elements/EditDates +++ b/rt/html/Ticket/Elements/EditDates @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,7 +42,7 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK +%# END BPS TAGGED BLOCK }}} diff --git a/rt/html/Ticket/Elements/EditPeople b/rt/html/Ticket/Elements/EditPeople index 4b2a1ac81..055d7ba20 100644 --- a/rt/html/Ticket/Elements/EditPeople +++ b/rt/html/Ticket/Elements/EditPeople @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,7 +42,7 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK +%# END BPS TAGGED BLOCK }}}
<&|/l&>Starts:
@@ -52,7 +52,7 @@ <& /Elements/SelectUsers &>
-<&|/l&>Find group whose
+<&|/l&>Find groups whose
<& /Elements/SelectGroups &> diff --git a/rt/html/Ticket/Elements/EditWatchers b/rt/html/Ticket/Elements/EditWatchers index 19c884bd8..0089932f4 100644 --- a/rt/html/Ticket/Elements/EditWatchers +++ b/rt/html/Ticket/Elements/EditWatchers @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,7 +42,7 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK +%# END BPS TAGGED BLOCK }}}
    %# Print out a placeholder if there are none. %if ($Members->Count == 0 ) { @@ -52,7 +52,7 @@ %while (my $watcher=$Members->Next) {
  • - + %if ($watcher->MemberObj->IsUser) { <%$watcher->MemberObj->Object->Name%> diff --git a/rt/html/Ticket/Elements/FindAttachments b/rt/html/Ticket/Elements/FindAttachments index a1e973f0e..017c77288 100755 --- a/rt/html/Ticket/Elements/FindAttachments +++ b/rt/html/Ticket/Elements/FindAttachments @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,7 +42,7 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK +%# END BPS TAGGED BLOCK }}} <%INIT> my %documents; @@ -63,11 +63,14 @@ $attachments->Join( ALIAS1 => 'main', my $tickets = $attachments->NewAlias('Tickets'); -$attachments->Join( ALIAS1 => $transactions, - FIELD1 => 'Ticket', - ALIAS2 => $tickets, - FIELD2 => 'id' ); - + $attachments->Join( ALIAS1 => $transactions, + FIELD1 => 'ObjectId', + ALIAS2 => $tickets, + FIELD2 => 'id' ); + + $attachments->Limit( ALIAS => $transactions, + FIELD => 'ObjectType', + VALUE => 'RT::Ticket'); if ($Tickets) { while ($Ticket = $Tickets->Next) { $attachments->Limit( ALIAS => $tickets, diff --git a/rt/html/Ticket/Elements/LoadTextAttachments b/rt/html/Ticket/Elements/LoadTextAttachments index 370371b5a..943568fb3 100755 --- a/rt/html/Ticket/Elements/LoadTextAttachments +++ b/rt/html/Ticket/Elements/LoadTextAttachments @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,7 +42,7 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK +%# END BPS TAGGED BLOCK }}} <%INIT> my $attachments = RT::Attachments->new( $session{'CurrentUser'} ); @@ -58,11 +58,17 @@ if ( $Ticket->CurrentUserHasRight('ShowTicket') ) { my $tickets = $attachments->NewAlias('Tickets'); + $attachments->Join( ALIAS1 => $transactions, - FIELD1 => 'Ticket', + FIELD1 => 'ObjectId', ALIAS2 => $tickets, FIELD2 => 'id' ); + $attachments->Limit( ALIAS => $transactions, + FIELD => 'ObjectType', + VALUE => 'RT::Ticket'); + + $attachments->Limit( ALIAS => $tickets, FIELD => 'EffectiveId', VALUE => $Ticket->id() ); diff --git a/rt/html/Ticket/Elements/PreviewScrips b/rt/html/Ticket/Elements/PreviewScrips index 846c62c24..a3492b749 100755 --- a/rt/html/Ticket/Elements/PreviewScrips +++ b/rt/html/Ticket/Elements/PreviewScrips @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,7 +42,7 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK +%# END BPS TAGGED BLOCK }}} <%args> $TicketObj => undef @@ -95,7 +95,7 @@ my @non_recipients = $TicketObj->SquelchMailTo; % foreach my $scrip (@{$Object->Scrips->Prepared}) { % next unless $scrip->ActionObj->Action->isa('RT::Action::SendEmail'); <%$scrip->Description%>
    -<&|/l, $scrip->ConditionObj->Name, $scrip->ActionObj->Name, $scrip->TemplateObj->Name&>[_1] [_2] with template [_3] +<&|/l, loc($scrip->ConditionObj->Name), loc($scrip->ActionObj->Name), loc($scrip->TemplateObj->Name)&>[_1] [_2] with template [_3]
    %foreach my $type qw(To Cc Bcc) { %my @addresses = $scrip->ActionObj->Action->$type(); diff --git a/rt/html/Ticket/Elements/ShowAttachments b/rt/html/Ticket/Elements/ShowAttachments index 8a2a5cb3f..82028dd28 100644 --- a/rt/html/Ticket/Elements/ShowAttachments +++ b/rt/html/Ticket/Elements/ShowAttachments @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,7 +42,7 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK +%# END BPS TAGGED BLOCK }}} % if (keys %documents) { <& /Elements/TitleBoxStart, title => loc('Attachments'), title_class=> 'inverse', @@ -82,8 +82,12 @@ if ($size) { % } <%INIT> -my %documents; +# If we haven't been passed in an Attachments object (through the precaching mechanism) +# then we need to find one +$Attachments ||= $m->comp('FindAttachments', Ticket => $Ticket); + +my %documents; while ( my $attach = $Attachments->Next() ) { next unless ($attach->Filename()); unshift( @{ $documents{ $attach->Filename } }, $attach ); diff --git a/rt/html/Ticket/Elements/ShowBasics b/rt/html/Ticket/Elements/ShowBasics index 55e923fa2..00ed3ccd1 100644 --- a/rt/html/Ticket/Elements/ShowBasics +++ b/rt/html/Ticket/Elements/ShowBasics @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,7 +42,7 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK +%# END BPS TAGGED BLOCK }}} diff --git a/rt/html/Ticket/Elements/ShowCustomFields b/rt/html/Ticket/Elements/ShowCustomFields index 895439e1b..eb49212c5 100644 --- a/rt/html/Ticket/Elements/ShowCustomFields +++ b/rt/html/Ticket/Elements/ShowCustomFields @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,27 +42,8 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK -
    <&|/l&>Id:
    -% 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(); - +%# END BPS TAGGED BLOCK }}} +<& /Elements/ShowCustomFields, Object => $Ticket &> <%ARGS> $Ticket => undef diff --git a/rt/html/Ticket/Elements/ShowDates b/rt/html/Ticket/Elements/ShowDates index a22a02d5c..2ccbb3fea 100644 --- a/rt/html/Ticket/Elements/ShowDates +++ b/rt/html/Ticket/Elements/ShowDates @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,7 +42,7 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK +%# END BPS TAGGED BLOCK }}} diff --git a/rt/html/Ticket/Elements/ShowDependencies b/rt/html/Ticket/Elements/ShowDependencies index d3bdd59bc..f276bc949 100644 --- a/rt/html/Ticket/Elements/ShowDependencies +++ b/rt/html/Ticket/Elements/ShowDependencies @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,7 +42,7 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK +%# END BPS TAGGED BLOCK }}} <&|/l&>Depends on:
    % while (my $Link = $Ticket->DependsOn->Next) { % my $member = $Link->TargetObj; diff --git a/rt/html/Ticket/Elements/ShowGroupMembers b/rt/html/Ticket/Elements/ShowGroupMembers index 1d6e71182..1fdb79aab 100644 --- a/rt/html/Ticket/Elements/ShowGroupMembers +++ b/rt/html/Ticket/Elements/ShowGroupMembers @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,7 +42,7 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK +%# END BPS TAGGED BLOCK }}} %# Released under the terms of version 2 of the GNU Public License % my $UserMembers = $Group->UserMembersObj; diff --git a/rt/html/Ticket/Elements/ShowHistory b/rt/html/Ticket/Elements/ShowHistory index 37b670d82..75e34776f 100644 --- a/rt/html/Ticket/Elements/ShowHistory +++ b/rt/html/Ticket/Elements/ShowHistory @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,7 +42,7 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK +%# END BPS TAGGED BLOCK }}} <%perl> if ($ShowDisplayModes or $ShowTitle) { my $title; @@ -104,8 +104,8 @@ while ( my $Transaction = $Transactions->Next ) { $m->comp( 'ShowTransaction', %ARGS, - AttachPath => $AttachPath, - UpdatePath => $UpdatePath, + AttachPath => $AttachPath, + UpdatePath => $UpdatePath, Ticket => $Ticket, Transaction => $Transaction, ShowHeaders => $ShowHeaders, @@ -116,6 +116,10 @@ while ( my $Transaction = $Transactions->Next ) { AttachmentContent => $trans_content, LastTransaction => $Transactions->IsLast ); + +# manually flush the content buffer after each txn, so the user sees +# some update +$m->flush_buffer(); } @@ -127,9 +131,7 @@ while ( my $Transaction = $Transactions->Next ) { my $Transactions = new RT::Transactions($session{'CurrentUser'}); if ($Tickets) { while (my $t = $Tickets->Next) { - $Transactions->Limit(FIELD => 'Ticket', - OPERATOR => '=', - VALUE => $t->Id); + $Transactions->LimitToTicket($t->id); } } else { $Transactions = $Ticket->Transactions; @@ -153,5 +155,4 @@ $ShowDisplayModes => 1 $ShowTitleBarCommands => 1 $AttachPath => $RT::WebPath."/Ticket/Attachment" $UpdatePath => $RT::WebPath."/Ticket/Update.html" - diff --git a/rt/html/Ticket/Elements/ShowMemberOf b/rt/html/Ticket/Elements/ShowMemberOf index eb285d34b..e443132bc 100644 --- a/rt/html/Ticket/Elements/ShowMemberOf +++ b/rt/html/Ticket/Elements/ShowMemberOf @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,11 +42,11 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK +%# END BPS TAGGED BLOCK }}}
      % my $memberof = $Ticket->MemberOf; % while (my $member_of = $memberof->Next) { -
    • <%$member_of->Id%>: <%$member_of->Subject%> [<%$member_of->Status%>] +
    • <%$member_of->Id%>: <%$member_of->Subject%> [<%$member_of->Status%>] % }
    diff --git a/rt/html/Ticket/Elements/ShowMembers b/rt/html/Ticket/Elements/ShowMembers index 9802e8982..f4fec1c7c 100644 --- a/rt/html/Ticket/Elements/ShowMembers +++ b/rt/html/Ticket/Elements/ShowMembers @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,7 +42,7 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK +%# END BPS TAGGED BLOCK }}} % if ($members->Count) {
      % while (my $link = $members->Next) { diff --git a/rt/html/Ticket/Elements/ShowMessageHeaders b/rt/html/Ticket/Elements/ShowMessageHeaders index 408b2c898..8dc76bae3 100644 --- a/rt/html/Ticket/Elements/ShowMessageHeaders +++ b/rt/html/Ticket/Elements/ShowMessageHeaders @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,7 +42,7 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK +%# END BPS TAGGED BLOCK }}} % use Data::Dumper;
    <&|/l&>Created:
    % foreach my $header (@headers) { diff --git a/rt/html/Ticket/Elements/ShowMessageStanza b/rt/html/Ticket/Elements/ShowMessageStanza index 8b912612b..eaf551de9 100644 --- a/rt/html/Ticket/Elements/ShowMessageStanza +++ b/rt/html/Ticket/Elements/ShowMessageStanza @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,7 +42,7 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK +%# END BPS TAGGED BLOCK }}} % if (ref($Message)) { <%perl> @@ -57,7 +57,7 @@ foreach my $stanza (@$Message) { my $content = $stanza->{raw}; RT::Interface::Web::EscapeUTF8(\$content); $m->comp('/Elements/Callback', content => \$content, %ARGS); - $content =~ s/\n/
    /gi; + $content =~ s/\n/
    /gi if defined $content; <%$content |n%>
    diff --git a/rt/html/Ticket/Elements/ShowPeople b/rt/html/Ticket/Elements/ShowPeople index 597a991d5..dbec93928 100644 --- a/rt/html/Ticket/Elements/ShowPeople +++ b/rt/html/Ticket/Elements/ShowPeople @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,11 +42,11 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK +%# END BPS TAGGED BLOCK }}}
    - + diff --git a/rt/html/Ticket/Elements/ShowReferences b/rt/html/Ticket/Elements/ShowReferences index e3639d01d..bb323f66c 100644 --- a/rt/html/Ticket/Elements/ShowReferences +++ b/rt/html/Ticket/Elements/ShowReferences @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,14 +42,14 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK +%# END BPS TAGGED BLOCK }}}
      % while (my $Link = $Ticket->RefersTo->Next) {
    • % if ($Link->TargetURI->IsLocal) { % my $member = $Link->TargetObj; -<%$member->Id%>: (<%$member->OwnerObj->Name%>) <%$member->Subject%> [<%$member->Status%>]
      +<%$member->Id%>: (<%$member->OwnerObj->Name%>) <%$member->Subject%> [<%$member->Status%>]
      % } else { <%$Link->Target%> % } @@ -61,7 +61,7 @@
    • % if ($Link->BaseURI->IsLocal) { % my $member = $Link->BaseObj; -<%$member->Id%>: (<%$member->OwnerObj->Name%>) <%$member->Subject%> [<%$member->Status%>]
      +<%$member->Id%>: (<%$member->OwnerObj->Name%>) <%$member->Subject%> [<%$member->Status%>]
      % } else { <%$Link->Base%> %} diff --git a/rt/html/Ticket/Elements/ShowRequestor b/rt/html/Ticket/Elements/ShowRequestor index cb9d7a6cc..421d38e0a 100644 --- a/rt/html/Ticket/Elements/ShowRequestor +++ b/rt/html/Ticket/Elements/ShowRequestor @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,7 +42,7 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK +%# END BPS TAGGED BLOCK }}} <%PERL> my $rows = 10; my $people = $Ticket->Requestors->UserMembersObj; @@ -73,6 +73,11 @@ $tickets->OrderBy(FIELD => 'Priority',
    • <%$w->Id%>: <%$w->Subject%> (<%$w->Status%>) %}
    + +<&|/l&>Groups this user belongs to:
    + +<& /Elements/ShowMemberships, UserObj => $requestor &> + <& /Elements/TitleBoxEnd &> % } diff --git a/rt/html/Ticket/Elements/ShowSummary b/rt/html/Ticket/Elements/ShowSummary index 5540417c7..31571400e 100644 --- a/rt/html/Ticket/Elements/ShowSummary +++ b/rt/html/Ticket/Elements/ShowSummary @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,7 +42,7 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK +%# END BPS TAGGED BLOCK }}}
    <&|/l&>Owner:<%$Ticket->OwnerObj->Name%><& ShowUserEntry, User => $Ticket->OwnerObj &>
    <&|/l&>Requestors:
    - + % my $desc = $Transaction->BriefDescription; @@ -56,6 +56,9 @@ @@ -67,6 +70,7 @@ $ShowHeaders => 0 $Collapsed => undef $ShowTitleBarCommands => 1 $RowNum => 1 +$DisplayPath => $RT::WebPath."/Ticket/Display.html?id=".$Ticket->id $AttachPath => $RT::WebPath."/Ticket/Attachment" $UpdatePath => $RT::WebPath."/Ticket/Update.html" $EmailRecordPath => $RT::WebPath."/Ticket/ShowEmailRecord.html" @@ -114,6 +118,7 @@ else { if ( $Ticket->Id != $Transaction->Ticket ) { $TicketString = "Ticket " . $Transaction->Ticket . ": "; } +$TicketString ||= ''; if ( $Transaction->TimeTaken != 0 ) { $TimeTaken = $Transaction->TimeTaken . " min"; diff --git a/rt/html/Ticket/Elements/ShowTransactionAttachments b/rt/html/Ticket/Elements/ShowTransactionAttachments index b01586deb..8dabff421 100644 --- a/rt/html/Ticket/Elements/ShowTransactionAttachments +++ b/rt/html/Ticket/Elements/ShowTransactionAttachments @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,7 +42,7 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK +%# END BPS TAGGED BLOCK }}} <%perl> # Find all the attachments which have parent $Parent # For each of these attachments @@ -79,21 +79,24 @@ foreach my $message ( grep { $_->Parent == $Parent } @$Attachments ) { } -<&|/l&>Download<%$message->Filename || loc('(untitled)') %> +<&|/l&>Download <%$message->Filename || loc('(untitled)') %>
    <%$message->ContentType%> <% $size %>
    -%} - +% } % # }}}
    <%perl> -# {{{ if it's got content-disposition inline, show it inline +# {{{ if it has a content-disposition: attachment, don't show inline +unless ( $message->GetHeader('Content-Disposition') =~ /attachment/i ) { + my $content; # If it's text - if ( $message->ContentType =~ m{^(text|message)}i ) { + if ( $message->ContentType =~ m{^(text|message)}i + && $size <= $RT::MaxInlineBody ) + { if ( @@ -127,7 +130,7 @@ foreach my $message ( grep { $_->Parent == $Parent } @$Attachments ) { if ( $message->ContentType =~ m{^text/(?:html|enriched)$}i ) { $content = $m->comp( '/Elements/ScrubHTML', Content => $content ); - $m->out( $content ); + $m->out($content); } # if it's a text/plain show the body @@ -146,22 +149,24 @@ foreach my $message ( grep { $_->Parent == $Parent } @$Attachments ) { } } - # if it's an image, show it as an image - elsif ( $message->ContentType =~ /^image\//i ) { - $m->out('' ); - } - - # }}} + # if it's an image, show it as an image + elsif ( $message->ContentType =~ /^image\//i ) { + $m->out('' ); + } +} - $m->comp( 'ShowTransactionAttachments', %ARGS, - Parent => $message->id, - ParentObj => $message ); +# }}} +$m->comp( + 'ShowTransactionAttachments', %ARGS, + Parent => $message->id, + ParentObj => $message +); } diff --git a/rt/html/Ticket/Elements/ShowUserEntry b/rt/html/Ticket/Elements/ShowUserEntry index 38473fff9..163bcbdb1 100644 --- a/rt/html/Ticket/Elements/ShowUserEntry +++ b/rt/html/Ticket/Elements/ShowUserEntry @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,7 +42,7 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK +%# END BPS TAGGED BLOCK }}} %# Released under the terms of version 2 of the GNU Public License <%$User->Name%> diff --git a/rt/html/Ticket/Elements/Tabs b/rt/html/Ticket/Elements/Tabs index 4f17d1024..1a5058691 100644 --- a/rt/html/Ticket/Elements/Tabs +++ b/rt/html/Ticket/Elements/Tabs @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,7 +42,7 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK +%# END BPS TAGGED BLOCK }}} <& /Elements/Callback, Ticket => $Ticket, actions=> $actions, tabs => $tabs, %ARGS &> <& /Elements/Tabs, tabs => $tabs, @@ -121,7 +121,7 @@ my $ticket_page_tabs = { path => "Ticket/ModifyLinks.html?id=" . $id, }, _F => { title => loc('Jumbo'), path => "Ticket/ModifyAll.html?id=" . $id, - seperator => 1 + separator => 1 }, }; @@ -187,6 +187,7 @@ my $args = "?" . $m->comp( Order => $ARGS{'Order'} || $session{'CurrentSearchHash'}->{'Order'}, Rows => $ARGS{'Rows'}, ) if ($ARGS{'Query'} or $session{'CurrentSearchHash'}->{'Query'}); +$args ||= ''; $tabs->{"f"} = { path => "Search/Build.html?NewQuery=1", title => loc('New Query')}; @@ -211,7 +212,7 @@ if (defined $session{'tickets'} and $session{'tickets'}->Count) { <%ARGS> $Ticket => undef $subtabs => undef -$current_tab => undef -$current_subtab => undef +$current_tab => '' +$current_subtab => '' $Title => undef -- cgit v1.2.1
    @@ -53,7 +53,7 @@ <& /Ticket/Elements/ShowBasics, Ticket => $Ticket &> <& /Elements/TitleBoxEnd &>
    -% if ($Ticket->QueueObj->CustomFields()->First) { +% if ($Ticket->QueueObj->TicketCustomFields->First) { <& /Elements/TitleBoxStart, title => loc('Custom Fields'), title_href =>"$RT::WebPath/Ticket/Modify.html?id=".$Ticket->Id, title_class=> 'inverse', diff --git a/rt/html/Ticket/Elements/ShowTransaction b/rt/html/Ticket/Elements/ShowTransaction index f0b8326cf..8bf589d45 100644 --- a/rt/html/Ticket/Elements/ShowTransaction +++ b/rt/html/Ticket/Elements/ShowTransaction @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,9 +42,9 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK +%# END BPS TAGGED BLOCK }}}
    #<% $LastTransaction ? ' ' : ' ' |n %>#<% $LastTransaction ? ' ' : ' ' |n %>    <% $transdate|n %> <%$titlebar_commands|n%>
    +% if ($Transaction->CustomFieldValues->Count) { +<& /Elements/ShowCustomFields, Object => $Transaction &> +% } % $m->comp('ShowTransactionAttachments', %ARGS, Parent => 0) unless ($Collapsed ||!$ShowBody);