realms-wiki/realms/templates/wiki/index.html

44 lines
1.4 KiB
HTML
Raw Normal View History

{% extends 'layout.html' %}
{% block js %}
<script>
$(document).ready(function() {
2016-04-25 02:11:47 +03:00
$('.data-table').dataTable({'aaSorting': [[0, "asc"], [1, "asc"]]});
});
</script>
{% endblock %}
{% block body %}
2015-12-13 10:59:56 +02:00
<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>
2015-12-13 10:59:56 +02:00
{% if file['dir'] %}
<td><i class="fa fa-folder-open-o"><span style="display:none;">Dir</span></i></td>
2015-12-13 10:59:56 +02:00
<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>
2015-12-12 21:56:10 +02:00
<td><a href="{{ url_for('wiki.page', name=file['name']) }}">{{ file['name'][path|length:] }}</a></td>
2015-12-13 10:59:56 +02:00
{% 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>
2015-12-12 21:56:10 +02:00
{% endblock %}