modify anonymity handling; display comments count

This commit is contained in:
Rocky Duan
2012-07-31 11:54:02 -04:00
parent a08d4b808b
commit e301be4a80
2 changed files with 21 additions and 11 deletions

View File

@@ -4,7 +4,6 @@
<%! import urllib %>
<%def name="render_thread(course_id, thread, edit_thread=False, show_comments=False)">
<div class="thread" _id="${thread['id']}">
${render_content(thread, "thread", edit_thread=edit_thread, show_comments=show_comments)}
% if show_comments:
@@ -83,10 +82,13 @@
<%def name="render_info(content)">
${time_ago_in_words(parse(content['updated_at']))} ago by
% if content.get('user_id', False):
user No.${content['user_id']}
% else:
% if content['anonymous']:
anonymous
% else:
user No.${content['user_id']}
% endif
% if content.get('comments_count', -1) >= 0:
/ ${content['comments_count']} comment(s)
% endif
</%def>