2016-04-21 08:11:57 +02:00
|
|
|
{% extends "layout.html" %}
|
|
|
|
|
|
|
|
{% block body %}
|
2016-05-22 11:47:46 +02:00
|
|
|
<h3>Account management for {{current_user.email}}</h3>
|
2016-04-24 14:09:41 +02:00
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">Password</div>
|
|
|
|
<div class="panel-body">
|
2016-08-06 10:59:20 +02:00
|
|
|
<a href="{{ url_for('security.change_password') }}" id="change_password" class="btn btn-primary " role="button">
|
2016-04-24 14:09:41 +02:00
|
|
|
<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">
|
2016-08-06 10:59:20 +02:00
|
|
|
<a href="{{ url_for('create_vehicle') }}" id="create_vehicle" class="btn btn-primary " role="button">
|
2016-04-24 14:09:41 +02:00
|
|
|
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span> create
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
<table class="table table-striped table-bordered">
|
2016-05-24 06:49:39 +02:00
|
|
|
<tbody>
|
2016-04-24 14:09:41 +02:00
|
|
|
<tr>
|
2016-05-24 06:49:39 +02:00
|
|
|
<th>
|
|
|
|
Vehicle
|
|
|
|
</th>
|
|
|
|
<th>
|
|
|
|
Info
|
|
|
|
</th>
|
|
|
|
<th>
|
|
|
|
Actions
|
|
|
|
</th>
|
2016-04-24 14:09:41 +02:00
|
|
|
</tr>
|
2016-05-24 06:49:39 +02:00
|
|
|
{% for vehicle in current_user.vehicles %}
|
|
|
|
<tr>
|
|
|
|
<td>
|
2021-06-20 08:43:46 +02:00
|
|
|
{{ vehicle.name }}<br />
|
|
|
|
{% if not vehicle.is_active %}
|
|
|
|
(inactive)
|
|
|
|
{% endif %}
|
2016-05-24 06:49:39 +02:00
|
|
|
</td>
|
|
|
|
<td>
|
2016-06-28 23:33:24 +02:00
|
|
|
{{ vehicle.pitstops | length }} pitstops<br />
|
2016-11-06 13:22:54 +01:00
|
|
|
{{ vehicle.services | length }} special expenses<br />
|
2016-06-28 23:33:24 +02:00
|
|
|
{{ vehicle.consumables | length }} consumables
|
2016-05-24 06:49:39 +02:00
|
|
|
</td>
|
|
|
|
<td>
|
2016-11-01 11:19:26 +01:00
|
|
|
<a href="{{ url_for('create_service_for_vehicle', vid=vehicle.id) }}" id="pitstop_{{loop.index}}" class="btn btn-primary " role="button">
|
|
|
|
<span class="glyphicon glyphicon-wrench" aria-hidden="true"></span> add service
|
|
|
|
</a>
|
|
|
|
<a href="{{ url_for('select_consumable_for_new_pitstop', vid=vehicle.id) }}" id="pitstop_{{loop.index}}" class="btn btn-primary " role="button">
|
|
|
|
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span> add pitstop
|
|
|
|
</a>
|
2016-08-06 10:59:20 +02:00
|
|
|
<a href="{{ url_for('edit_vehicle', vid=vehicle.id) }}" id="edit_vehicle_{{loop.index}}" class="btn btn-primary " role="button">
|
2016-05-24 06:49:39 +02:00
|
|
|
<span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> edit
|
|
|
|
</a>
|
|
|
|
{% if current_user.vehicles | length > 1 %}
|
2016-08-06 10:59:20 +02:00
|
|
|
<a href="{{ url_for('delete_vehicle', vid=vehicle.id) }}" id="delete_vehicle_{{loop.index}}" class="btn btn-primary btn-warning " role="button">
|
2016-05-24 06:49:39 +02:00
|
|
|
<span class="glyphicon glyphicon-trash" aria-hidden="true"></span> delete
|
|
|
|
</a>
|
|
|
|
{% else %}
|
|
|
|
|
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
2016-04-24 14:09:41 +02:00
|
|
|
</table>
|
|
|
|
</div>
|
2016-05-24 23:55:58 +02:00
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">Account</div>
|
|
|
|
<div class="panel-body">
|
2016-08-06 10:59:20 +02:00
|
|
|
<a href="{{ url_for('delete_account') }}" id="delete_account" class="btn btn-primary " role="button">
|
2016-05-24 23:55:58 +02:00
|
|
|
<span class="glyphicon glyphicon-remove" aria-hidden="true"></span> Delete
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
2016-04-21 08:11:57 +02:00
|
|
|
{% endblock %}
|