<%! from django.utils.translation import ugettext as _ %>
<%inherit file="/main.html" />
<%block name="bodyclass">${course.css_class}</%block>
<%namespace name='static' file='/static_content.html'/>

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

<%block name="title"><title>${_("{course.display_number_with_default} Course Info").format(course=course) | h}</title></%block>
<%include file="/courseware/course_navigation.html" args="active_page='info'" />
<%!
  from courseware.courses import get_course_info_section
%>

<%block name="js_extra">
  <script type="text/javascript" src="${static.url('js/jquery.treeview.js')}"></script>
  <script type="text/javascript" charset="utf-8">
$(document).ready(function(){
    $(".handouts").treeview({collapsed:true, unique:true/*, cookieId: "treeview-book-nav", persist: "cookie"*/});
    });
  </script>
</%block>

<section class="container">
  <div class="info-wrapper">
    % if user.is_authenticated():
    <section class="updates">
      <h1>${_("Course Updates &amp; News")}</h1>
      ${get_course_info_section(request, course, 'updates')}
    </section>
    <section aria-label="Handout Navigation" class="handouts">
      <h1>${course.info_sidebar_name}</h1>
      ${get_course_info_section(request, course, 'handouts')}
    </section>
    % else:
    <section class="updates">
      <h1>${_("Course Updates &amp; News")}</h1>
      ${get_course_info_section(request, course, 'guest_updates')}
    </section>
    <section aria-label="${_('Handout Navigation')}" class="handouts">
      <h1>${_("Course Handouts")}</h1>
      ${get_course_info_section(request, course, 'guest_handouts')}
    </section>
    % endif
  </div>
</section>
