37 lines
1.2 KiB
HTML
37 lines
1.2 KiB
HTML
<%namespace name="renderer" file="_thread.html"/>
|
|
|
|
<section class="discussion inline-discussion" _id="${discussion_id}">
|
|
<div class="discussion-non-content discussion-local">
|
|
<div class="search-wrapper-inline search-wrapper">
|
|
<%include file="_search_bar.html" />
|
|
</div>
|
|
<div class="discussion-new-post control-button" href="javascript:void(0)">New Post</div>
|
|
<%include file="_sort.html" />
|
|
</div>
|
|
% if len(threads) == 0:
|
|
<%include file="_blank_slate.html" />
|
|
<div class="threads"></div>
|
|
% else:
|
|
<div class="threads">
|
|
% for thread in threads:
|
|
${renderer.render_thread(course_id, thread, show_comments=False)}
|
|
% endfor
|
|
</div>
|
|
% endif
|
|
<%include file="_paginator.html" />
|
|
</section>
|
|
|
|
<%!
|
|
def escape_quotes(text):
|
|
return text.replace('\"', '\\\"').replace("\'", "\\\'")
|
|
%>
|
|
|
|
<script type="text/javascript">
|
|
var $$user_info = JSON.parse('${user_info | escape_quotes}');
|
|
var $$course_id = "${course_id}";
|
|
if (typeof $$annotated_content_info === undefined || $$annotated_content_info === null) {
|
|
var $$annotated_content_info = {};
|
|
}
|
|
$$annotated_content_info = $.extend($$annotated_content_info, JSON.parse("${annotated_content_info | escape_quotes}"));
|
|
</script>
|