Added ids to important elements
This commit is contained in:
parent
d393f19b47
commit
4b73699750
|
@ -5,7 +5,7 @@
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">Password</div>
|
<div class="panel-heading">Password</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<a href='{{ url_for('security.change_password') }}' class="btn btn-primary " role="button">
|
<a href="{{ url_for('security.change_password') }}" id="change_password" class="btn btn-primary " role="button">
|
||||||
<span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> Change
|
<span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> Change
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -13,7 +13,7 @@
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">Vehicles</div>
|
<div class="panel-heading">Vehicles</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<a href="{{ url_for('create_vehicle') }}" class="btn btn-primary " role="button">
|
<a href="{{ url_for('create_vehicle') }}" id="create_vehicle" class="btn btn-primary " role="button">
|
||||||
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span> create
|
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span> create
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -40,11 +40,11 @@
|
||||||
{{ vehicle.consumables | length }} consumables
|
{{ vehicle.consumables | length }} consumables
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ url_for('edit_vehicle', vid=vehicle.id) }}" class="btn btn-primary " role="button">
|
<a href="{{ url_for('edit_vehicle', vid=vehicle.id) }}" id="edit_vehicle_{{loop.index}}" class="btn btn-primary " role="button">
|
||||||
<span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> edit
|
<span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> edit
|
||||||
</a>
|
</a>
|
||||||
{% if current_user.vehicles | length > 1 %}
|
{% if current_user.vehicles | length > 1 %}
|
||||||
<a href="{{ url_for('delete_vehicle', vid=vehicle.id) }}" class="btn btn-primary btn-warning " role="button">
|
<a href="{{ url_for('delete_vehicle', vid=vehicle.id) }}" id="delete_vehicle_{{loop.index}}" class="btn btn-primary btn-warning " role="button">
|
||||||
<span class="glyphicon glyphicon-trash" aria-hidden="true"></span> delete
|
<span class="glyphicon glyphicon-trash" aria-hidden="true"></span> delete
|
||||||
</a>
|
</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
|
@ -59,7 +59,7 @@
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">Account</div>
|
<div class="panel-heading">Account</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<a href='{{ url_for('delete_account') }}' class="btn btn-primary " role="button">
|
<a href="{{ url_for('delete_account') }}" id="delete_account" class="btn btn-primary " role="button">
|
||||||
<span class="glyphicon glyphicon-remove" aria-hidden="true"></span> Delete
|
<span class="glyphicon glyphicon-remove" aria-hidden="true"></span> Delete
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">Consumables</div>
|
<div class="panel-heading">Consumables</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<a href="{{ url_for('create_consumable') }}" class="btn btn-primary " role="button">
|
<a href="{{ url_for('create_consumable') }}" id="create_consumable" class="btn btn-primary " role="button">
|
||||||
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span> create
|
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span> create
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -38,22 +38,16 @@
|
||||||
</tr>
|
</tr>
|
||||||
{% for consumable in consumables %}
|
{% for consumable in consumables %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td id="name_{{loop.index}}">{{ consumable.name }}</td>
|
||||||
{{ consumable.name }}
|
<td id="unit_{{loop.index}}">{{ consumable.unit }}</td>
|
||||||
</td>
|
<td id="count_{{loop.index}}">{{ consumable.vehicles | length }} vehicles</td>
|
||||||
<td>
|
|
||||||
{{ consumable.unit }}
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
{{ consumable.vehicles | length }} vehicles
|
|
||||||
</td>
|
|
||||||
<td>
|
<td>
|
||||||
{% if not consumable.in_use %}
|
{% if not consumable.in_use %}
|
||||||
<a href="{{ url_for('delete_consumable', cid=consumable.id) }}" class="btn btn-primary btn-warning " role="button">
|
<a href="{{ url_for('delete_consumable', cid=consumable.id) }}" id="delete_consumable{{loop.index}}" class="btn btn-primary btn-warning " role="button">
|
||||||
<span class="glyphicon glyphicon-trash" aria-hidden="true"></span> delete
|
<span class="glyphicon glyphicon-trash" aria-hidden="true"></span> delete
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a href="{{ url_for('edit_consumable', cid=consumable.id) }}" class="btn btn-primary " role="button">
|
<a href="{{ url_for('edit_consumable', cid=consumable.id) }}" id="edit_consumable{{loop.index}}" class="btn btn-primary " role="button">
|
||||||
<span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> edit
|
<span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> edit
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<h3>Edit consumable </h3>
|
<h3>Edit consumable</h3>
|
||||||
<form class='form-horizontal' method="POST">
|
<form class='form-horizontal' method="POST">
|
||||||
{{ form.hidden_tag() }}
|
{{ form.hidden_tag() }}
|
||||||
{{ render_field_with_errors(form.name) }}
|
{{ render_field_with_errors(form.name) }}
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
{% macro navigation() -%}
|
{% macro navigation() -%}
|
||||||
{% if current_user.email %}
|
{% if current_user.email %}
|
||||||
<li><a href='{{ url_for('select_vehicle_for_new_pitstop') }}'>Create Pitstop</a></li>
|
<li><a id='new_pitstop_link' href='{{ url_for('select_vehicle_for_new_pitstop') }}'>Create Pitstop</a></li>
|
||||||
<li><a href='{{ url_for('get_statistics') }}'>Statistics</a></li>
|
<li><a id='statistics_limk' href='{{ url_for('get_statistics') }}'>Statistics</a></li>
|
||||||
<li><a href='{{ url_for('get_account_page') }}'>Account</a></li>
|
<li><a id='account_link' href='{{ url_for('get_account_page') }}'>Account</a></li>
|
||||||
{% if current_user.has_role('admin') %}
|
{% if current_user.has_role('admin') %}
|
||||||
<li><a href='{{ url_for('get_admin_page') }}'>Admin</a></li>
|
<li><a id='admin_link' href='{{ url_for('get_admin_page') }}'>Admin</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<li><a href='{{ url_for('security.logout') }}'>Logout</a></li>
|
<li><a id='logout_link' href='{{ url_for('security.logout') }}'>Logout</a></li>
|
||||||
{% else %}
|
{% else %}
|
||||||
<li><a href='{{ url_for('security.login') }}'>Login</a></li>
|
<li><a id='login_link' href='{{ url_for('security.login') }}'>Login</a></li>
|
||||||
<li><a href='{{ url_for('security.register') }}'>Register</a></li>
|
<li><a id='register_link' href='{{ url_for('security.register') }}'>Register</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{%- endmacro %}
|
{%- endmacro %}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue