Support getting indexs of subdirs

This commit is contained in:
Chase Sterling 2015-12-12 14:56:10 -05:00
parent 853630646e
commit c70480c917
2 changed files with 11 additions and 5 deletions

View file

@ -9,6 +9,7 @@ $(document).ready(function() {
{% endblock %}
{% block body %}
<h2>Index of /{{ path }}</h2>
<table class="table table-bordered data-table">
<thead>
<tr>
@ -20,11 +21,11 @@ $(document).ready(function() {
</thead>
{% for file in index %}
<tr>
<td><a href="{{ url_for('wiki.page', name=file['name']) }}">{{ file['name'] }}</a></td>
<td><a href="{{ url_for('wiki.page', name=file['name']) }}">{{ file['name'][path|length:] }}</a></td>
<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 %}
{% endblock %}