3 %# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
5 %# (Except where explictly superceded by other copyright notices)
7 %# This work is made available to you under the terms of Version 2 of
8 %# the GNU General Public License. A copy of that license should have
9 %# been provided with this software, but in any event can be snarfed
12 %# This work is distributed in the hope that it will be useful, but
13 %# WITHOUT ANY WARRANTY; without even the implied warranty of
14 %# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 %# General Public License for more details.
17 %# Unless otherwise specified, all modifications, corrections or
18 %# extensions to this work which alter its source code become the
19 %# property of Best Practical Solutions, LLC when submitted for
20 %# inclusion in the work.
25 if ($ShowDisplayModes or $ShowTitle) {
29 $title = loc('History');
34 $titleright = loc('Display mode') . ":";
35 if ($ShowHeaders && $ShowHeaders == $Ticket->Id ) {
36 $titleright .= "[<A HREF=\"" . $URIFile . "?id="
38 . loc("Brief headers")
40 . loc("Full headers") . "]</b>";
44 . loc("Brief headers")
48 . $Ticket->Id . "&id="
50 . loc("Full headers") . "</a>]";
53 <& /Elements/TitleBoxStart, title => $title, titleright => $titleright, bodyclass=> ''&>
56 <TABLE WIDTH=100% CELLSPACING=0 CELLPADDING=2 BORDER=0>
58 my @attachments = @{$Attachments->ItemsArrayRef()};
59 my @attachment_content = @{$AttachmentContent->ItemsArrayRef()};
65 while ( my $Transaction = $Transactions->Next ) {
67 $m->comp( '/Elements/Callback',
68 _CallbackName => 'SkipTransaction',
69 Transaction => $Transaction,
75 $m->out('<a name="lasttrans"></a>') if ( $Transactions->IsLast );
77 my @trans_attachments = grep { $_->TransactionId == $Transaction->Id } @attachments;
79 my $trans_content = {};
80 grep { ($_->TransactionId == $Transaction->Id ) && ($trans_content->{$_->Id} = $_) } @attachment_content;
83 #Args is first because we're clobbering the "Attachments" parameter
84 $m->comp( 'ShowTransaction',
87 AttachPath => $AttachPath,
88 UpdatePath => $UpdatePath,
90 Transaction => $Transaction,
91 ShowHeaders => $ShowHeaders,
92 Collapsed => $Collapsed,
94 ShowTitleBarCommands => $ShowTitleBarCommands,
95 Attachments => \@trans_attachments,
96 AttachmentContent => $trans_content
102 % if ($ShowDisplayModes or $ShowTitle) {
103 <& /Elements/TitleBoxEnd &>
107 my $Transactions = $Ticket->Transactions;
111 $Attachments ||= $m->comp('/Ticket/Elements/FindAttachments', Ticket => $Ticket);
112 $AttachmentContent ||= $m->comp('/Ticket/Elements/LoadTextAttachments', Ticket => $Ticket);
118 $URIFile => $RT::WebPath."/Ticket/Display.html"
120 $Attachments => undef
121 $AttachmentContent => undef
122 $ShowHeaders => undef
125 $ShowDisplayModes => 1
126 $ShowTitleBarCommands => 1
127 $AttachPath => $RT::WebPath."/Ticket/Attachment"
128 $UpdatePath => $RT::WebPath."/Ticket/Update.html"