mirror of
https://github.com/journeyman-cc/smeagol.git
synced 2026-04-12 18:05:06 +00:00
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:
parent
b7a7c4cfc8
commit
392a5f82ec
6 changed files with 107 additions and 44 deletions
|
|
@ -131,6 +131,8 @@
|
|||
"Smeagol has been unable to find some of the resources on which it depends,
|
||||
possibly because of misconfiguration or missing environment variables."
|
||||
;; used in sanity check report
|
||||
:sortable "You can sort this table by selecting column headers"
|
||||
;; used for sortable tables
|
||||
:user-lacks-field "User record in the passwd file lacks a field"
|
||||
;; used in sanity check report
|
||||
:username-prompt "Username" ;; text of the username widget prompt on edit user page
|
||||
|
|
|
|||
|
|
@ -1,10 +1,18 @@
|
|||
{% extends "templates/base.html" %}
|
||||
{% block extra-headers %}
|
||||
{% script "/vendor/node_modules/tablesort/dist/tablesort.min.js" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div id="content">
|
||||
<table>
|
||||
<tr>
|
||||
<th/><th>{% i18n edit-col-hdr %}</th><th>{% i18n del-col-hdr %}</th>
|
||||
<p>
|
||||
{% i18n sortable %}
|
||||
</p>
|
||||
<table id="userstable">
|
||||
<tr data-sort-method='none'>
|
||||
<th>{% i18n user-title-prefix %}</th>
|
||||
<th data-sort-method='none'>{% i18n edit-col-hdr %}</th>
|
||||
<th data-sort-method='none'>{% i18n del-col-hdr %}</th>
|
||||
</tr>
|
||||
{% for user in users %}
|
||||
<tr>
|
||||
|
|
@ -13,11 +21,12 @@
|
|||
<td><a href="delete-user?target={{user}}">{% i18n del-col-hdr %} {{user}}</a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
<tr>
|
||||
<td><a href="edit-user">{% i18n add-user-label %}</a></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<tr data-sort-method='none'>
|
||||
<td colspan="3"><a href="edit-user">{% i18n add-user-label %}</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<script>
|
||||
new Tablesort(document.getElementById('userstable'));
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
{% extends "templates/base.html" %}
|
||||
{% block extra-headers %}
|
||||
{% ifequal js-from ":cloudflare" %}
|
||||
{% ifequal js-from ":cdnjs" %}
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/simplemde/1.11.2/simplemde.min.js"></script>
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/simplemde/1.11.2/simplemde.min.css" rel="stylesheet" type="text/css" />
|
||||
{% else %}
|
||||
{% style "/vendor/simplemde/dist/simplemde.min.css" %}
|
||||
{% script "/vendor/simplemde/dist/simplemde.min.js" %}
|
||||
{% style "vendor/simplemde/dist/simplemde.min.css" %}
|
||||
{% script "vendor/simplemde/dist/simplemde.min.js" %}
|
||||
{% endifequal %}
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
|||
|
|
@ -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 %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue