diff commentator/templates/comment.html @ 2:689b9d928dc8

add date, reflect api change of lxmlmiddleware
author k0s <k0scist@gmail.com>
date Tue, 26 Jan 2010 23:00:51 -0500
parents 1c95a3fa76c1
children
line wrap: on
line diff
--- a/commentator/templates/comment.html	Sun Jan 24 17:40:54 2010 -0500
+++ b/commentator/templates/comment.html	Tue Jan 26 23:00:51 2010 -0500
@@ -9,13 +9,20 @@
   <div py:for="comment in comments" class="comment">
     <a py:strip="not comment['link']" href="${comment['link']}">
       ${comment['author']}
-    </a>
+    </a>${comment['date'].strftime(date_format)}
     <p>${comment['body']}</p>
   </div>
 
+  
   <form method="post" action="${action}">
+
+  <py:if test="bool(request.remote_user)">
+  <input type="hidden" name="author" value="${request.remote_user}"/>
+  </py:if> 
     <dl>
+    <py:if test="not request.remote_user">
       <dt>Name:</dt><dd><input type="text" name="author"/></dd>
+      </py:if>
       <dt>URL:</dt><dd><input type="text" name="link"/></dd>
       <textarea name="body"></textarea>
     </dl>