asset_index.html 3.62 KB
Newer Older
1 2 3
<%inherit file="base.html" />
<%! from django.core.urlresolvers import reverse %>
<%block name="bodyclass">assets</%block>
4
<%block name="title">Courseware Assets</%block>
5

6 7 8 9 10 11
<%namespace name='static' file='static_content.html'/>

<%block name="jsextra">
<script src="${static.url('js/vendor/mustache.js')}"></script>
</%block>

12 13
<%block name="content">
  
14 15 16 17 18 19 20 21 22 23
  <script type="text/template" id="new-asset-element">
    <tr data-id='{{url}}'>
      <td class="thumb-col">
        <div class="thumb">
          {{#thumb_url}}
          <img src="{{thumb_url}}">
          {{/thumb_url}}
        </div>
      </td>
      <td class="name-col">
24
        <a data-tooltip="Open/download this file" href="{{url}}" class="filename">{{displayname}}</a>
25 26 27 28 29 30
        <div class="embeddable-xml"></div>
      </td>
      <td class="date-col">
        {{uploadDate}}
      </td>
      <td class="embed-col">
31
        <input type="text" class="embeddable-xml-input" value='{{url}}' disabled>
32 33 34 35
      </td>
    </tr>
  </script>

36 37
  <div class="main-wrapper">
    <div class="inner-wrapper">
38
      <div class="page-actions">
39 40 41 42
        <a href="#" class="upload-button new-button">
          <span class="upload-icon"></span>Upload New Asset
        </a>
        <input type="text" class="asset-search-input search wip-box" placeholder="search assets" style="display:none"/>
43
      </div>
44
      <article class="asset-library">
45 46 47 48 49 50
        <table>
          <thead>
            <tr>
              <th class="thumb-col"></th>
              <th class="name-col">Name</th>
              <th class="date-col">Date Added</th>
51
              <th class="embed-col">URL</th>
52 53
            </tr>
          </thead>
54
          <tbody id="asset_table_body">
55
          % for asset in assets:
56
            <tr data-id="${asset['url']}">
57
              <td class="thumb-col">
58 59 60 61 62
                <div class="thumb">
                  % if asset['thumb_url'] is not None:
                  <img src="${asset['thumb_url']}">
                  % endif
                </div>
63 64
              </td>
              <td class="name-col">
65
                <a data-tooltip="Open/download this file" href="${asset['url']}" class="filename">${asset['displayname']}</a>
Lyla Fischer committed
66
                <div class="embeddable-xml"></div>
67 68
              </td>
              <td class="date-col">
69
                ${asset['uploadDate']}
70 71
              </td>
              <td class="embed-col">
72
                <input type="text" class="embeddable-xml-input" value="${asset['url']}" disabled>
73 74
              </td>
            </tr>
75
          % endfor
76 77
          </tbody>
        </table>
Lyla Fischer committed
78
        <nav class="pagination wip-box">
79 80 81 82 83 84 85 86 87 88
          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>
89 90 91 92
      </article>
    </div>
  </div>

93 94 95 96 97 98 99 100
  <div class="upload-modal modal">
  	<a href="#" class="close-button"><span class="close-icon"></span></a>
		<div class="modal-body">
			<h1>Upload New File</h1>
			<p class="file-name"></a>
			<div class="progress-bar">
				<div class="progress-fill"></div>
			</div>
101
      <div class="embeddable">
102 103
        <label>URL:</label>
        <input type="text" class="embeddable-xml-input" value='' disabled>
104
      </div>
Lyla Fischer committed
105 106
			<form class="file-chooser" action="${upload_asset_callback_url}"
                                method="post" enctype="multipart/form-data">
107
				<a href="#" class="choose-file-button">Choose File</a>
Lyla Fischer committed
108 109
				<input type="file" class="file-input" name="file">
			</form>
110 111 112 113 114
		</div>
	</div>

	<div class="modal-cover"></div>

Lyla Fischer committed
115

116
</%block>