app/soc/views/helper/templatetags/comments_helpers.py
changeset 1897 634617545037
parent 1714 bfdef9380954
child 2365 a66e1dd8ced7
--- a/app/soc/views/helper/templatetags/comments_helpers.py	Mon Mar 16 21:14:55 2009 +0000
+++ b/app/soc/views/helper/templatetags/comments_helpers.py	Mon Mar 16 21:17:04 2009 +0000
@@ -85,3 +85,21 @@
 
   return context
 
+@register.inclusion_tag('soc/templatetags/_as_student_proposal_review.html',
+                        takes_context=True)
+def as_student_proposal_review(context, review, student):
+  """Returns a HTML representation of a student proposal review.
+  """
+
+  # TODO(ljvderijk) once review editing is allowed redo this
+
+  context.update({
+      'author': review.author_name(),
+      'content': review.content,
+      'created': review.created,
+      'score': review.score,
+      'is_public': review.is_public,
+      'from_student': review.author.key() == student.user.key()
+      })
+
+  return context