From 1df9ba3af2e196775d899f82ed371623633dcda2 Mon Sep 17 00:00:00 2001 From: Stefano Date: Tue, 19 Sep 2017 10:57:53 +0200 Subject: [PATCH] Add Ordine details --- server.py | 10 +++++++ templates/dispositivo/details.htm | 2 +- templates/ordine/details.htm | 43 +++++++++++++++++++++++++++++++ 3 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 templates/ordine/details.htm diff --git a/server.py b/server.py index d31c2fa..fa5fcff 100644 --- a/server.py +++ b/server.py @@ -905,6 +905,16 @@ def page_order_show(oid): return redirect(url_for("page_order_list")) +@app.route('/order_details/') +def page_order_details(oid): + if 'username' not in session: + return abort(403) + ordine = Ordine.query.get_or_404(oid) + dispositivi = Dispositivo.query.join(Ordine).filter_by(oid=oid).all() + return render_template("ordine/details.htm", dispositivi=dispositivi, pagetype="order", + user=session.get("username"), ordine=ordine) + + @app.route('/query', methods=['GET', 'POST']) def page_query(): """Pagina delle query manuali: diff --git a/templates/dispositivo/details.htm b/templates/dispositivo/details.htm index 4ed0bcd..2d3a121 100644 --- a/templates/dispositivo/details.htm +++ b/templates/dispositivo/details.htm @@ -39,7 +39,7 @@ Ordine {% endif %} diff --git a/templates/ordine/details.htm b/templates/ordine/details.htm new file mode 100644 index 0000000..11240fa --- /dev/null +++ b/templates/ordine/details.htm @@ -0,0 +1,43 @@ +{% extends "base.htm" %} +{% block title %}Dettagli Ordine • estus{% endblock %} +{% block content %} +

+ Dettagli dell'impiegato +

+ + + Modifica + +{% endblock %} \ No newline at end of file