X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Fhtml%2FTicket%2FElements%2FShowAttachments;fp=rt%2Fhtml%2FTicket%2FElements%2FShowAttachments;h=bdda1692c66bbc28fece2e644f16b1fcdc8cb9f2;hb=c582e92888b4a5553e1b4e5214cf35217e4a0cf0;hp=590a011fba1c508e6d3bb55ec67d46d000788eea;hpb=289340780927b5bac2c7604d7317c3063c6dd8cc;p=freeside.git diff --git a/rt/html/Ticket/Elements/ShowAttachments b/rt/html/Ticket/Elements/ShowAttachments index 590a011fb..bdda1692c 100644 --- a/rt/html/Ticket/Elements/ShowAttachments +++ b/rt/html/Ticket/Elements/ShowAttachments @@ -47,7 +47,10 @@ if ($size) {
  • > - <%$rev->CreatedAsString%> (<% $size %>)
  • + +<&|/l, $rev->CreatedAsString, $size, $rev->CreatorObj->Name &>[_1] ([_2]) by [_3] + + % } % $fontsize='size="-2"'; % } @@ -60,20 +63,15 @@ if ($size) { <%INIT> my %documents; -my $transactions = $Ticket->Transactions(); -while (my $trans = $transactions->Next()) { - my $attachments = $trans->Attachments(); - $attachments->Columns( qw( Id Filename ContentType Headers Subject Parent ContentEncoding ContentType TransactionId) ); - $attachments->Limit(FIELD => 'Filename', OPERATOR => 'IS NOT', VALUE => 'NULL', QUOTEVALUE => 0, ENTRYAGGREGATOR => 'AND'); - $attachments->Limit(FIELD => 'Filename', OPERATOR => '!=', VALUE => '', ENTRYAGGREGATOR => 'AND'); - while (my $attach = $attachments->Next()) { - next unless ($attach->Filename()); - # most recent at the top - unshift (@{$documents{$attach->Filename}}, $attach); - } + +while ( my $attach = $Attachments->Next() ) { + next unless ($attach->Filename()); + unshift( @{ $documents{ $attach->Filename } }, $attach ); } + <%ARGS> $Ticket => undef +$Attachments => undef