44 lines
No EOL
1.2 KiB
HTML
44 lines
No EOL
1.2 KiB
HTML
{% extends "base.html" %}
|
|
{% block content %}
|
|
{% include 'breadcrumbs.html' %}
|
|
|
|
<h1 class="title is-large butter-title">{{ _('File Viewer') }}</h1>
|
|
<div>
|
|
<table class="table" style="margin: 0 auto">
|
|
<thead>
|
|
<tr>
|
|
<th></th>
|
|
<th>File Name</th>
|
|
<th class="file-viewer-date-modified">Date modified</th>
|
|
<th>Download</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for f in render_files %}
|
|
<tr>
|
|
<td><img src="{{ f.icon_url}}"></td>
|
|
{% if f.is_dir %}
|
|
<td><a href="/{{ request.endpoint}}/{{ f.relative_path}}">{{ f.name}}</a></td>
|
|
{% endif %}
|
|
|
|
{% if f.is_file %}
|
|
<td>{{ f.name}}</td>
|
|
{% endif %}
|
|
|
|
<td class="file-viewer-date-modified">{{ f.last_modified}}</td>
|
|
{% if f.is_file %}
|
|
<td><a href="{{ url_for('serve_file', filepath=f.path) }}">Download</a></td>
|
|
{% endif %}
|
|
{% if f.is_dir %}
|
|
<td></td>
|
|
{% endif %}
|
|
</tr>
|
|
{% endfor %}
|
|
{% if not render_files %}
|
|
<tr>
|
|
<td colspan="4"> <p class="butter-centered has-text-grey">Directory is empty</p></td>
|
|
</tr>
|
|
{% endif %}
|
|
</tbody>
|
|
</table>
|
|
{% endblock %} |