Files
flees/code/templates/list.html

99 lines
3.9 KiB
HTML

{% extends "layout.html" %}
{% block body %}
<div id=list_menu>
{% if 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" class="clear"></div>
</form>
</div>
{% else %}
<div id=list_upload>
<input type=file name=file disabled>
<input type=submit value=Upload disabled>
</div>
{% endif %}
<div id=list_info_toggle_container><span id=list_info_toggle onclick="infoToggle()">Share tools</span></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
title="Upload using an URL"
value="https://..." onclick="clear_text(this.id,'https://...')"><br>
</form>
<input id="list_url_upload_button" type=submit value="Upload URL" onclick="UploadURL()">
<div class="clear"></div>
</div>
<ul>
{% if public %}
<li><span title="Share is publicly visible in the index">Public</span>
{% else %}
<li><span title="Share not listed in the index unless you have logged in">Unlisted</span>
{% endif %}
{% if expire %}
<li><span title="All share operations disabled after the date">Expires {{ expire }}</span>
{% else %}
<li>Never expires
{% endif %}
{% if upload %}
{% if overwrite %}
<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>
{% endif %}
{% else %}
<li><span title="Uploads not enabled for this sahre">No uploading</span>
{% 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><span id=list_script_toggle onclick="scriptToggle()" title="Show command line usage information">Command line info</span>
<li><a href="{{ url_for('index') }}">Return to index</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>
<div id=list_description>{{ description }}</div>
<table class="sortable" id="list_table">
<thead>
<tr>
<th>Name
<th class=td_right>Size(MB)
<th>Mod.Time
</tr>
</thead>
<tbody>
{% for entry in entries %}
<tr>
<td>
{% if direct %}
<a href="{{ url_for('download_direct', name = name, token = entry.token, filename = entry.name ) }}" title="Direct share link" class=direct>&#x2756;</a>
{% endif %}
<a href="{{ url_for('download_gui', name = name, filename = entry.url) }}">{{ entry.name }}</a>
<td class=td_right>{{ entry.size|safe }}
<td>{{ entry.mtime|safe }}
</tr>
{% endfor %}
</tbody>
</table>
</div>
<div id=list_script>
<span id=list_script_toggle class=upper_corner onclick="scriptToggle()">Close X</span>
<div>Command line tools for using the share:</div>
<ul>
{% for entry in script_api %}
<li> {{ entry.doc }} </li>
<div class="code"><span> {{ entry.cmd }} </span></div>
{% endfor %}
</ul>
</div>
<script type="text/javascript">changeTitle("{{ name | safe }}");</script>
{% endblock %}