asset_index.html 5.15 KB
Newer Older
1
<%inherit file="base.html" />
Mark Hoeber committed
2
<%def name="online_help_token()"><% return "files" %></%def>
3 4 5 6
<%!
  from django.core.urlresolvers import reverse
  from django.utils.translation import ugettext as _
%>
David Baumgold committed
7
<%block name="title">${_("Files &amp; Uploads")}</%block>
8
<%block name="bodyclass">is-signedin course uploads view-uploads</%block>
9

10 11
<%namespace name='static' file='static_content.html'/>

12
<%block name="header_extras">
13 14 15 16 17
% for template_name in ["asset-library", "asset", "paging-header", "paging-footer"]:
<script type="text/template" id="${template_name}-tpl">
    <%static:include path="js/${template_name}.underscore" />
</script>
% endfor
18 19
</%block>

20
<%block name="jsextra">
21
<script type="text/javascript">
22 23
    require(["jquery", "js/collections/asset", "js/views/assets", "jquery.fileupload"],
            function($, AssetCollection, AssetsView) {
24

25 26 27 28
        var assets = new AssetCollection();
        assets.url = "${asset_callback_url}";
        var assetsView = new AssetsView({collection: assets, el: $('.assets-wrapper')});
        assetsView.render();
29

30 31
    }); // end of require()
</script>
32 33
</%block>

34
<%block name="content">
Brian Talbot committed
35

36
<div class="wrapper-mast wrapper">
37
    <header class="mast has-actions has-subtitle">
38 39 40 41 42 43 44 45 46 47 48 49
        <h1 class="page-header">
            <small class="subtitle">${_("Content")}</small>
            <span class="sr">&gt; </span>${_("Files &amp; Uploads")}
        </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-plus"></i> ${_("Upload New File")}</a>
                </li>
            </ul>
50
        </nav>
51 52
    </header>
</div>
53

54 55
<div class="wrapper-content wrapper">
    <section class="content">
56 57 58 59 60 61
        <article class="content-primary" role="main">
            <div class="assets-wrapper"/>
            <div class="ui-loading">
                <p><span class="spin"><i class="icon-refresh"></i></span> <span class="copy">${_("Loading&hellip;")}</span></p>
            </div>
        </article>
62 63 64

        <aside class="content-supplementary" role="complimentary">
            <div class="bit">
65 66 67 68 69 70 71
                <h3 class="title-3">${_("Adding Files for Your Course")}</h3>

                <p>${_("To add files to use in your course, click {em_start}Upload New File{em_end}. Then follow the prompts to upload a file from your computer.").format(em_start='<strong>', em_end="</strong>")}</p>

                <p>${_("{em_start}Caution{em_end}: edX recommends that you limit the file size to {em_start}10 MB{em_end}. In addition, do not upload video or audio files. You should use a third party service to host multimedia files.").format(em_start='<strong>', em_end="</strong>")}</p>

            	<p>${_("The course image, textbook chapters, and files that appear on your Course Handouts sidebar also appear in this list.")}</p>
72 73
            </div>
            <div class="bit">
74 75 76 77 78 79
                <h3 class="title-3">${_("Using File URLs")}</h3>
                
                <p>${_("Use the {em_start}Embed URL{em_end} value to link to the file or image from a component, a course update, or a course handout.").format(em_start='<strong>', em_end="</strong>")}</p>
                
                <p>${_("Use the {em_start}External URL{em_end} value to reference the file or image only from outside of your course.").format(em_start='<strong>', em_end="</strong>")}</p>
                <p>${_("Click in the Embed URL or External URL column to select the value, then copy it.")}</p>
80
            </div>
81 82
            <div class="bit external-help">
                <a href="${get_online_help_info(online_help_token())['doc_url']}" target="_blank" class="button external-help-button">${_("Learn more about managing files")}</a>
83
            </div>
84

85 86 87 88 89 90 91 92
        </aside>
    </section>
</div>

<div class="upload-modal modal">
    <a href="#" class="close-button"><i class="icon-remove-sign"></i> <span class="sr">${_('close')}</span></a>
    <div class="modal-body">
        <h1 class="title">${_("Upload New File")}</h1>
93
        <p class="file-name">
Julian Arni committed
94
        <div class="progress-bar">
95 96 97 98 99
            <div class="progress-fill"></div>
        </div>
        <div class="embeddable">
            <label>URL:</label>
            <input type="text" class="embeddable-xml-input" value='' readonly>
Julian Arni committed
100
        </div>
cahrens committed
101
        <form class="file-chooser" action="${asset_callback_url}"
102 103 104
              method="post" enctype="multipart/form-data">
            <a href="#" class="choose-file-button">${_("Choose File")}</a>
            <input type="file" class="file-input" name="file" multiple>
Julian Arni committed
105
        </form>
106
    </div>
107
</div>
108

Lyla Fischer committed
109

110
</%block>
111 112 113 114

<%block name="view_alerts">
<!-- alert: save confirmed with close -->
<div class="wrapper wrapper-alert wrapper-alert-confirmation" role="status">
115 116
    <div class="alert confirmation">
        <i class="icon-ok"></i>
117

118 119 120
        <div class="copy">
            <h2 class="title title-3">${_('Your file has been deleted.')}</h2>
        </div>
121

122 123 124 125 126
        <a href="" rel="view" class="action action-alert-close">
            <i class="icon-remove-sign"></i>
            <span class="label">${_('close alert')}</span>
        </a>
    </div>
127 128
</div>
</%block>