Merge branch 'issue_5_more_consumable_material' into pycharm
Conflicts: app/__init__.py app/rollerverbrauch/templates/createPitStopForm.html app/rollerverbrauch/templates/newPitStopForm.html app/rollerverbrauch/templates/selectVehice.html app/rollerverbrauch/templates/selectVehicle.html app/templates/newPitStopForm.html app/templates/selectVehice.html
This commit is contained in:
@@ -1,18 +1,66 @@
|
||||
{% extends "layout.html" %}
|
||||
|
||||
{% block body %}
|
||||
<div class="col-md-2" ></div>
|
||||
<div class="col-md-8">
|
||||
<h3>Admin</h3>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Users</div>
|
||||
<div class="panel-body">
|
||||
<h3>Admin</h3>
|
||||
We have {{ data.users|length }} users so far:
|
||||
We have {{ users|length }} users so far:
|
||||
<ul>
|
||||
{% for user in data.users %}
|
||||
{% for user in users %}
|
||||
<li>{{user.email}}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</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>
|
||||
Used by
|
||||
</th>
|
||||
<th>
|
||||
Actions
|
||||
</th>
|
||||
</tr>
|
||||
{% for consumable in consumables %}
|
||||
<tr>
|
||||
<td>
|
||||
{{ consumable.name }}
|
||||
</td>
|
||||
<td>
|
||||
{{ consumable.unit }}
|
||||
</td>
|
||||
<td>
|
||||
{{ 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 %}
|
||||
<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 %}
|
||||
|
||||
Reference in New Issue
Block a user