|
@@ -1,5 +1,6 @@
|
|
% link = setdefault("link", "") or ""
|
|
% link = setdefault("link", "") or ""
|
|
% disabled = setdefault("disabled", "") and 'disabled="true"'
|
|
% disabled = setdefault("disabled", "") and 'disabled="true"'
|
|
|
|
+% download_disabled = "" if disabled else 'disabled="true"'
|
|
% mimetype = (setdefault("mimetype", None) is not True and mimetype) or None
|
|
% mimetype = (setdefault("mimetype", None) is not True and mimetype) or None
|
|
<!DOCTYPE html>
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<html>
|
|
@@ -44,7 +45,9 @@ object.text {
|
|
% include('button-style')
|
|
% include('button-style')
|
|
<div class="pure-u-1">
|
|
<div class="pure-u-1">
|
|
<div class="pure-button-group" role="action" style="padding: 1em 0 0;">
|
|
<div class="pure-button-group" role="action" style="padding: 1em 0 0;">
|
|
|
|
+ <button class="button-resize pure-button" type="submit" form="new"> New </button>
|
|
<button class="button-resize pure-button" type="submit" form="upload" {{!disabled}}> Upload </button>
|
|
<button class="button-resize pure-button" type="submit" form="upload" {{!disabled}}> Upload </button>
|
|
|
|
+ <button class="button-resize pure-button" type="submit" form="download" {{!download_disabled}}> Download </button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="pure-u-1">
|
|
<div class="pure-u-1">
|
|
@@ -55,6 +58,7 @@ object.text {
|
|
<div class="pure-u-1">
|
|
<div class="pure-u-1">
|
|
<p><details><summary> Show QR code ...</summary>{{!svg}}</details></p>
|
|
<p><details><summary> Show QR code ...</summary>{{!svg}}</details></p>
|
|
{{!form}}
|
|
{{!form}}
|
|
|
|
+<form id="download" method="get" action="{{link}}"></form>
|
|
% if mimetype and mimetype.startswith('text'):
|
|
% if mimetype and mimetype.startswith('text'):
|
|
<object class="text" data="{{link}}?download=false&mimetype=text/plain" type={{mimetype}}><p>Unable to display {{mimetype}}</p></object>
|
|
<object class="text" data="{{link}}?download=false&mimetype=text/plain" type={{mimetype}}><p>Unable to display {{mimetype}}</p></object>
|
|
% elif mimetype and mimetype.startswith('image'):
|
|
% elif mimetype and mimetype.startswith('image'):
|