122 lines
5.1 KiB
HTML
122 lines
5.1 KiB
HTML
<%inherit file="base.html" />
|
|
<%! from django.core.urlresolvers import reverse %>
|
|
<%namespace name="units" file="widgets/units.html" />
|
|
<%block name="bodyclass">unit</%block>
|
|
<%block name="title">CMS Unit</%block>
|
|
<%block name="jsextra">
|
|
<script type='text/javascript'>
|
|
new CMS.Views.UnitEdit({
|
|
el: $('.main-wrapper'),
|
|
model: new CMS.Models.Module({
|
|
id: '${unit_location}',
|
|
state: '${unit_state}'
|
|
})
|
|
});
|
|
</script>
|
|
</%block>
|
|
<%block name="content">
|
|
<div class="main-wrapper edit-state-${unit_state}" data-id="${unit_location}">
|
|
<div class="inner-wrapper">
|
|
<div class="alert" id="published-alert">
|
|
<p class="alert-message"><strong>You are editing a draft.</strong>
|
|
% if published_date:
|
|
This unit was originally published on ${published_date}.
|
|
% endif
|
|
</p>
|
|
<a href="${published_preview_link}" target="_blank" class="alert-action secondary">Preview the published version</a>
|
|
</div>
|
|
<div class="main-column">
|
|
<article class="unit-body window">
|
|
<p class="unit-name-input"><label>Display Name:</label><input type="text" value="${unit.display_name}" class="unit-display-name-input" /></p>
|
|
<ol class="components">
|
|
% for id in components:
|
|
<li class="component" data-id="${id}"/>
|
|
% endfor
|
|
<li class="new-component-item">
|
|
<a href="#" class="new-component-button">
|
|
<span class="plus-icon"></span>New Component
|
|
</a>
|
|
<div class="new-component">
|
|
<h5>Select Component Type</h5>
|
|
<ul class="new-component-type">
|
|
% for type in sorted(component_templates.keys()):
|
|
<li>
|
|
<a href="#" data-type="${type}">
|
|
<span class="large-template-icon large-${type}-icon"></span>
|
|
<span class="name">${type}</span>
|
|
</a>
|
|
</li>
|
|
% endfor
|
|
</ul>
|
|
<a href="#" class="cancel-button">Cancel</a>
|
|
</div>
|
|
% for type, templates in sorted(component_templates.items()):
|
|
<div class="new-component-templates new-component-${type}">
|
|
<ul class="new-component-template">
|
|
% for name, location in templates:
|
|
<li>
|
|
<a href="#" data-location="${location}">
|
|
<span class="name">${name}</span>
|
|
</a>
|
|
</li>
|
|
% endfor
|
|
</ul>
|
|
<a href="#" class="cancel-button">Cancel</a>
|
|
</div>
|
|
% endfor
|
|
</li>
|
|
</ol>
|
|
</article>
|
|
</div>
|
|
|
|
<div class="sidebar">
|
|
<div class="unit-properties window">
|
|
<h4>Unit Properties</h4>
|
|
<div class="window-contents">
|
|
<div class="row visibility">
|
|
<label class="inline-label">Visibility:</label>
|
|
<select id='visibility'>
|
|
<option value="public">Public</option>
|
|
<option value="private">Private</option>
|
|
</select>
|
|
</div>
|
|
<a id="create-draft" href="#">This unit has been published. Click here to edit it.</a>
|
|
<a id="publish-draft" href="#">This unit has already been published. Click here to release your changes to it</a>
|
|
<div class="row status">
|
|
<p>This unit is scheduled to be released to <strong>students</strong> on <strong>${subsection.start}</strong> with the subsection <a href="${reverse('edit_subsection', kwargs={'location': subsection.location})}">"${subsection.display_name}"</a></p>
|
|
</div>
|
|
<div class="row unit-actions">
|
|
<a id="save-draft" href="#" class="save-button">Save Draft</a>
|
|
<a id="delete-draft" href="#" class="save-button">Delete Draft</a>
|
|
<a href="${draft_preview_link}" target="_blank" class="preview-button">Preview</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="window unit-location">
|
|
<h4>Unit Location</h4>
|
|
<div class="window-contents">
|
|
<div><input type="text" class="url" value="/courseware/${section.url_name}/${subsection.url_name}" disabled /></div>
|
|
<ol>
|
|
<li>
|
|
<a href="#" class="section-item">${section.display_name}</a>
|
|
<ol>
|
|
<li>
|
|
<a href="${reverse('edit_subsection', args=[subsection.location])}" class="section-item">
|
|
<span class="folder-icon"></span>
|
|
<span class="subsection-name"><span class="subsection-name-value">${subsection.display_name}</span></span>
|
|
</a>
|
|
<ol>
|
|
${units.enum_units(subsection, actions=False, selected=unit.location)}
|
|
</ol>
|
|
</li>
|
|
</ol>
|
|
</li>
|
|
</ol>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</%block>
|