## mako

<%! main_css = "style-discussion-main" %>

<%page expression_filter="h"/>
<%inherit file="../main.html" />
<%namespace name='static' file='../static_content.html'/>
<%!
from django.utils.translation import ugettext as _
from django.template.defaultfilters import escapejs
from django.core.urlresolvers import reverse
%>

<%block name="bodyclass">discussion</%block>
<%block name="pagetitle">${_("Discussion - {course_number}").format(course_number=course.display_number_with_default)}</%block>

<%block name="headextra">
<%include file="_js_head_dependencies.html" />
</%block>

<%block name="js_extra">
## Enable fast preview to fix discussion MathJax rendering bug when page first loads.
<%include file="_js_body_dependencies.html" args="disable_fast_preview=False"/>
<%static:js group='discussion'/>
</%block>

<%include file="_discussion_course_navigation.html" args="active_page='discussion'" />

<%block name="content">
<section class="discussion container" id="discussion-container"
         data-roles="${roles}"
         data-course-id="${course_id}"
         data-course-name="${course.display_name_with_default}"
         data-user-info="${user_info}"
         data-user-create-comment="${can_create_comment}"
         data-user-create-subcomment="${can_create_subcomment}"
         data-read-only="false"
         data-threads="${threads}"
         data-thread-pages="${thread_pages}"
         data-content-info="${annotated_content_info}"
         data-sort-preference="${sort_preference}"
         data-flag-moderator="${flag_moderator}"
         data-user-cohort-id="${user_cohort}"
         data-course-settings="${course_settings}">
    <div class="discussion-body">
        <div class="forum-nav" role="complementary" aria-label="${_("Discussion thread list")}"></div>
        <div class="discussion-column" id="discussion-column">
            <main id="main" aria-label="Content" tabindex="-1">
                <article class="new-post-article" style="display: none" tabindex="-1" aria-label="${_("New topic form")}"></article>
                <div class="forum-content"></div>
            </main>
        </div>
    </div>
</section>
</%block>

<%include file="_underscore_templates.html" />
<%include file="_thread_list_template.html" />
