Commit 80ab2d27 by Rocky Duan

fixed comment retrieval

parent b4ec109d
<%namespace name="renderer" file="_thread.html"/> <%namespace name="renderer" file="_content_renderer.html"/>
${renderer.render_comments(thread['children'])} ${renderer.render_comments(thread.get('children'))}
...@@ -7,7 +7,9 @@ ...@@ -7,7 +7,9 @@
<%def name="render_content_with_comments(content)"> <%def name="render_content_with_comments(content)">
<div class="${content['type']}" _id="${content['id']}" _discussion_id="${content.get('commentable_id')}" _author_id="${helpers.show_if(content['user_id'], content.get('anonymous'))}"> <div class="${content['type']}" _id="${content['id']}" _discussion_id="${content.get('commentable_id')}" _author_id="${helpers.show_if(content['user_id'], content.get('anonymous'))}">
${render_content(content)} ${render_content(content)}
${render_comments(content.get('children', []))} % if content.get('children') is not None:
${render_comments(content['children'])}
% endif
</div> </div>
</%def> </%def>
......
<%namespace name="renderer" file="_thread.html"/> <%namespace name="renderer" file="_content_renderer.html"/>
<section class="discussion" _id="${discussion_id}"> <section class="discussion" _id="${discussion_id}">
<a class="discussion-title" href="javascript:void(0)">Discussion</a> <a class="discussion-title" href="javascript:void(0)">Discussion</a>
${renderer.render_thread(course_id, thread, show_comments=True)} ${renderer.render_content_with_comments(thread)}
</section> </section>
<%include file="_js_data.html" /> <%include file="_js_data.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