These changes implement STUD-813. The commit consists of the following logical changes: - a REST API has been implemented for a course's assets - the page itself now fetches the assets client-side - the Backbone.Paginator library is used to support pagination - the AssetCollection has been refactored to extend Backbone.Paginator.requestPager so that it can be paged - an abstract PagingView class has been added to generalize the communication with a paging REST API - the AssetsView has been reimplemented to extend PagingView - two new child views have been added: - PagingHeader: the paging controls above the list of assets - PagingFooter: the paging controls below the assets
33 lines
1.2 KiB
Plaintext
33 lines
1.2 KiB
Plaintext
<div class="asset-library">
|
|
|
|
<div id="asset-paging-header"></div>
|
|
|
|
<table>
|
|
<caption class="sr"><%= gettext("List of uploaded files and assets in this course") %></caption>
|
|
<colgroup>
|
|
<col class="thumb-cols" />
|
|
<col class="name-cols" />
|
|
<col class="date-cols" />
|
|
<col class="embed-cols" />
|
|
<col class="actions-cols" />
|
|
</colgroup>
|
|
<thead>
|
|
<tr>
|
|
<th class="thumb-col"><%= gettext("Preview") %></th>
|
|
<th class="name-col"><%= gettext("Name") %></th>
|
|
<th class="date-col"><span class="current-sort" href=""><%= gettext("Date Added") %></span></th>
|
|
<th class="embed-col"><%= gettext("URL") %></th>
|
|
<th class="actions-col"><span class="sr"><%= gettext("Actions") %></span></th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody id="asset-table-body" ></tbody>
|
|
</table>
|
|
|
|
<div id="asset-paging-footer"></div>
|
|
|
|
</div>
|
|
<div class="no-asset-content">
|
|
<p><%= gettext("You haven't added any assets to this course yet.") %> <a href="#" class="button upload-button new-button"><i class="icon-plus"></i><%= gettext("Upload your first asset") %></a></p>
|
|
</div>
|