mediasort/templates/index.html

73 lines
2.0 KiB
HTML
Raw Normal View History

2019-08-17 10:25:11 -07:00
{% extends "page.html" %}
2019-08-17 12:50:46 -07:00
{% block toolbar %}
<form action="/" method="post">
<input name="action" type="submit" value="refresh">
<input name="action" type="submit" value="update">
</form>
{% endblock %}
2019-08-17 10:25:11 -07:00
{% block body %}
<div class="torrents">
<h2>Completed</h2>
<table>
<tr>
<th>hash</th>
<th>name</th>
<th>path</th>
<th>dest</th>
<th>status</th>
<th>actions</th>
</tr>
{% for torid, tor in torrents.items() %}{% if tor.is_finished %}
<tr>
<td>{{ torid[0:6] }}</td>
<td>{{ tor.name }}</td>
<td>{{ tor.save_path }}</td>
2019-08-17 12:50:46 -07:00
<td>x</td><!-- TODO pre-computed sort destination for 1 click sorting -->
2019-08-17 10:25:11 -07:00
<td>{{ "complete" if tor.is_finished else "pending" }}</td>
<td>
<a href="/move?thash={{ torid }}"><button>Move</button></a>
<a href="/sort?thash={{ torid }}"><button>Sort</button></a>
</td>
</tr>
{% endif %}{% endfor %}
</table>
<h2>Pending</h2>
<table>
<tr>
<th>hash</th>
<th>name</th>
<th>path</th>
2019-08-17 10:50:31 -07:00
<th>progress</th>
2019-08-17 10:25:11 -07:00
<th>actions</th>
</tr>
{% for torid, tor in torrents.items() %}{% if not tor.is_finished %}
<tr>
<td>{{ torid[0:6] }}</td>
<td>{{ tor.name }}</td>
<td>{{ tor.save_path }}</td>
<td>{{ tor.progress }}%</td>
<td>
<a href="/foo"><button>Resume</button></a>
</td>
</tr>
{% endif %}{% endfor %}
</table>
2019-08-17 12:50:46 -07:00
<h2>Shows</h2>
<table>
<tr>
<th>name</th>
<th>path</th>
<th>sorting</th>
</tr>
{% for show in shows %}
<tr>
<td>{{ show.name }}</td>
<td>{{ show.dir }}</td>
<td>{{ show.mode }}</td>
</tr>
{% endfor %}
</table>
2019-08-17 10:25:11 -07:00
</div>
{% endblock %}