splitted services
This commit is contained in:
parent
d6807857cb
commit
895736eaf1
|
@ -1,18 +1,11 @@
|
|||
{% extends "layout.html" %}
|
||||
|
||||
{% block body %}
|
||||
{{ service_warning() }}
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered table-condensed">
|
||||
{% macro print_service_header() -%}
|
||||
<tr>
|
||||
<th>
|
||||
Odometer<br />
|
||||
(planned)
|
||||
</th>
|
||||
<th>
|
||||
Odometer<br />
|
||||
(done)
|
||||
(planned<br />
|
||||
done)
|
||||
</th>
|
||||
<th>
|
||||
Date<br />
|
||||
|
@ -22,12 +15,12 @@
|
|||
Tasks
|
||||
</th>
|
||||
</tr>
|
||||
{% for service in data['services'] %}
|
||||
{%- endmacro %}
|
||||
|
||||
{% macro print_service(service) -%}
|
||||
<tr class='pitstop'>
|
||||
<td>
|
||||
{{service.odometer_planned}} km
|
||||
</td>
|
||||
<td>
|
||||
{{service.odometer_planned}} km<br />
|
||||
{% if service.odometer_done %}
|
||||
{{service.odometer_done}} km
|
||||
{% else %}
|
||||
|
@ -48,7 +41,51 @@
|
|||
{% endfor %}
|
||||
</td>
|
||||
</tr>
|
||||
{%- endmacro %}
|
||||
|
||||
{% block body %}
|
||||
{{ service_warning() }}
|
||||
<div class="tabbable tabs-left">
|
||||
<ul class="nav nav-tabs" id="tabs">
|
||||
<li>
|
||||
<a href="#tab1" data-toggle="tab">Inspektionen</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#tab2" data-toggle="tab">Inspektionen (erledigt)</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div id="tab1" class="tab-pane active">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered table-condensed">
|
||||
{{ print_service_header() }}
|
||||
{% for service in data['services'] | reverse() %}
|
||||
{% if not service.odometer_done %}
|
||||
{{ print_service(service) }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div id="tab2" class="tab-pane">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered table-condensed">
|
||||
{{ print_service_header() }}
|
||||
{% for service in data['services'] %}
|
||||
{% if service.odometer_done %}
|
||||
{{ print_service(service) }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function ($) {
|
||||
console.log('ready')
|
||||
$('.nav-tabs').tab();
|
||||
});
|
||||
</script>
|
||||
|
||||
{% endblock %}
|
Loading…
Reference in New Issue