These are the genuine improvements out of today

1. Table sorting
2. Fixed edit page title bugette
3. SimpleMDE working again.
This commit is contained in:
Simon Brooke 2020-02-14 16:08:17 +00:00
parent b7a7c4cfc8
commit 392a5f82ec
6 changed files with 107 additions and 44 deletions

View file

@ -1,4 +1,10 @@
{% extends "templates/base.html" %}
{% block extra-headers %}
{% script "/vendor/node_modules/tablesort/dist/tablesort.min.js" %}
{% script "/vendor/node_modules/tablesort/dist/sorts/tablesort.number.min.js" %}
{% script "/vendor/node_modules/tablesort/dist/sorts/tablesort.date.min.js" %}
{% script "/vendor/node_modules/tablesort/dist/sorts/tablesort.monthname.min.js" %}
{% endblock %}
{% block content %}
<div id="content" class="list-uploads">
@ -9,12 +15,15 @@
<input name="search" id="search" type="text" value="{{search}}" required/>
</p>
</form>
<table>
<tr>
<p>
{% i18n sortable %}
</p>
<table id="uploads">
<tr data-sort-method='none'>
<th>Name</th>
<th>Uploaded</th>
<th>Type this</th>
<th>To get this</th>
<th data-sort-method='none'>To get this</th>
</tr>
{% for entry in files %}
<tr>
@ -26,9 +35,11 @@
<td>
{% if entry.is-image %} <img src="{{entry.resource}}" alt="{{entry.name|capitalize}}"/> {% else %} <a href="{{entry.resource}}">link</a> {% endif %}
</td>
</tr>
{% endfor %}
</table>
</div>
<script>
new Tablesort(document.getElementById('uploads'));
</script>
{% endblock %}