Files
edx-platform/cms/templates/unit.html
2013-01-03 11:21:01 -05:00

436 lines
16 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}'
})
});
$body = $('body');
$body.on('click', '.editor-tabs .tab', setEditorTab);
function setEditorTab(e) {
e.preventDefault();
$('.editor-tabs .current').removeClass('current');
$(this).addClass('current');
switch($(this).attr('data-tab')) {
case 'simple':
currentEditor = simpleEditor;
$(simpleEditor.getWrapperElement()).show();
$(xmlEditor.getWrapperElement()).hide();
$(simpleEditor).focus();
onSimpleEditorUpdate();
break;
case 'xml':
currentEditor = xmlEditor;
$(simpleEditor.getWrapperElement()).hide();
$(xmlEditor.getWrapperElement()).show();
$(xmlEditor).focus();
xmlEditor.refresh();
break;
case 'visual':
currentEditor = visualEditor;
convertHTMLToVisual();
$('table.mceToolbar').show();
$(htmlEditor.getWrapperElement()).hide();
break;
case 'html':
currentEditor = htmlEditor;
$('table.mceToolbar').hide();
$(htmlEditor.getWrapperElement()).show();
$(htmlEditor).focus();
convertVisualToHTML();
htmlEditor.refresh();
break;
}
}
</script>
<script src="/static/js/speed-editor.js"></script>
<script type="text/template" id="asset-library-widget">
<article class="asset-library widget">
<a href="#" class="close-button">
<span class="close-icon"></span>
</a>
<div class="upload-form">
<h1>Upload New File</h1>
<p class="file-name"></p>
<div class="progress-bar">
<div class="progress-fill"></div>
</div>
<div class="embeddable">
<label>Embeddable XML:</label>
<input type="text" class="embeddable-xml-input" value="&lt;img src=&quot;&quot;/&gt;">
</div>
<form class="file-chooser" action="/Giannattasio/313/course/Photoshop_for_Monkeys/upload_asset" method="post" enctype="multipart/form-data">
<a href="#" class="choose-file-button">Choose File</a>
<input type="file" class="file-input" name="file">
</form>
</div>
<header>
<a href="#" class="upload-button">Upload New File</a>
<input type="text" class="search">
</header>
<table class="library-list">
<thead>
<tr>
<th class="thumb-col"></th>
<th class="name-col"><a href="#">Name <span class="sort-icon down"></span></a></th>
<th class="date-col"><a href="#">Date Added</a></th>
<th class="insert-col"></th>
</tr>
</thead>
<tbody id="asset_table_body">
<tr data-id="id">
<td class="thumb-col">
<div class="thumb">
<img src="/">
</div>
</td>
<td class="name-col">
<a href="#" class="filename">ut-logo-350-150.png</a>
<div class="embeddable-xml"></div>
</td>
<td class="date-col">
30 October, 2012 at 07:17 PM
</td>
<td class="insert-col">
<a href="#" class="insert-asset-button" data-markup="<img src='/c4x/Giannattasio/313/asset/ut-logo-350-150.png'/>">Insert</a>
</td>
</tr>
<tr data-id="id">
<td class="thumb-col">
<div class="thumb">
<img src="/">
</div>
</td>
<td class="name-col">
<a href="#" class="filename">ut-logo-350-150.png</a>
<div class="embeddable-xml"></div>
</td>
<td class="date-col">
30 October, 2012 at 07:17 PM
</td>
<td class="insert-col">
<a href="#" class="insert-asset-button" data-markup="<img src='/c4x/Giannattasio/313/asset/ut-logo-350-150.png'/>">Insert</a>
</td>
</tr>
<tr data-id="id">
<td class="thumb-col">
<div class="thumb">
<img src="/">
</div>
</td>
<td class="name-col">
<a href="#" class="filename">ut-logo-350-150.png</a>
<div class="embeddable-xml"></div>
</td>
<td class="date-col">
30 October, 2012 at 07:17 PM
</td>
<td class="insert-col">
<a href="#" class="insert-asset-button" data-markup="<img src='/c4x/Giannattasio/313/asset/ut-logo-350-150.png'/>">Insert</a>
</td>
</tr>
<tr data-id="id">
<td class="thumb-col">
<div class="thumb">
<img src="/">
</div>
</td>
<td class="name-col">
<a href="#" class="filename">ut-logo-350-150.png</a>
<div class="embeddable-xml"></div>
</td>
<td class="date-col">
30 October, 2012 at 07:17 PM
</td>
<td class="insert-col">
<a href="#" class="insert-asset-button" data-markup="<img src='/c4x/Giannattasio/313/asset/ut-logo-350-150.png'/>">Insert</a>
</td>
</tr>
<tr data-id="id">
<td class="thumb-col">
<div class="thumb">
<img src="/">
</div>
</td>
<td class="name-col">
<a href="#" class="filename">ut-logo-350-150.png</a>
<div class="embeddable-xml"></div>
</td>
<td class="date-col">
30 October, 2012 at 07:17 PM
</td>
<td class="insert-col">
<a href="#" class="insert-asset-button" data-markup="<img src='/c4x/Giannattasio/313/asset/ut-logo-350-150.png'/>">Insert</a>
</td>
</tr>
<tr data-id="id">
<td class="thumb-col">
<div class="thumb">
<img src="/">
</div>
</td>
<td class="name-col">
<a href="#" class="filename">ut-logo-350-150.png</a>
<div class="embeddable-xml"></div>
</td>
<td class="date-col">
30 October, 2012 at 07:17 PM
</td>
<td class="insert-col">
<a href="#" class="insert-asset-button" data-markup="<img src='/c4x/Giannattasio/313/asset/ut-logo-350-150.png'/>">Insert</a>
</td>
</tr>
<tr data-id="id">
<td class="thumb-col">
<div class="thumb">
<img src="/">
</div>
</td>
<td class="name-col">
<a href="#" class="filename">ut-logo-350-150.png</a>
<div class="embeddable-xml"></div>
</td>
<td class="date-col">
30 October, 2012 at 07:17 PM
</td>
<td class="insert-col">
<a href="#" class="insert-asset-button" data-markup="<img src='/c4x/Giannattasio/313/asset/ut-logo-350-150.png'/>">Insert</a>
</td>
</tr>
<tr data-id="id">
<td class="thumb-col">
<div class="thumb">
<img src="/">
</div>
</td>
<td class="name-col">
<a href="#" class="filename">ut-logo-350-150.png</a>
<div class="embeddable-xml"></div>
</td>
<td class="date-col">
30 October, 2012 at 07:17 PM
</td>
<td class="insert-col">
<a href="#" class="insert-asset-button" data-markup="<img src='/c4x/Giannattasio/313/asset/ut-logo-350-150.png'/>">Insert</a>
</td>
</tr>
<tr data-id="id">
<td class="thumb-col">
<div class="thumb">
<img src="/">
</div>
</td>
<td class="name-col">
<a href="#" class="filename">ut-logo-350-150.png</a>
<div class="embeddable-xml"></div>
</td>
<td class="date-col">
30 October, 2012 at 07:17 PM
</td>
<td class="insert-col">
<a href="#" class="insert-asset-button" data-markup="<img src='/c4x/Giannattasio/313/asset/ut-logo-350-150.png'/>">Insert</a>
</td>
</tr>
<tr data-id="id">
<td class="thumb-col">
<div class="thumb">
<img src="/">
</div>
</td>
<td class="name-col">
<a href="#" class="filename">ut-logo-350-150.png</a>
<div class="embeddable-xml"></div>
</td>
<td class="date-col">
30 October, 2012 at 07:17 PM
</td>
<td class="insert-col">
<a href="#" class="insert-asset-button" data-markup="<img src='/c4x/Giannattasio/313/asset/ut-logo-350-150.png'/>">Insert</a>
</td>
</tr>
</tbody>
</table>
<nav class="pagination wip-box">
Page:
<ol class="pages">
<li>1</li>
<li><a href="#">2</a></li>
<li><a href="#">3</a></li>
<li><a href="#">4</a></li>
<li><a href="#">5</a></li>
</ol>
<a href="#" class="next">»</a>
</nav>
</article>
</script>
<script type="text/template" id="simple-editor-cheatsheet">
<article class="simple-editor-cheatsheet">
<div class="cheatsheet-wrapper">
<div class="row">
<h6>Multiple Choice</h6>
<div class="col sample">
<img src="/static/img/choice-example.png" />
</div>
<div class="col">
<pre><code>( ) red
( ) green
(x) blue</code></pre>
</div>
</div>
<div class="row">
<h6>Multiple Check</h6>
<div class="col sample">
<img src="/static/img/multi-example.png" />
</div>
<div class="col">
<pre><code>[ ] earth
[ ] wind
[x] water</code></pre>
</div>
</div>
<div class="row">
<h6>String Response</h6>
<div class="col sample">
<img src="/static/img/string-example.png" />
</div>
<div class="col">
<pre><code>= dog</code></pre>
</div>
</div>
<div class="row">
<h6>Numerical Response</h6>
<div class="col sample">
<img src="/static/img/number-example.png" />
</div>
<div class="col">
<pre><code>= 3.14 +- 2%</code></pre>
</div>
</div>
<div class="row">
<h6>Option Response</h6>
<div class="col sample">
<img src="/static/img/select-example.png" />
</div>
<div class="col">
<pre><code>[[wrong, (right)]]</code></pre>
</div>
</div>
</div>
</article>
</script>
<script type="text/template" id="component-actions">
<div class="component-actions">
<a href="#" class="edit-button"><span class="edit-icon white"></span>Edit</a>
<a href="#" class="delete-button"><span class="delete-icon white"></span>Delete</a>
</div>
<a href="#" class="drag-handle"></a>
</script>
</%block>
<%block name="content">
<div class="main-wrapper edit-state-${unit_state}" data-id="${unit_location}">
<div class="inner-wrapper">
<div class="alert editing-draft-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 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>
</li>
</ol>
</article>
</div>
<div class="sidebar">
<div class="unit-settings window">
<h4>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>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>