[Rt-commit] r4281 - in RT-View-Directory: . html/View-Directory/Elements html/View-Directory/Ticket

jesse at bestpractical.com jesse at bestpractical.com
Fri Dec 9 01:21:14 EST 2005


Author: jesse
Date: Fri Dec  9 01:21:12 2005
New Revision: 4281

Modified:
   RT-View-Directory/   (props changed)
   RT-View-Directory/html/View-Directory/Elements/ListAttachments
   RT-View-Directory/html/View-Directory/Ticket/File
   RT-View-Directory/html/View-Directory/Ticket/dhandler
Log:
 r19863 at truegrounds:  jesse | 2005-12-09 01:20:34 -0500
 * checkpoint


Modified: RT-View-Directory/html/View-Directory/Elements/ListAttachments
==============================================================================
--- RT-View-Directory/html/View-Directory/Elements/ListAttachments	(original)
+++ RT-View-Directory/html/View-Directory/Elements/ListAttachments	Fri Dec  9 01:21:12 2005
@@ -5,8 +5,6 @@
 $Filename => undef
 </%args>
 <%init>
-my $Ticket = RT::Ticket->new( $session{'CurrentUser'} );
-$Ticket->Load($Ticket);
 
 
 #A default implementation here loops through all transactions and pulls out all their attachments.
@@ -50,12 +48,13 @@
 }
 </%init>
 
-<& /Elements/Header, title => loc("Ticket [_1]: [_2]", $Ticket->id, $Ticket->Subject) &>
 % foreach my $key (keys %documents) {
 
-<table>
+<table width="100%">
 <tr>
+% if (not $Filename) {
 <th>Filename</th>
+% }
 <th>Created</th>
 <th>Creator</th>
 <th>Size</th>
@@ -70,10 +69,14 @@
     else { $size = $size ."b"; }
 }
 </%PERL>
-
 <tr>
-<td><a href="<%$Ticket->id%>/File/<%$key%>"><%$key%></a></td>
-<td><a href="<%$RT::WebPath%>/Ticket/Attachment/<%$rev->TransactionId%>/<%$rev->Id%>/<%$rev->Filename | u%>"><%$rev->CreatedAsString%></a></td>
+% if (not $Filename) {
+<td><%$key%><a href="<%$Ticket->id%>/File/<%$key%>">(Show only this file)</a></td>
+% }
+<td>
+<%$rev->CreatedAsString%> 
+<a href="<%$RT::WebPath%>/Ticket/Attachment/<%$rev->TransactionId%>/<%$rev->Id%>/<%$rev->Filename | u%>">
+(Download this version)</a></td>
 <td><%$rev->CreatorObj->Name%></td>
 <td><%$size%></td>
 </td>

Modified: RT-View-Directory/html/View-Directory/Ticket/File
==============================================================================
--- RT-View-Directory/html/View-Directory/Ticket/File	(original)
+++ RT-View-Directory/html/View-Directory/Ticket/File	Fri Dec  9 01:21:12 2005
@@ -1,6 +1,16 @@
+<%args>
+$id => undef
+$Filename => undef
+$QueryString => undef
+</%args>
 <%init>
-use YAML;
-die YAML::Dump(\%ARGS);
+my $Ticket = RT::Ticket->new($session{'CurrentUser'});
+$Ticket->Load($id);
 </%init>
 
-WOO
+<& /Elements/Header, Title => loc("Ticket [_1]: [_2]", $Ticket->id, $Ticket->Subject) &>
+<& /Elements/Tabs&>
+<h2><&|/l, $Ticket->id, $Ticket->Subject, $Filename&>Ticket [_1]: [_3]</&></h2>
+<hr/>
+<a href="<%$RT::WebPath%>/View-Directory/Ticket/<%$Ticket->id%>?<%$QueryString%>">Show all attachments</a>
+<& ../Elements/ListAttachments, Ticket => $Ticket, Filename => $Filename &>

Modified: RT-View-Directory/html/View-Directory/Ticket/dhandler
==============================================================================
--- RT-View-Directory/html/View-Directory/Ticket/dhandler	(original)
+++ RT-View-Directory/html/View-Directory/Ticket/dhandler	Fri Dec  9 01:21:12 2005
@@ -1,16 +1,19 @@
 <%init>
 my $id = $m->dhandler_arg;
 if ($id =~ '^(\d+)/File/(.*?)$') {
-    $m->comp('File', id => $1, filename => $2);
+    $m->comp('File', id => $1, Filename => $2);
     return();
 }
-my $ticket = RT::Ticket->new( $session{'CurrentUser'} );
-$ticket->Load($id);
+my $Ticket = RT::Ticket->new( $session{'CurrentUser'} );
+$Ticket->Load($id);
 
 </%init>
-
-<& /Elements/Header, title => loc("Ticket [_1]: [_2]", $ticket->id, $ticket->Subject) &>
-<& ../Elements/ListAttachments,  Ticket => $ticket&>
+<& /Elements/Header, Title => loc("Ticket [_1]: [_2]", $Ticket->id, $Ticket->Subject) &>
+<& /Elements/Tabs &>
+<h2><&|/l, $Ticket->id, $Ticket->Subject&>Ticket [_1]: All attachments</&></h2>
+<hr />
+<a href="<%$RT::WebPath%>/View-Directory/?<%$QueryString%>">Back to search</a>
+<& ../Elements/ListAttachments,  Ticket => $Ticket&>
 
 
 


More information about the Rt-commit mailing list