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
- {{ disp.ordine.numero_ordine }} + {{ disp.ordine.numero_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