223 lines
8.5 KiB
HTML
223 lines
8.5 KiB
HTML
<%inherit file="base.html" />
|
|
<%! from django.core.urlresolvers import reverse %>
|
|
<%namespace name="units" file="widgets/units.html" />
|
|
<%block name="title">Individual Unit</%block>
|
|
<%block name="bodyclass">is-signedin course unit</%block>
|
|
|
|
<%block name="jsextra">
|
|
<script type='text/javascript'>
|
|
$(document).ready(function() {
|
|
new CMS.Views.UnitEdit({
|
|
el: $('.main-wrapper'),
|
|
model: new CMS.Models.Module({
|
|
id: '${unit_location}',
|
|
state: '${unit_state}'
|
|
})
|
|
});
|
|
|
|
$('.new-component-template').each(function(){
|
|
$emptyEditor = $(this).find('.empty');
|
|
$(this).prepend($emptyEditor);
|
|
});
|
|
});
|
|
</script>
|
|
|
|
</%block>
|
|
<%block name="content">
|
|
|
|
<div class="wrapper-alert">
|
|
<div class="alert has-actions alert-editing-draft">
|
|
|
|
<div class="copy">
|
|
<h2 class="title-3">You are editing a draft.</h2>
|
|
<p class="message">
|
|
% if published_date:
|
|
This unit was originally published on ${published_date}.
|
|
% endif</p>
|
|
</div>
|
|
|
|
<nav class="nav-actions">
|
|
<h3 class="sr">Alert Actions</h3>
|
|
<ul>
|
|
<li class="nav-item">
|
|
<a href="${published_preview_link}" rel="external" class="action action-primary">Preview the published version</a>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="wrapper-mast wrapper">
|
|
<header class="mast has-actions">
|
|
<div class="title">
|
|
<nav class="nav-hierarchy">
|
|
<ul>
|
|
<li class="nav-item">
|
|
<a href="#">Section Name</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a href="#">Subsection Name</a>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
|
|
<h1 class="title-1">Unit Name</h1>
|
|
</div>
|
|
|
|
<nav class="nav-actions">
|
|
<h3 class="sr">Unit Actions</h3>
|
|
<ul>
|
|
<li class="nav-item">
|
|
<a href="#">Preview Unit</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a href="#">View Live</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a href="#">Edit as Draft</a>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
|
|
<div class="metadata status-unit">
|
|
<div class="status-visibility">
|
|
<label for="unit-visibility">Visibility:</label>
|
|
<select class="visibility-select" id="unit-visibility">
|
|
<option value="public">Public</option>
|
|
<option value="private">Private</option>
|
|
</select>
|
|
</div>
|
|
|
|
<div class="status-release">
|
|
<h3 class="label">Will be Released:</h3>
|
|
<p>to <strong>students</strong> on <strong>February 06, 2013 at 12:00 PM</strong> within <a href="">"Introduction to the Course"</a></p>
|
|
</div>
|
|
|
|
<div class="status-url">
|
|
<h3 class="label">Unit URL Title:</h3>
|
|
<p><a href="">/courseware/db0cfa58100f4ca48c614cfb618030d1/7317287782624b9b924bd70ce5ca7b2d</a></p>
|
|
</div>
|
|
</div>
|
|
</header>
|
|
</div>
|
|
|
|
<div class="main-wrapper edit-state-${unit_state}" data-id="${unit_location}">
|
|
<div class="inner-wrapper">
|
|
<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 adding">
|
|
<div class="new-component">
|
|
<h5>Add New Component</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>
|
|
</div>
|
|
% for type, templates in sorted(component_templates.items()):
|
|
<div class="new-component-templates new-component-${type}">
|
|
<h3 class="title">Select <span class="type">${type}</span> component type:</h3>
|
|
|
|
<ul class="new-component-template">
|
|
% for name, location, has_markdown, is_empty in templates:
|
|
|
|
% if is_empty:
|
|
<li class="editor-md empty">
|
|
<a href="#" data-location="${location}">
|
|
<span class="name"><i class="ss-icon ss-symbolicons-block"></i> ${name}</span>
|
|
<span class="editor-indicator">Simple <span class="sr">Editor</span></span>
|
|
</a>
|
|
</li>
|
|
|
|
% elif has_markdown:
|
|
<li class="editor-md">
|
|
<a href="#" data-location="${location}">
|
|
<span class="name"><i class="ss-icon ss-symbolicons-block"></i> ${name}</span>
|
|
<span class="editor-indicator">Simple <span class="sr">Editor</span></span>
|
|
</a>
|
|
</li>
|
|
|
|
% else:
|
|
<li class="editor-manual">
|
|
<a href="#" data-location="${location}">
|
|
<span class="name"><i class="ss-icon ss-symbolicons-block">🔧</i> ${name}</span>
|
|
<span class="editor-indicator">Advanced <span class="sr">Editor</span></span>
|
|
</a>
|
|
</li>
|
|
% endif
|
|
|
|
%endfor
|
|
</ul>
|
|
<a href="#" class="cancel-button">Cancel</a>
|
|
</div>
|
|
% endfor
|
|
</li>
|
|
</ol>
|
|
</article>
|
|
</div>
|
|
|
|
<div class="sidebar">
|
|
<div class="unit-settings window">
|
|
<h4 class="header">Unit Settings</h4>
|
|
<div class="window-contents">
|
|
<div class="row visibility">
|
|
<label class="inline-label">Visibility:</label>
|
|
<select class='visibility-select'>
|
|
<option value="public">Public</option>
|
|
<option value="private">Private</option>
|
|
</select>
|
|
</div>
|
|
<div class="row published-alert">
|
|
<p class="edit-draft-message">This unit has been published. To make changes, you must <a href="#" class="create-draft">edit a draft</a>.</p>
|
|
<p class="publish-draft-message">This is a draft of the published unit. To update the live version, you must <a href="#" class="publish-draft">replace it with this draft</a>.</p>
|
|
</div>
|
|
<div class="row status">
|
|
<p>This unit is scheduled to be released to <strong>students</strong>
|
|
% if release_date is not None:
|
|
on <strong>${release_date}</strong>
|
|
% endif
|
|
with the subsection <a href="${reverse('edit_subsection', kwargs={'location': subsection.location})}">"${subsection.display_name}"</a></p>
|
|
</div>
|
|
<div class="row unit-actions">
|
|
<a href="#" class="delete-draft delete-button">Delete Draft</a>
|
|
<a href="${draft_preview_link}" target="_blank" class="preview-button">Preview</a>
|
|
<a href="${published_preview_link}" target="_blank" class="view-button">View Live</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="window unit-location">
|
|
<h4 class="header">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>
|
|
${units.enum_units(subsection, actions=False, selected=unit.location)}
|
|
</li>
|
|
</ol>
|
|
</li>
|
|
</ol>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</%block>
|