added manual

This commit is contained in:
joachim lusiardi 2015-03-17 20:57:38 +01:00
parent 0418476d67
commit 5edfbb9e9b
7 changed files with 44 additions and 28 deletions

View File

@ -8,7 +8,6 @@ import time
import db import db
#from db import Db #from db import Db
app = Flask(__name__) app = Flask(__name__)
DATABASE = '/data/rollerverbrauch.db' DATABASE = '/data/rollerverbrauch.db'
@ -102,6 +101,10 @@ def get_pit_stops():
g.data['pitstops'] = data g.data['pitstops'] = data
return render_template('pitstops.html', data=g.data) return render_template('pitstops.html', data=g.data)
@app.route('/manual', methods=['GET'])
def get_manual():
return render_template('manual.html', data=g.data)
@app.route('/statistics', methods=['GET']) @app.route('/statistics', methods=['GET'])
def get_statistics(): def get_statistics():
pitstops = g.db2.getAllPitStops() pitstops = g.db2.getAllPitStops()

View File

@ -17,6 +17,13 @@
</div> </div>
{%- endmacro %} {%- endmacro %}
{% macro navigation() -%}
<li><a href='{{ url_for('create_pit_stop_form') }}'>Create Pitstop</a></li>
<li><a href='{{ url_for('get_statistics') }}'>Statistics</a></li>
<li><a href='{{ url_for('get_services') }}'>Services</a></li>
<li><a href='{{ url_for('get_manual') }}'>Manual</a></li>
{%- endmacro %}
<!doctype html> <!doctype html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang=""> <![endif]--> <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang=""> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang=""> <![endif]--> <!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang=""> <![endif]-->
@ -61,8 +68,7 @@
</div> </div>
<div id="navbar" class="collapse navbar-collapse"> <div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav"> <ul class="nav navbar-nav">
{% block navigation %} {{ navigation() }}
{% endblock %}
</ul> </ul>
</div><!--/.nav-collapse --> </div><!--/.nav-collapse -->
</div> </div>

32
app/templates/manual.html Normal file
View File

@ -0,0 +1,32 @@
{% extends "layout.html" %}
{% macro line(header, cell) -%}
<tr>
<th>
{{ header }}
</th>
<td>
{{ cell }}
</td>
</tr>
{%- endmacro %}
{% block body %}
{{ service_warning() }}
<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 %}

View File

@ -1,12 +1,5 @@
{% extends "layout.html" %} {% extends "layout.html" %}
{% block navigation %}
<li><a href='{{ url_for('create_pit_stop_form') }}' class="active">Create Pitstop</a></li>
<li><a href='{{ url_for('get_statistics') }}'>Statistics</a></li>
<li><a href='{{ url_for('get_services') }}'>Services</a></li>
{% endblock %}
{% block body %} {% block body %}
{{ service_warning() }} {{ service_warning() }}

View File

@ -1,11 +1,5 @@
{% extends "layout.html" %} {% extends "layout.html" %}
{% block navigation %}
<li><a href='{{ url_for('create_pit_stop_form') }}'>Create Pitstop</a></li>
<li><a href='{{ url_for('get_statistics') }}'>Statistics</a></li>
<li><a href='{{ url_for('get_services') }}'>Services</a></li>
{% endblock %}
{% block body %} {% block body %}
{{ service_warning() }} {{ service_warning() }}

View File

@ -1,11 +1,5 @@
{% extends "layout.html" %} {% extends "layout.html" %}
{% block navigation %}
<li><a href='{{ url_for('create_pit_stop_form') }}'>Create Pitstop</a></li>
<li><a href='{{ url_for('get_statistics') }}' class="active">Statistics</a></li>
<li><a href='{{ url_for('get_services') }}' class="active">Services</a></li>
{% endblock %}
{% block body %} {% block body %}
{{ service_warning() }} {{ service_warning() }}

View File

@ -1,11 +1,5 @@
{% extends "layout.html" %} {% extends "layout.html" %}
{% block navigation %}
<li><a href='{{ url_for('create_pit_stop_form') }}'>Create Pitstop</a></li>
<li><a href='{{ url_for('get_statistics') }}' class="active">Statistics</a></li>
<li><a href='{{ url_for('get_services') }}'>Services</a></li>
{% endblock %}
{% block body %} {% block body %}
{{ service_warning() }} {{ service_warning() }}