<%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) | h}</%block>
<%block name="nav_skip">#discussion-container</%block>

<%block name="headextra">
<%static:css group='style-course-vendor'/>
<%static:css group='style-course'/>

<%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'" />

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

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