rollerverbrauch/app/rollerverbrauch/templates/account.html

57 lines
2.1 KiB
HTML
Raw Normal View History

{% extends "layout.html" %}
{% block body %}
2016-04-24 14:09:41 +02:00
<h3>Account management for {{current_user.email}}</h3>
<div class="panel panel-default">
<div class="panel-heading">Password</div>
<div class="panel-body">
<a href='{{ url_for('security.change_password') }}'>
<span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> Change
</a>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">Vehicles</div>
<div class="panel-body">
<a href="{{ url_for('create_vehicle') }}">
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span> create
</a>
</div>
<table class="table table-striped table-bordered">
2016-04-23 11:20:39 +02:00
<tr>
2016-04-24 14:09:41 +02:00
<th>
Vehicle
</th>
<th>
Info
</th>
<th>
Actions
</th>
2016-04-23 11:20:39 +02:00
</tr>
2016-04-24 14:09:41 +02:00
{% for vehicle in current_user.vehicles %}
<tr>
<td style="text-align:center">
{{ vehicle.name }}
</td>
<td style="text-align:center">
{{ vehicle.pitstops | length }} pitstops
</td>
<td style="text-align:center">
<a href="{{ url_for('edit_vehicle', vid=vehicle.id) }}">
<span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> edit
</a>
{% if current_user.vehicles | length > 1 %}
<a href="{{ url_for('delete_vehicle', vid=vehicle.id) }}">
<span class="glyphicon glyphicon-trash" aria-hidden="true"></span> delete
</a>
{% else %}
&nbsp;
{% endif %}
</td>
</tr>
{% endfor %}
</table>
</div>
{% endblock %}