mirror of
https://github.com/Steffo99/estus.git
synced 2024-11-21 23:24:18 +00:00
Add Ordine field in device details page
This commit is contained in:
parent
7e716c05fd
commit
089ff60af4
2 changed files with 12 additions and 0 deletions
|
@ -604,6 +604,8 @@ def page_disp_details(did):
|
|||
if 'username' not in session:
|
||||
return abort(403)
|
||||
disp = Dispositivo.query.get_or_404(did)
|
||||
if disp.oid is not None:
|
||||
disp = Dispositivo.query.filter_by(did=did).join(Ordine).first()
|
||||
accessi = Accesso.query.filter_by(did=did).all()
|
||||
return render_template("dispositivo/details.htm", disp=disp, accessi=accessi, pagetype="disp",
|
||||
user=session.get("username"))
|
||||
|
|
|
@ -33,6 +33,16 @@
|
|||
</div>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if disp.oid %}
|
||||
<li class="list-group-item">
|
||||
<h4 class="list-group-item-heading">
|
||||
Ordine
|
||||
</h4>
|
||||
<div class="list-group-item-text">
|
||||
<a href="/ordine_details/{{ disp.ordine.oid }}">{{ disp.ordine.numero_ordine }}</a>
|
||||
</div>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if disp.so != " " %}
|
||||
<li class="list-group-item">
|
||||
<h4 class="list-group-item-heading">
|
||||
|
|
Loading…
Reference in a new issue