Files
edx-platform/cms/templates/overview.html
2012-10-01 15:17:41 -04:00

79 lines
2.3 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<%inherit file="base.html" />
<%! from django.core.urlresolvers import reverse %>
<%block name="title">CMS Courseware Overview</%block>
<%def name="branch(section, depth)">
<%
has_children = depth > 0 and len(section.get_children()) > 0
%>
<li class="branch collapsed">
<div class="section-item">
% if has_children:
<a href="#" class="expand-collapse-icon expand"></a>
% endif
<a href="#" class="draft-item">
<span class="${section.category}-icon"></span>${section.display_name} <span class="draft-tag"> draft</span>
</a>
${actions(section)}
</div>
% if has_children:
<ol>
% for unit in section.get_children():
${branch(unit, depth-1)}
% endfor
${new_unit()}
</ol>
% endif
</li>
</%def>
<%def name="actions(unit)">
<div class="item-actions">
<a href="${reverse('edit_item', args=[unit.location])}" class="edit-button"><span class="edit-icon"></span></a>
<a href="${reverse('delete_item', args=[unit.location])}" class="edit-button"><span class="delete-icon"></span></a>
<a href="#" class="drag-handle"></a>
</div>
</%def>
<%def name="new_unit()">
<li>
<a href="#" class="section-item new-unit-item">
<span class="plus-icon"></span>New Unit
</a>
</li>
</%def>
<%block name="content">
<div class="main-wrapper">
<div class="inner-wrapper">
<h1>Courseware</h1>
<input type="text" class="courseware-unit-search-input search" placeholder="search units" />
<article class="courseware-overview">
<a href="#" class="new-courseware-section-button"><span class="plus-icon"></span> New Section</a>
% for week in weeks:
<section class="courseware-section branch">
<header>
<a href="#" class="expand-collapse-icon collapse"></a>
<div class="item-details">
<h3>${week.display_name}</h3>
<h4><strong>Unscheduled:</strong> <a href="#">click here to set</a></h4>
</div>
${actions(week)}
</header>
<ol>
% for section in week.get_children():
${branch(section, 1)}
% endfor
${new_unit()}
</ol>
</section>
% endfor
</article>
</div>
<%include file="widgets/upload_assets.html"/>
</div>
<footer></footer>
</%block>