Add time used column to invite codes page.

        Patch by kareila. 

diffs (36 lines):

diff -r 7c4391ba954e -r 4288b7f001e4 htdocs/manage/invitecodes.bml
--- a/htdocs/manage/invitecodes.bml     Mon Mar 08 22:37:45 2010 +0000
+++ b/htdocs/manage/invitecodes.bml     Mon Mar 08 22:43:23 2010 +0000
@@ -86,7 +86,7 @@ body<=
         } @invitecodes;
 
 
-        $ret .= "<table class='invitecodes' 
id='invitecodes'><tr><th>$ML{'.header.code'}</th><th>$ML{'.header.recipient'}</th><th
 width='200'>$ML{'.header.sent'}</th><th>$ML{'.header.email'}</th></tr>";
+        $ret .= "<table class='invitecodes' 
id='invitecodes'><tr><th>$ML{'.header.code'}</th><th>$ML{'.header.recipient'}</th><th
 width='200'>$ML{'.header.used'}</th><th 
width='200'>$ML{'.header.sent'}</th><th>$ML{'.header.email'}</th></tr>";
     
         foreach my $code ( @invitecodes ) {
             $ret .= "<tr>";
@@ -102,6 +102,14 @@ body<=
                 $ret .= BML::ml( '.code.use', { aopts => "href='$create_link'" 
} );
             }        
 
+            $ret .= "</td>";
+            
+            $ret .= "<td>";
+            if ( $code->is_used ) {
+                my $u = $recipient_users->{$code->recipient};
+                my $timeused = $u->timecreate;
+                $ret .= LJ::time_to_http( $timeused ) if $timeused;
+            }
             $ret .= "</td>";
             
             $ret .= "<td>";
diff -r 7c4391ba954e -r 4288b7f001e4 htdocs/manage/invitecodes.bml.text
--- a/htdocs/manage/invitecodes.bml.text        Mon Mar 08 22:37:45 2010 +0000
+++ b/htdocs/manage/invitecodes.bml.text        Mon Mar 08 22:43:23 2010 +0000
@@ -29,3 +29,5 @@
 
 .header.sent=Sent on:
 
+.header.used=Used on:
+
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog

Reply via email to