asset_index.html 5.23 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 21
<%block name="requirejs">
    require(["js/factories/asset_index"], function (AssetIndexFactory) {
Jim committed
22 23 24 25 26 27
        AssetIndexFactory({
          assetCallbackUrl: "${asset_callback_url}",
          uploadChunkSizeInMBs: ${chunk_size_in_mbs},
          maxFileSizeInMBs: ${max_file_size_in_mbs},
          maxFileSizeRedirectUrl: "${max_file_size_redirect_url}"
        });
28
    });
29 30
</%block>

31
<%block name="content">
Brian Talbot committed
32

33
<div class="wrapper-mast wrapper">
34
    <header class="mast has-actions has-subtitle">
35 36 37 38 39 40 41 42 43
        <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">
44
                    <a href="#" class="button upload-button new-button"><i class="icon fa fa-plus"></i> ${_("Upload New File")}</a>
45 46
                </li>
            </ul>
47
        </nav>
48 49
    </header>
</div>
50

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

60
        <aside class="content-supplementary" role="complementary">
61
            <div class="bit">
62 63 64 65
                <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>

66
                <p>${_("{em_start}Caution{em_end}: {platform_name} 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>", platform_name=settings.PLATFORM_NAME)}</p>
67 68

            	<p>${_("The course image, textbook chapters, and files that appear on your Course Handouts sidebar also appear in this list.")}</p>
69 70
            </div>
            <div class="bit">
71
                <h3 class="title-3">${_("Using File URLs")}</h3>
72

73
                <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>
74

75 76
                <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>
77
            </div>
78 79
            <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>
80
            </div>
81

82 83 84 85 86
        </aside>
    </section>
</div>

<div class="upload-modal modal">
87
    <a href="#" class="close-button"><i class="icon fa fa-times-circle"></i> <span class="sr">${_('close')}</span></a>
88 89
    <div class="modal-body">
        <h1 class="title">${_("Upload New File")}</h1>
Jim committed
90
        <h2>${_("Max per-file size: {max_filesize}MB").format(max_filesize=max_file_size_in_mbs)}</h2>
91
        <p class="file-name">
Julian Arni committed
92
        <div class="progress-bar">
93 94 95 96 97
            <div class="progress-fill"></div>
        </div>
        <div class="embeddable">
            <label>URL:</label>
            <input type="text" class="embeddable-xml-input" value='' readonly>
Julian Arni committed
98
        </div>
cahrens committed
99
        <form class="file-chooser" action="${asset_callback_url}"
100 101 102
              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
103
        </form>
104
    </div>
105
</div>
106

Lyla Fischer committed
107

108
</%block>
109 110 111 112

<%block name="view_alerts">
<!-- alert: save confirmed with close -->
<div class="wrapper wrapper-alert wrapper-alert-confirmation" role="status">
113
    <div class="alert confirmation">
114
        <i class="icon fa fa-check"></i>
115

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

120
        <a href="" rel="view" class="action action-alert-close">
121
            <i class="icon fa fa-times-circle"></i>
122 123 124
            <span class="label">${_('close alert')}</span>
        </a>
    </div>
125 126
</div>
</%block>