<%inherit file="base.html" />
<%namespace name='static' file='static_content.html'/>
<%!
  from django.utils.translation import ugettext as _
  from django.core.urlresolvers import reverse
%>
<%block name="title">Static Pages</%block>
<%block name="bodyclass">is-signedin course view-static-pages</%block>

<%block name="jsextra">
  <script type='text/javascript'>
require(["coffee/src/views/tabs", "coffee/src/models/module"], function(TabsEditView, ModuleModel) {
    new TabsEditView({
      el: $('.main-wrapper'),
      model: new ModuleModel({
        id: '${context_course.location}'
      }),
      mast: $('.wrapper-mast')
    });
});
  </script>
</%block>

<%block name="content">
<div class="wrapper-mast wrapper">
  <header class="mast has-actions has-subtitle">
    <h1 class="page-header">
      <small class="subtitle">${_("Content")}</small>
      <span class="sr">&gt; </span>${_("Static Pages")}
    </h1>

    <nav class="nav-actions">
      <h3 class="sr">${_("Page Actions")}</h3>
      <ul>
        <li class="nav-item">
        <a href="#" class="button new-button new-tab"><i class="icon-plus"></i> ${_("New Page")}</a>
        </li>
      </ul>
    </nav>
  </header>
</div>

<div class="wrapper-content wrapper">
  <section class="content">
    <div class="introduction has-links">
      <p class="copy">${_("Static Pages are additional pages that supplement your Courseware. Other course authors have used them to share a syllabus, calendar, handouts, and more.")}</p>
      <nav class="nav-introduction-supplementary">
        <ul>
          <li class="nav-item">
          <a rel="modal" href="#preview-lms-staticpages"><i class="icon-question-sign"></i>${_("How do Static Pages look to students in my course?")}</a>
          </li>
        </ul>
      </nav>
    </div>
  </section>
</div>

<div class="main-wrapper">
  <div class="inner-wrapper">
    <article class="unit-body">

      <div class="tab-list">
        <ol class='components'>
          % for id, update_url in components:
          <li class="component" data-id="${id}" data-update_url="${update_url}"/>
          % endfor

          <li class="new-component-item">

          </li>
        </ol>
      </div>
    </article>
  </div>
</div>

<div class="content-modal" id="preview-lms-staticpages">
  <h3 class="title">${_("How Static Pages are Used in Your Course")}</h3>
  <figure>
    <img src="${static.url("img/preview-lms-staticpages.png")}" alt="${_('Preview of how Static Pages are used in your course')}" />
    <figcaption class="description">${_("These pages will be presented in your course's main navigation alongside Courseware, Course Info, Discussion, etc.")}</figcaption>
  </figure>

  <a href="#" rel="view" class="action action-modal-close">
    <i class="icon-remove-sign"></i>
    <span class="label">${_("close modal")}</span>
  </a>
</div>
</%block>
