Commit 427a8714 by Rocky Duan

Merge branch 'discussion2' of github.com:dementrock/mitx

parents 1805ed8a 24a69a74
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
<label for="discussion-search-within-board-${discussion_id}" class="discussion-search-within-board">Search within board</label> <label for="discussion-search-within-board-${discussion_id}" class="discussion-search-within-board">Search within board</label>
</div> </div>
<div class="discussion-new-post control-button" href="javascript:void(0)">New Post</div> <div class="discussion-new-post control-button" href="javascript:void(0)">New Post</div>
<%include file="_sort.html" />
</div> </div>
<%include file="_sort.html" />
<div class="threads"> <div class="threads">
% for thread in threads: % for thread in threads:
${renderer.render_thread(course_id, thread, show_comments=False)} ${renderer.render_thread(course_id, thread, show_comments=False)}
......
...@@ -98,15 +98,19 @@ ...@@ -98,15 +98,19 @@
</%def> </%def>
<%def name="render_info(content)"> <%def name="render_info(content)">
${time_ago_in_words(parse(content['updated_at']))} ago by <div class="comment-time">
% if content['anonymous']: ${time_ago_in_words(parse(content['updated_at']))} ago by
anonymous % if content['anonymous']:
% else: anonymous
user No.${content['user_id']} % else:
% endif user No.${content['user_id']}
% if content.get('comments_count', -1) >= 0: % endif
, <a href="javascript:void(0)" class="discussion-show-comments"> Show ${content['comments_count']} comment(s)</a> </div>
% endif <div class="comment-count">
% if content.get('comments_count', -1) >= 0:
<a href="javascript:void(0)" class="discussion-show-comments"> Show ${content['comments_count']} comment(s)</a>
% endif
</div>
</%def> </%def>
<%def name="render_link(cls, html)"> <%def name="render_link(cls, html)">
......
...@@ -79,15 +79,19 @@ ...@@ -79,15 +79,19 @@
</%def> </%def>
<%def name="render_info(content)"> <%def name="render_info(content)">
${time_ago_in_words(parse(content['updated_at']))} ago by <div class="comment-time">
% if content['anonymous']: ${time_ago_in_words(parse(content['updated_at']))} ago by
anonymous % if content['anonymous']:
% else: anonymous
user No.${content['user_id']} % else:
% endif user No.${content['user_id']}
% if content.get('comments_count', -1) >= 0: % endif
, ${content['comments_count']} comment(s) </div>
% endif <div class="comment-count">
% if content.get('comments_count', -1) >= 0:
${content['comments_count']} comment(s)
% endif
</div>
</%def> </%def>
<%def name="render_link(cls, html)"> <%def name="render_link(cls, html)">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment