44 lines
1.4 KiB
HTML
44 lines
1.4 KiB
HTML
{% extends 'layout.html' %}
|
|
|
|
{% block js %}
|
|
<script>
|
|
$(document).ready(function() {
|
|
$('.data-table').dataTable({'aaSorting': [[0, "asc"], [1, "asc"]]});
|
|
});
|
|
</script>
|
|
{% endblock %}
|
|
|
|
{% block body %}
|
|
<h2>Index of <a href="{{ url_for('wiki.index') }}">/</a>
|
|
{%- set parts = path.split('/') -%}
|
|
{%- for dir in parts if dir -%}
|
|
<a href="{{ url_for('wiki.index', path='/'.join(parts[:loop.index])) }}">{{ dir }}/</a>
|
|
{%- endfor -%}
|
|
</h2>
|
|
<table class="table table-bordered data-table">
|
|
<thead>
|
|
<tr>
|
|
<th style="width: 1px;"></th>
|
|
<th>Name</th>
|
|
<th class="hidden-xs">Bytes</th>
|
|
<th class="hidden-xs hidden-sm">Created</th>
|
|
<th>Modified</th>
|
|
</tr>
|
|
</thead>
|
|
{% for file in index %}
|
|
<tr>
|
|
{% if file['dir'] %}
|
|
<td><i class="fa fa-folder-open-o"><span style="display:none;">Dir</span></i></td>
|
|
<td><a href="{{ url_for('wiki.index', path=file['name']) }}">{{ file['name'][path|length:] }}</a></td>
|
|
{% else %}
|
|
<td><i class="fa fa-file-text-o"><span style="display:none;">Page</span></i></td>
|
|
<td><a href="{{ url_for('wiki.page', name=file['name']) }}">{{ file['name'][path|length:] }}</a></td>
|
|
{% endif %}
|
|
<td class="hidden-xs">{{ file['size'] }}</td>
|
|
<td>{{ file['ctime']|datetime }}</td>
|
|
<td class="hidden-xs hidden-sm">{{ file['mtime']|datetime }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
{% endblock %}
|