can add pitstops to vehicles nows
This commit is contained in:
@@ -1,18 +1,56 @@
|
||||
{% extends "layout.html" %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Account management for {{current_user.email}}</h1>
|
||||
|
||||
<a href='{{ url_for('security.change_password') }}'>Change password</a>
|
||||
|
||||
<a href="{{ url_for('create_vehicle') }}">create</a>
|
||||
<table>
|
||||
{% for vehicle in current_user.vehicles %}
|
||||
<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">
|
||||
<tr>
|
||||
<td>{{vehicle.name}}</td>
|
||||
<td><a href="{{ url_for('edit_vehicle', vid=vehicle.id) }}">edit</a></td>
|
||||
<td><a href="{{ url_for('delete_vehicle', vid=vehicle.id) }}">delete</a></td>
|
||||
<th>
|
||||
Vehicle
|
||||
</th>
|
||||
<th>
|
||||
Info
|
||||
</th>
|
||||
<th>
|
||||
Actions
|
||||
</th>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% 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 %}
|
||||
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user