this adds a new consumables entity to the database and the possibility in the admin page to add these.
53 lines
1.5 KiB
HTML
53 lines
1.5 KiB
HTML
{% extends "layout.html" %}
|
|
|
|
{% block body %}
|
|
<h3>Admin</h3>
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading">Users</div>
|
|
<div class="panel-body">
|
|
We have {{ users|length }} users so far:
|
|
<ul>
|
|
{% for user in users %}
|
|
<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>
|
|
<th>
|
|
Actions
|
|
</th>
|
|
</tr>
|
|
{% for consumable in consumables %}
|
|
<tr>
|
|
<td>
|
|
{{ consumable.name }}
|
|
</td>
|
|
<td>
|
|
{{ consumable.unit }}
|
|
</td>
|
|
<td>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
{% endblock %}
|