Port to python3

parent c3878fec
......@@ -38,7 +38,9 @@ savegames
config.py
schilder.wsgi
*.png.*
*.schild.*
*.png_*
*.schild_*
venv/
data/cache/
data/pdf/
This diff is collapsed.
<!DOCTYPE html>
<!-- <html xmlns="http://www.w3.org/1999/xhtml" > -->
<html xmlns:py="http://genshi.edgewall.org/">
<html>
<head>
<link rel='stylesheet' type='text/css' href="${ url_for('static', filename='main.css') }"/>
<link rel='stylesheet' type='text/css' href="{{ url_for('static', filename='main.css') }}"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Schildergenerator</title>
</head>
<body>
<py:with vars="messages = get_flashed_messages(with_categories=True)">
<ul class="flashes" py:if="messages">
<li class="${ category }" py:for="category,message in messages" tabindex="0">${ message }</li>
</ul>
</py:with>
<a href="${ url_for('index') }">Liste der fertigen Schilder</a>
<form method="post" action="${ url_for('create') }" enctype="multipart/form-data">
<div class="box">
<label for="form:template">Wähle eine TeX-Vorlage:</label>
<ul py:attrs="{'class':'collapsed'} if defined('form') else {}">
<li py:for="textemplate in templates">
<input type="radio" name="textemplate" id="tpl:${textemplate}" value="${textemplate}" py:attrs="{'checked':'checked', 'onfocus':'this.parentElement.parentElement.className=\'\';'} if defined('form') and textemplate == form.textemplate else {}"/>
<label for="tpl:${textemplate}"><img src="${ url_for('tplthumbnail', tplname=textemplate, maxgeometry=80) }" alt="${textemplate}" title="${textemplate}"/></label>
</li>
<li class="onlywhencollapsed">
<button onclick="this.parentElement.parentElement.className=''; return false;" >Auswahl anzeigen</button>
</li>
</ul>
</div><br/>
<div class="box">
<label for="form:headline">Überschrift</label>
<textarea name="headline" id="form:headline" cols="35" rows="5"><py:if test="defined('form')">${form.headline}</py:if></textarea>
</div>
<div class="box">
<label for="form:text">Text</label>
<select name="markup">
<option value="latex" py:attrs="{'selected':'True'} if defined('form') and form.markup == 'latex' else {}">LaTeX</option>
<option value="rst" py:attrs="{'selected':'True'} if not defined('form') or form.markup == 'rst' or form.markup == '' else {}">Wiki (reStructuredText)</option>
</select>
<textarea name="text" id="form:text" cols="35" rows="5"><py:if test="defined('form')">${form.text}</py:if></textarea>
</div><br/>
<div class="box imageselect">
<label for="form:img">Wähle ein Bild (falls auf Vorlage anwendbar):</label>
<ul>
<li>
<input type="radio" name="img" id="img--none" value="__none" py:attrs="{'checked':'checked'} if defined('form') and form.img == '__none' else {}"/>
<label for="img--none">Kein Bild</label>
</li>
<li>
<input type="radio" name="img" id="img--upload" value="__upload"/>
<input type="file" name="imgupload"/>
<label for="img--upload">Bild hochladen (${', '.join(imageextensions)})</label>
</li>
</ul>
<ul py:attrs="{'class':'collapsed'} if defined('form') else {}">
<li py:for="img in images">
<input type="radio" name="img" id="img:${img}" value="${img}" py:attrs="{'checked':'checked', 'onfocus':'this.parentElement.parentElement.className=\'\';'} if defined('form') and form.img == img else {}"/>
<label for="img:${img}"><img src="${ url_for('thumbnail', imgname=img, maxgeometry=100) }" alt="${img}" title="${img}"/></label>
</li>
<li class="onlywhencollapsed">
<button onclick="this.parentElement.parentElement.className=''; return false;" >Auswahl anzeigen</button>
</li>
</ul>
</div>
{% with messages = get_flashed_messages(with_categories=True) %}
{% if messages %}
<ul class="flashes">
{% for category, message in messages %}
<li class="{{ category }}" tabindex="0">{{ message }}</li>
{% endfor %}
</ul>
{% endif %}
{% endwith %}
<a href="{{ url_for('index') }}">Liste der fertigen Schilder</a>
<form method="post" action="{{ url_for('create') }}" enctype="multipart/form-data">
<div class="box">
<label for="form:template">Wähle eine TeX-Vorlage:</label>
<ul class="{% if form %}collapsed{% endif %}">
{% for textemplate in templates %}
<li>
<input type="radio" name="textemplate" id="tpl:{{textemplate}}" value="{{textemplate}}" {% if form and textemplate == form.textemplate %} checked="checked" onfocus="this.parentElement.parentElement.className='';" {% endif %} />
<label for="tpl:{{textemplate}}"><img src="{{ url_for('tplthumbnail', tplname=textemplate, maxgeometry=80) }}" alt="{{textemplate}}" title="{{textemplate}}"/></label>
</li>
<li class="onlywhencollapsed">
<button onclick="this.parentElement.parentElement.className=''; return false;" >Auswahl anzeigen</button>
</li>
{% endfor %}
</ul>
</div><br/>
<div class="box">
<label for="form:headline">Überschrift</label>
<textarea name="headline" id="form:headline" cols="35" rows="5">{% if form %}{{form.headline}}{% endif %}</textarea>
</div>
<div class="box">
<label for="form:text">Text</label>
<select name="markup">
<option value="latex" {% if form and form.markup == "latex" %}selected{% endif %}>LaTeX</option>
<option value="rst" {% if form and (form.markup == "rst" or form.markup == "") %}selected{% endif %}>Wiki (reStructuredText)</option>
</select>
<textarea name="text" id="form:text" cols="35" rows="5">{% if form %}{{form.text}}{% endif %}</textarea>
</div>
<br/>
<div class="box imageselect">
<label for="form:img">Wähle ein Bild (falls auf Vorlage anwendbar):</label>
<ul>
<li>
<input type="radio" name="img" id="img--none" value="__none" {% if form and form.img == "__none" %}checked{% endif %}/>
<label for="img--none">Kein Bild</label>
</li>
<li>
<input type="radio" name="img" id="img--upload" value="__upload"/>
<input type="file" name="imgupload"/>
<label for="img--upload">Bild hochladen ({{', '.join(imageextensions)}})</label>
</li>
</ul>
<ul {% if form %}class="collapsed"{% endif %}>
{% for img in images %}
<li>
<input type="radio" name="img" id="img:{{img}}" value="{{img}}" {% if form and form.img == img %}checked="checked" onfocus="this.parentElement.parentElement.className='';"{% endif %} />
<label for="img:{{img}}">
<img src="{{ url_for('thumbnail', imgname=img, maxgeometry=100) }}" alt="{{img}}" title="{{img}}"/>
</label>
</li>
{% endfor %}
<li class="onlywhencollapsed">
<button onclick="this.parentElement.parentElement.className=''; return false;" >Auswahl anzeigen</button>
</li>
</ul>
</div>
<br/>
<div class="box">
{% if form and form.filename|length > 5 %}
<input type="hidden" name="filename" value="{{form.filename}}"/>
<input id="form:reusefilename" type="checkbox" name="reusefilename"/>
<label for="form:reusefilename">Überschreibe bisherige Version von {{form.filename}}.</label>
<br/>
<div class="box">
<py:if test="defined('form') and len(form.filename) > 5">
<input type="hidden" name="filename" value="${form.filename}"/>
<input id="form:reusefilename" type="checkbox" name="reusefilename"/>
<label for="form:reusefilename">Überschreibe bisherige Version von ${form.filename}.</label>
<br/>
</py:if>
<input type="submit" value="Schild erstellen"/>
</div>
</form>
{% endif %}
<input type="submit" value="Schild erstellen"/>
</div>
</form>
</body>
</html>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:py="http://genshi.edgewall.org/">
<html>
<head>
<link rel='stylesheet' type='text/css' href="${ url_for('static', filename='main.css') }"/>
<link rel='stylesheet' type='text/css' href="{{ url_for('static', filename='main.css') }}"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Schildergenerator</title>
</head>
<body>
<py:with vars="messages = get_flashed_messages(with_categories=True)">
<ul class="flashes" py:if="messages">
<li class="${ category }" py:for="category,message in messages" tabindex="0">${ message }</li>
</ul>
</py:with>
{% with messages = get_flashed_messages(with_categories=True) %}
{% if messages %}
<ul class="flashes">
{% for category, message in messages %}
<li class="{{ category }}" tabindex="0">{{ message }}</li>
{% endfor %}
</ul>
{% endif %}
{% endwith %}
<a href="${ url_for('edit') }">Neues Schild</a>
<a href="{{ url_for('edit') }}">Neues Schild</a>
<py:if test="defined('files')">
<form method="POST" action="${ url_for('deletelist') }">
<ul>
<li py:for="file in files">
<input id="form:${file}" type="checkbox" name="filenames" value="${file}"/>
<a href="${ url_for('schild', filename=file) }" title="${file}">
<img src="${ url_for('pdfthumbnail', pdfname=file+'.pdf', maxgeometry=150) }"/>
</a>
</li>
</ul>
<input type="submit" value="Ausgewählte Schilder löschen"/>
</form>
</py:if>
{% if files %}
<form method="POST" action="{{ url_for('deletelist') }}">
<ul>
{% for file in files %}
<li>
<input id="form:{{file}}" type="checkbox" name="filenames" value="{{file}}"/>
<a href="{{ url_for('schild', filename=file) }}" title="{{file}}">
<img src="{{ url_for('pdfthumbnail', pdfname=file+'.pdf', maxgeometry=150) }}"/>
</a>
</li>
{% endfor %}
</ul>
<input type="submit" value="Ausgewählte Schilder löschen"/>
</form>
{% endif %}
</body>
</html>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:py="http://genshi.edgewall.org/">
<html>
<head>
<link rel='stylesheet' type='text/css' href="${ url_for('static', filename='main.css') }"/>
<link rel='stylesheet' type='text/css' href="{{ url_for('static', filename='main.css') }}"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Schildergenerator</title>
</head>
<body>
<a href="${ url_for('index') }">Liste der Schilder</a>
<a href="${ url_for('edit') }">Neues Schild</a>
<py:with vars="messages = get_flashed_messages(with_categories=True)">
<ul class="flashes" py:if="messages">
<li class="${ category }" py:for="category,message in messages">${ message }</li>
</ul>
</py:with>
<img class="bigpreview" src="${ url_for('pdfthumbnail', pdfname=filename+'.pdf', maxgeometry=300) }"/>
<form method="post" action="${ url_for('printout') }">
<input type="hidden" name="filename" value="${filename + '.pdf'}" />
<a href="{{ url_for('index') }}">Liste der Schilder</a>
<a href="{{ url_for('edit') }}">Neues Schild</a>
{% with messages = get_flashed_messages(with_categories=True) %}
{% if messages %}
<ul class="flashes">
{% for category, message in messages %}
<li class="{{ category }}">{{ message }}</li>
{% endfor %}
</ul>
{% endif %}
{% endwith %}
<img class="bigpreview" src="{{ url_for('pdfthumbnail', pdfname=filename+'.pdf', maxgeometry=300) }}"/>
<form method="post" action="{{ url_for('printout') }}">
<input type="hidden" name="filename" value="{{filename + '.pdf'}}" />
<select name="copies">
<option py:for="x in range(1,11)" value="${x}" label="${x} Kopien">${x} Kopien</option>
{% for x in range(1, 11) %}
<option value="{{x}}" label="{{x}} Kopien">{{x}} Kopien</option>
{% endfor %}
</select>
<select name="printer">
<option py:for="pr in printer" value="${pr}" label="Drucker ${pr}">Drucker ${pr}</option>
</select>
{% for pr in printer %}
<option value="{{pr}}" label="Drucker {{pr}}">Drucker {{pr}}</option>
{% endfor %}
</select>
<input type="submit" value="Schild drucken" />
</form>
<a href="${ url_for('pdfdownload', pdfname=filename + '.pdf') }">Schild als PDF herunterladen.</a>
<a href="${ url_for('edit_one', filename=filename) }">Schild bearbeiten/als Vorlage verwenden.</a>
<form method="post" action="${ url_for('delete') }">
<input type="hidden" name="filename" value="${filename}" />
<a href="{{ url_for('pdfdownload', pdfname=filename + '.pdf') }}">Schild als PDF herunterladen.</a>
<a href="{{ url_for('edit_one', filename=filename) }}">Schild bearbeiten/als Vorlage verwenden.</a>
<form method="post" action="{{ url_for('delete') }}">
<input type="hidden" name="filename" value="{{filename}}" />
<input type="submit" value="Schild löschen" />
</form>
</body>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment