<%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.number} Course Info</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, cache, course, 'updates')}
    </section>
    <section aria-label="Handout Navigation" class="handouts">
      <h1>${course.info_sidebar_name}</h1>
      ${get_course_info_section(request, cache, course, 'handouts')}
    </section>
    % else:
    <section class="updates">
      <h1>Course Updates &amp; News</h1>
      ${get_course_info_section(request, cache, course, 'guest_updates')}
    </section>
    <section aria-label="Handout Navigation" class="handouts">
      <h1>Course Handouts</h1>
      ${get_course_info_section(request, cache, course, 'guest_handouts')}
    </section>
    % endif
  </div>
</section>
