rollerverbrauch/app/templates/admin.html

67 lines
2.4 KiB
HTML
Raw Permalink Normal View History

{% extends "layout.html" %}
{% block body %}
<h3>Admin</h3>
2016-05-24 06:49:39 +02:00
<div class="panel panel-default">
<div class="panel-heading">Users</div>
2016-05-24 06:49:39 +02:00
<div class="panel-body">
We have {{ users|length }} users so far:
2016-05-24 06:49:39 +02:00
<ul>
{% for user in users %}
2016-05-24 06:49:39 +02:00
<li>{{user.email}}</li>
{% endfor %}
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">Consumables</div>
<div class="panel-body">
<a href="{{ url_for('create_consumable') }}" class="btn btn-primary " role="button">
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span> create
</a>
</div>
<table class="table table-striped table-bordered">
<tbody>
<tr>
<th>
Name
</th>
<th>
Unit
</th>
2016-06-28 23:33:24 +02:00
<th>
Used by
</th>
<th>
Actions
</th>
</tr>
{% for consumable in consumables %}
<tr>
<td>
{{ consumable.name }}
</td>
<td>
{{ consumable.unit }}
</td>
<td>
2016-06-28 23:33:24 +02:00
{{ consumable.vehicles | length }} vehicles
</td>
<td>
{% if not consumable.in_use %}
<a href="{{ url_for('delete_consumable', cid=consumable.id) }}" class="btn btn-primary btn-warning " role="button">
<span class="glyphicon glyphicon-trash" aria-hidden="true"></span> delete
</a>
{% endif %}
2016-06-28 23:33:24 +02:00
<a href="{{ url_for('edit_consumable', cid=consumable.id) }}" class="btn btn-primary " role="button">
<span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> edit
</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endblock %}