overview.html 3.92 KB
Newer Older
1
<%inherit file="base.html" />
2
<%! from django.core.urlresolvers import reverse %>
3 4
<%block name="title">CMS Courseware Overview</%block>

5 6
<%namespace name="units" file="widgets/units.html" />

7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
<%block name="header_extras">
  <script type="text/template" id="new-section-template">
    <section class="courseware-section branch new-section">
      <header>
        <a href="#" class="expand-collapse-icon collapse"></a>
        <div class="item-details">
          <h3 class="section-name"><input type="text" value="New Section Name" class="new-section-name" /><a href="#" class="new-section-name-save" data-parent="${parent_location}" data-template="${new_section_template}">Save</a><a href="#" class="new-section-name-cancel">Cancel</a></h3>
        </div>
      </header>
    </section>
  </script>

  <script type="text/template" id="new-subsection-template">
    <li class="branch collapsed">
      <div class="section-item editing">
        <div>
          <span class="folder-icon"></span>
          <span class="subsection-name">
            <input type="text" value="New Subsection" class="new-subsection-name-input" />
          </span>
          <a href="#" class="new-subsection-name-save">Save</a>
          <a href="#" class="new-subsection-name-cancel">Cancel</a>
        </div>
      </div>
      <ol>
        <li>
          <a href="unit.html" class="new-unit-item">
            <span class="new-unit-icon"></span>New Unit
          </a>
        </li>
      </ol>
    </li>
  </script>


</%block>
43

44
<%block name="content">
45 46 47
  <div class="main-wrapper">
    <div class="inner-wrapper">
      <h1>Courseware</h1>
48 49 50
      <div class="page-actions">
        <input type="text" class="courseware-unit-search-input search wip-box" placeholder="search units" />
      </div>
51
      <article class="courseware-overview">
52
        <a href="#" class="new-courseware-section-button"><span class="plus-icon"></span> New Section</a>
53
        % for section in sections:
54
        <section class="courseware-section branch" data-id="${section.location}">
55 56 57
          <header>
            <a href="#" class="expand-collapse-icon collapse"></a>
            <div class="item-details">
58
              <h3>${section.display_name}</h3>
59 60
              <h4><strong>Unscheduled:</strong> <a href="#">click here to set</a></h4>
            </div>
61
            <div class="item-actions">
62
              <a href="#" class="delete-button delete-section-button"><span class="delete-icon"></span></a>
Calen Pennington committed
63
              <a href="#" class="drag-handle wip"></a>
64
            </div>
65
          </header>
66 67
          <div class="unit-list">
            <div class="list-header">
68
              <a href="#" class="new-subsection-item" data-template="${new_subsection_template}">
69 70 71 72 73
                <span class="new-folder-icon"></span>New Subsection
              </a>
            </div>
            <ol>
              % for subsection in section.get_children():
74
              <li class="branch collapsed" data-id="${subsection.location}">
75 76 77
                <div class="section-item">
                  <div>
                    <a href="#" class="expand-collapse-icon expand"></a>
78
                    <a href="${reverse('edit_subsection', args=[subsection.location])}">
79 80
                      <span class="folder-icon"></span>
                      <span class="subsection-name"><span class="subsection-name-value">${subsection.display_name}</span></span>
81 82
                    </a>
                  </div>
83
                  <div class="item-actions">
84
                    <a href="#" class="delete-button delete-subsection-button"><span class="delete-icon"></span></a>                    
Calen Pennington committed
85
                    <a href="#" class="drag-handle wip"></a>
86 87
                  </div>
                </div>
88
		${units.enum_units(subsection)}
89 90 91 92
              </li>
              % endfor
            </ol>
          </div>
93 94 95
        </section>
        % endfor
      </article>
96 97
    </div>
    <%include file="widgets/upload_assets.html"/>
98 99
  </div>
  <footer></footer>
100
</%block>