2014-10-10 00:30:34 +03:00
|
|
|
{% extends 'layout.html' %}
|
|
|
|
|
|
|
|
{% block js %}
|
|
|
|
<script>
|
|
|
|
$(document).ready(function() {
|
2015-12-13 19:59:04 +02:00
|
|
|
$('.data-table').dataTable({'aaSorting': [[0, "asc"], [1, "asc"]]});
|
2014-10-10 00:30:34 +03:00
|
|
|
});
|
|
|
|
</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>
|
2014-10-10 00:30:34 +03:00
|
|
|
<table class="table table-bordered data-table">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
2015-12-13 19:59:04 +02:00
|
|
|
<th style="width: 1px;"></th>
|
2014-10-10 00:30:34 +03:00
|
|
|
<th>Name</th>
|
|
|
|
<th class="hidden-xs">Bytes</th>
|
2015-12-13 19:59:04 +02:00
|
|
|
<th class="hidden-xs hidden-sm">Created</th>
|
|
|
|
<th>Modified</th>
|
2014-10-10 00:30:34 +03:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
{% for file in index %}
|
|
|
|
<tr>
|
2015-12-13 10:59:56 +02:00
|
|
|
{% if file['dir'] %}
|
2015-12-13 19:59:04 +02:00
|
|
|
<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 %}
|
2015-12-13 19:59:04 +02:00
|
|
|
<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 %}
|
2014-10-10 00:30:34 +03:00
|
|
|
<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 %}
|