mediasort/templates/sortform.html

57 lines
2.1 KiB
HTML

{% extends "page.html" %}
{% block toolbar %}
<a class="nav-item is-active" href="/home">Back</a>
{% endblock %}
{% block main %}
<form action="/sort" method="post">
<div class="col col-12 lg-col-6">
<header class="flex items-center py1 border-bottom">
<h1 class="m0">Files <span class="font-size-smaller">{{ torrent.name }} - {{ torrent.hash }}</span></h1>
</header>
<section class="mb3">
<ul>
{% for f in torrent.files %}
<li>{{ f.path }} - {{ f.size }} B</li> <!-- TODO nice size formatting-->
{% endfor %}
</ul>
</section>
</div>
<div class="col col-12 lg-col-6">
<header class="flex items-center py1 border-bottom">
<h1 class="m0">Destination</h1>
<input type="submit" value="Save" class="btn btn-danger ml-auto rounded">
</header>
<section class="mb3">
<input type="hidden" name="tkey" value="{{ tkey }}">
<table>
<tr>
<th></th>
<th>show</th>
<th>season</th>
<th>library</th>
<th>score</th>
</tr>
{% for row in matches %}
<tr>
<td>
<input type="radio" name="dest" value="{{row.dest.dir}}" {% if loop.index == 1 %}checked="checked"{%endif %}/>
</td>
<td>{{ row.dest.dir }}</td>
<td>{{ row.subdest }}</td>
<td>{{ row.dest.root }}</td>
<td>{{ row.score }}</td>
</tr>
{% endfor %}
</table>
<br />
<div class="right">
{% if score > 0 %}<a href="/sort?tkey={{ tkey }}&score={{ score // 2 }}#bottom">show more (S={{ score }}%)</a>{% endif %}
{{ matches|len }}
</div>
</section>
</div>
</form>
{% endblock %}