add loot interfaces

This commit is contained in:
2019-09-08 03:50:55 +03:00
parent 9bd51d9267
commit 2ea8fed183
11 changed files with 264 additions and 19 deletions

56
templates/loot.jinja2 Normal file
View File

@ -0,0 +1,56 @@
<html lang="en">
<head>
<title>Loot</title>
{% include "style.jinja2" %}
</head>
<body>
<h2>Loot</h2>
{% include "error.jinja2" %}
{% include "search_line.jinja2" %}
<form action="/loot" method="post">
<select name="player" id="player" title="player">
{% for player in players %}
<option>{{ player|e }}</option>
{% endfor %}
</select>
<select name="piece" id="piece" title="piece">
{% for piece in pieces %}
<option>{{ piece|e }}</option>
{% endfor %}
</select>
<input name="is_tome" id="is_tome" title="is tome" type="checkbox"/>
<input name="action" id="action" type="hidden" value="add"/>
<button>add</button>
</form>
<table id="result">
<tr>
<th>player</th>
<th>piece</th>
<th>is_tome</th>
<th></th>
</tr>
{% for item in items %}
<tr>
<td class="include_search">{{ item.player|e }}</td>
<td class="include_search">{{ item.piece|e }}</td>
<td>{{ item.is_tome|e }}</td>
<td>
<form action="/loot" method="post">
<input name="action" id="action" type="hidden" value="remove"/>
<button>remove</button>
</form>
</td>
</tr>
{% endfor %}
</table>
{% include "export_to_csv.jinja2" %}
{% include "root.jinja2" %}
{% include "search.jinja2" %}
</body>
</html>