too much stuff. uploader script from template. dropdown menu for tools

This commit is contained in:
Ville Rantanen
2018-03-15 12:14:32 +02:00
parent 6724ac2557
commit 86c855285c
6 changed files with 340 additions and 75 deletions

View File

@@ -2,45 +2,56 @@
{% block body %}
<div id=list_menu>
{% if upload %}
<div id=list_upload>
<div id=list_upload>
<form id="upload_form" action={{ url_for('upload') }} method=post enctype=multipart/form-data>
<input id="list_upload_name" type=hidden name=name value="{{ name|safe }}" />
<input type=hidden name=from_gui value="true" />
<input id="list_upload_select" type=file name=file
onchange="FileSelectHandler(event)" multiple="multiple"><br>
<input id="list_upload_button" type=submit value=Upload>
<div id="progress"></div>
<div id="progress" class="clear"></div>
</form>
</div>
</div>
{% else %}
<div id=list_upload>
<input type=file name=file disabled>
<input type=submit value=Upload disabled>
</div>
</div>
{% endif %}
<div id=list_info>
Share:
<ul>
<div id=list_info_toggle onclick="infoToggle()">Share tools</div>
<div id=list_info>
<div id=list_url_upload>
<form id="url_upload_form" action={{ url_for('upload_url') }} method=post>
<input id="list_upload_name" type=hidden name=name value="{{ name|safe }}" />
<input type=hidden name=from_gui value="true" />
<input id="list_url_upload_text" type=text name=url
value="https://..." onclick="clear_text(this.id,'https://...')"><br>
<input id="list_url_upload_button" type=submit value="Upload URL">
<div class="clear"></div>
</form>
</div>
<ul>
{% if public %}
<li>is <a href="{{ url_for('index') }}" title="Share is publicly visible in the index">public</a>
<li>is <a href="{{ url_for('index') }}" title="Share is publicly visible in the index">public</a>
{% else %}
<li>is <a href="{{ url_for('index') }}" title="Share not listed in the index unless you have logged in">unlisted</a>
<li>is <a href="{{ url_for('index') }}" title="Share not listed in the index unless you have logged in">unlisted</a>
{% endif %}
{% if expire %}
<li><span title="All share operations disabled after the date">expires {{ expire }}</span>
<li><span title="All share operations disabled after the date">expires {{ expire }}</span>
{% else %}
<li>never expires
<li>never expires
{% endif %}
{% if upload %}
{% if overwrite %}
<li><span title="Uploaded files with existing names are overwritten">uploads overwrite</span>
<li><span title="Uploaded files with existing names are overwritten">uploads overwrite</span>
{% else %}
<li><span title="Uploaded files with existing names are versioned">uploads versioned</span>
<li><span title="Uploaded files with existing names are versioned">uploads versioned</span>
{% endif %}
{% endif %}
<li><a href="{{ url_for('download_zip',name=name) }}" title="Download all the files as one ZIP file. Total size of files must be less than {{ g.max_zip_size }} Mb">Download as zip</a>
<li><a href="{{ url_for('logout',name=name) }}">Logout</a>
</div>
<li><a href="{{ url_for('download_zip',name=name) }}" title="Download all the files as one ZIP file. Total size of files must be less than {{ g.max_zip_size }} Mb">Download as zip</a>
<li><a href="{{ url_for('logout',name=name) }}">Logout</a>
</div>
</div>
<div id=list_left>
<div id=list_title><h1>{{ name }}</h1></div>