app/soc/views/helper/templatetags/forms_helpers.py
changeset 1714 bfdef9380954
parent 1678 80411f57f31a
child 1815 7a9b69f36111
--- a/app/soc/views/helper/templatetags/forms_helpers.py	Sat Mar 07 15:19:06 2009 +0000
+++ b/app/soc/views/helper/templatetags/forms_helpers.py	Sat Mar 07 15:19:53 2009 +0000
@@ -40,40 +40,6 @@
 register = template.Library()
 
 
-@register.inclusion_tag('soc/templatetags/_as_comments.html',
-                        takes_context=True)
-def as_comments(context, work):
-  """Returns a HTML representation of a work's comments.
-  """
-
-  context['comments'] =  work.comments
-  return context
-
-@register.inclusion_tag('soc/templatetags/_as_comment.html',
-                        takes_context=True)
-def as_comment(context, comment):
-  """Returns a HTML representation of a comment.
-  """
-
-  edit_link = ''
-  current_user = user_logic.logic.getForCurrentAccount()
-
-  if current_user and comment.author.key() == current_user.key():
-    params = {'url_name': context['comment_on_url_name']}
-    edit_link = redirects.getEditRedirect(comment, params)
-
-  context.update({
-      'author': comment.author.name,
-      'content': comment.content,
-      'created': comment.created,
-      'edit_link': edit_link,
-      'modified_on': comment.modified,
-      'modified_by': comment.modified_by.name if comment.modified_by else '',
-      'comment_class': "public" if comment.is_public else "private",
-      })
-
-  return context
-
 @register.inclusion_tag('soc/templatetags/_field_as_table_row.html')
 def field_as_table_row(field):
   """Prints a newforms field as a table row.