<%! from django.utils.translation import ugettext as _ %>
<%! from django_comment_client.permissions import has_permission %>

<%namespace name='static' file='../static_content.html'/>

<%block name="js_extra">
    <%static:js group='discussion' raw='true'/>
</%block>

<%block name="css_extra">
    <%static:css group='discussion' raw='true'/>
</%block>

<div class="discussion-course">

  % if enable_new_post_btn and has_permission(user, "create_thread", course_id):
  <div class="discussion-course-new right">
    <a href="#" class="new-post-btn" role="button"><span class="icon icon-edit new-post-icon"></span>${_("New Post")}</a>
  </div>

  <div style="display: block; clear: both; height: 1px;"></div>
  % endif

  <%include file="_course_discussion_section.html" />

</div>
