fixed comment retrieval

This commit is contained in:
Rocky Duan
2012-08-19 10:07:31 -07:00
parent b4ec109dac
commit 80ab2d27a0
3 changed files with 7 additions and 5 deletions

View File

@@ -1,2 +1,2 @@
<%namespace name="renderer" file="_thread.html"/>
${renderer.render_comments(thread['children'])}
<%namespace name="renderer" file="_content_renderer.html"/>
${renderer.render_comments(thread.get('children'))}

View File

@@ -7,7 +7,9 @@
<%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'))}">
${render_content(content)}
${render_comments(content.get('children', []))}
% if content.get('children') is not None:
${render_comments(content['children'])}
% endif
</div>
</%def>

View File

@@ -1,8 +1,8 @@
<%namespace name="renderer" file="_thread.html"/>
<%namespace name="renderer" file="_content_renderer.html"/>
<section class="discussion" _id="${discussion_id}">
<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>
<%include file="_js_data.html" />