Files
edx-platform/cms/templates/textbooks.html
2013-07-09 19:16:05 -04:00

87 lines
3.2 KiB
HTML

<%inherit file="base.html" />
<%namespace name='static' file='static_content.html'/>
<%! import json %>
<%! from django.utils.translation import ugettext as _ %>
<%block name="title">${_("Textbooks")}</%block>
<%block name="bodyclass">is-signedin course textbooks</%block>
<%block name="header_extras">
<script type="text/template" id="new-textbook-tpl">
<%static:include path="js/textbook-edit.underscore" />
</script>
<script type="text/template" id="show-textbook-tpl">
<%static:include path="js/textbook-show.underscore" />
</script>
<script type="text/template" id="new-chapter-tpl">
<%static:include path="js/chapter.underscore" />
</script>
<script type="text/template" id="no-textbooks-tpl">
<%static:include path="js/no-textbooks.underscore" />
</script>
<script type="text/template" id="upload-dialog-tpl">
<%static:include path="js/upload-dialog.underscore" />
</script>
</%block>
<%block name="jsextra">
<script type="text/javascript" src="${static.url('js/vendor/backbone-associations-min.js')}"></script>
<script type="text/javascript" src="${static.url('js/models/textbook.js')}"></script>
<script type="text/javascript" src="${static.url('js/views/textbook.js')}"></script>
<script type="text/javascript">
window.UPLOAD_ASSET_CALLBACK_URL = "${upload_asset_callback_url}"
window.TEXTBOOK_URL = "${textbook_url}"
window.section = new CMS.Models.Section({
id: "${course.id}",
name: "${course.display_name_with_default | h}"
});
var textbooks = new CMS.Collections.TextbookSet(${json.dumps(course.pdf_textbooks)}, {parse: true});
var tbView = new CMS.Views.ListTextbooks({collection: textbooks});
$(function() {
$(".content-primary").append(tbView.render().el);
$(".nav-actions .new-button").click(function(e) {
tbView.addOne(e);
})
})
</script>
</%block>
<%block name="content">
<div class="wrapper-mast wrapper">
<header class="mast has-actions has-subtitle">
<h1 class="page-header">
<small class="subtitle">${_("Course Content")}</small>
<span class="sr">&gt; </span>${_("Textbooks")}
</h1>
<nav class="nav-actions">
<h3 class="sr">${_("Page Actions")}</h3>
<ul>
<li class="nav-item">
<a href="#" class="button upload-button new-button"><i class="icon-cloud-upload "></i> ${_("New Textbook")}</a>
</li>
</ul>
</nav>
</header>
</div>
<div class="wrapper-content wrapper">
<section class="content">
<article class="content-primary" role="main">
</article>
<aside class="content-supplementary" role="complimentary">
<div class="bit">
<h3 class="title-3">${_("Why should I break my text into chapters?")}</h3>
<p>${_("It's best practice to break your course's textbook into multiple chapters to reduce loading times for students. Breaking up textbooks into chapters can also help students more easily find topic-based information.")}</p>
</div>
<div class="bit">
<h3 class="title-3">${_("What if my book isn't divided into chapters?")}</h3>
<p>${_("If you haven't broken your textbook into chapters, you can upload the entire text as Chapter 1.")}</p>
</div>
</aside>
</section>
</div>
</%block>