summaryrefslogtreecommitdiff
path: root/rt/html/Ticket/Elements/ShowAttachments
diff options
context:
space:
mode:
authorivan <ivan>2004-11-11 12:13:50 +0000
committerivan <ivan>2004-11-11 12:13:50 +0000
commitb8cfd0780aa40bb07f3215bf9cb58011f5e32a35 (patch)
tree5b5deb6f64cf6eb9f4630675725b59e7bfad137a /rt/html/Ticket/Elements/ShowAttachments
parent0a2e57727e8f00fdc8ec4596619fb206c95fa919 (diff)
parentc582e92888b4a5553e1b4e5214cf35217e4a0cf0 (diff)
This commit was generated by cvs2svn to compensate for changes in r3874,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'rt/html/Ticket/Elements/ShowAttachments')
-rw-r--r--rt/html/Ticket/Elements/ShowAttachments22
1 files changed, 10 insertions, 12 deletions
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) {
</%PERL>
<li><font <%$fontsize%>>
- <A HREF="<%$RT::WebPath%>/Ticket/Attachment/<%$rev->TransactionObj->Id%>/<%$rev->Id%>/<%$rev->Filename | u%>"><%$rev->CreatedAsString%> (<% $size %>)</a></font></li>
+<A HREF="<%$RT::WebPath%>/Ticket/Attachment/<%$rev->TransactionId%>/<%$rev->Id%>/<%$rev->Filename | u%>">
+<&|/l, $rev->CreatedAsString, $size, $rev->CreatorObj->Name &>[_1] ([_2]) by [_3]</&>
+</a>
+</font></li>
% }
% $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 );
}
+
</%INIT>
<%ARGS>
$Ticket => undef
+$Attachments => undef
</%ARGS>