vehicles can now be deactivated
This commit is contained in:
@@ -33,7 +33,10 @@
|
||||
{% for vehicle in current_user.vehicles %}
|
||||
<tr>
|
||||
<td>
|
||||
{{ vehicle.name }}
|
||||
{{ vehicle.name }}<br />
|
||||
{% if not vehicle.is_active %}
|
||||
(inactive)
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{{ vehicle.pitstops | length }} pitstops<br />
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
{{ form.hidden_tag() }}
|
||||
{{ render_field_with_errors(form.name) }}
|
||||
{{ render_field_with_errors(form.consumables) }}
|
||||
{{ render_field_with_errors(form.is_active) }}
|
||||
{{ render_field_with_errors(form.submit) }}
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
{% macro navigation() -%}
|
||||
{% if current_user.email %}
|
||||
<li><a id='plan_pitstop_link' href='{{ url_for('select_vehicle_for_plan_pitstop') }}'>Plan Pitstop</a></li>
|
||||
<li><a id='new_pitstop_link' href='{{ url_for('select_vehicle_for_new_pitstop') }}'>Create Pitstop</a></li>
|
||||
<li><a id='new_service_link' href='{{ url_for('select_vehicle_for_new_service') }}'>Create Service</a></li>
|
||||
<li><a id='new_service_link' href='{{ url_for('select_vehicle_for_new_regular_cost') }}'>Create Regular Cost</a></li>
|
||||
<li><a id='statistics_limk' href='{{ url_for('get_statistics') }}'>Statistics</a></li>
|
||||
<li><a id='account_link' href='{{ url_for('get_account_page') }}'>Account</a></li>
|
||||
<li><a id='plan_pitstop_link' href='{{ url_for('select_vehicle_for_plan_pitstop') }}'>Plan Pitstop</a></li>
|
||||
{% if current_user.has_role('admin') %}
|
||||
<li><a id='admin_link' href='{{ url_for('get_admin_page') }}'>Admin</a></li>
|
||||
{% endif %}
|
||||
@@ -45,7 +45,7 @@
|
||||
{% endfor %}
|
||||
</select>
|
||||
{% elif field.type == 'BooleanField' %}
|
||||
<input class="form-control" type="checkbox" id="{{ field.id }}" name="{{ field.id }}" value="{{ field.default|none_filter }}" aria-describedby="{{ field.id }}_help" />
|
||||
<input class="form-control" type="checkbox" id="{{ field.id }}" name="{{ field.id }}" value="{{ field.id }}" aria-describedby="{{ field.id }}_help" {% if field.default %}checked{% endif %}/>
|
||||
{% elif field.type == 'StringField' %}
|
||||
<input class="form-control" type="text" id="{{ field.id }}" name="{{ field.id }}" value="{{ field.default|none_filter }}" aria-describedby="{{ field.id }}_help" />
|
||||
{% elif field.type == 'PasswordField' %}
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
{% extends "layout.html" %}
|
||||
|
||||
{% macro line(header, cell) -%}
|
||||
<tr>
|
||||
<th>
|
||||
{{ header }}
|
||||
</th>
|
||||
<td>
|
||||
{{ cell }}
|
||||
</td>
|
||||
</tr>
|
||||
{%- endmacro %}
|
||||
|
||||
{% block body %}
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered table-condensed">
|
||||
{{ line('Reifenluftdruck (vorne)', '1,75 - 2,0 Bar') }}
|
||||
{{ line('Reifenluftdruck (hinten)', '2,0 - 2,25 Bar') }}
|
||||
{{ line('Scheinwerfer', '12V 35/35W HS1-Halogen-Glühlampe') }}
|
||||
{{ line('Standlicht', '12V 5W Glassockel 9mm') }}
|
||||
{{ line('Blinker vorne', '12V 10W Stecksockel 15mm') }}
|
||||
{{ line('Rück-/Bremslicht', '12V/21/5W Stecksockel 15mm') }}
|
||||
{{ line('Blinker hinten', '12V 10W Stecksockel 15mm') }}
|
||||
{{ line('Tankinhalt', 'ca. 6,0 L') }}
|
||||
{{ line('Motoröl', 'SAE 15W40') }}
|
||||
{{ line('Getriebeöl', 'SAE 80/90 (0,12/0,09)') }}
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user