zip download, and proper config

This commit is contained in:
2018-01-26 14:49:23 +02:00
parent bfaa3467cb
commit 454ea7875c
6 changed files with 119 additions and 32 deletions

View File

@@ -1,6 +1,5 @@
{% extends "layout.html" %}
{% block body %}
<div id=list_title><h1>{{ name }}</h1></div>
<div id=list_menu>
{% if upload %}
<div id=list_upload>
@@ -9,9 +8,6 @@
<input type=file name=file onchange="document.getElementById('list_upload_button').disabled = false;">
<input id="list_upload_button" type=submit value=Upload disabled>
</form>
{% if overwrite == false %}
Overwriting disabled
{% endif %}
</div>
{% else %}
<div id=list_upload>
@@ -19,44 +15,49 @@
<input type=submit value=Upload disabled>
</div>
{% endif %}
<div id=list_public>
<div id=list_info>
Share:
<ul>
{% if public %}
Share is <a href="{{ url_for('index') }}">public</a>
<li>is <a href="{{ url_for('index') }}">public</a>
{% else %}
Share is <a href="{{ url_for('index') }}">unlisted</a>
<li>is <a href="{{ url_for('index') }}">unlisted</a>
{% endif %}
</div>
<div id=list_expire>
{% if expire %}
Share expires {{ expire }}
<li>expires {{ expire }}
{% else %}
Share never expires
<li>never expires
{% endif %}
{% if overwrite == false %}
<li>overwriting is disabled
{% endif %}
<li><a href="{{ url_for('download_zip',name=name) }}">Download as zip</a>
<li><a href="{{ url_for('logout',name=name) }}">Logout</a>
</div>
</div>
<div id=list_logout>
<a href="{{ url_for('logout',name=name) }}">Logout</a> from this share
</div>
</div>
<div class=clear></div>
<div id=list_left>
<div id=list_title><h1>{{ name }}</h1></div>
<table class="sortable" id="list_table">
<thead>
<tr>
<th>Name
<th class=td_right>Size
<th class=td_right>Size(MB)
<th>Mod.Time
</tr>
</thead>
<tbody>
{% for entry in entries %}
<tr>
<td><a href="{{ url_for('download_file', name = name, filename = entry.name) }}">{{ entry.name }}</a>
<td>
{% if direct %}
&nbsp;<a href="{{ url_for('download_direct', name = name, password = entry.token, filename = entry.name ) }}" title="Direct share link">&#x2756;</a>
<a href="{{ url_for('download_direct', name = name, password = entry.token, filename = entry.name ) }}" title="Direct share link" class=direct>&#x2756;</a>
{% endif %}
<a href="{{ url_for('download_file', name = name, filename = entry.name) }}">{{ entry.name }}</a>
<td class=td_right>{{ entry.size|safe }}
<td>{{ entry.mtime|safe }}
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endblock %}