[IMP] hw_posbox_homepage: Hide "load drivers"

Hide "load drivers" option if no server is set.

TaskID: 1970076

closes odoo/odoo#33364

Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
This commit is contained in:
Antoine Prieels
2019-07-31 14:23:55 +00:00
parent 1e8b9254f5
commit fd0efb0115
2 changed files with 6 additions and 3 deletions
@@ -150,6 +150,7 @@ class IoTboxHomepage(web.Home):
'title': "Odoo's IoT Box - Drivers list",
'breadcrumb': 'Drivers list',
'drivers_list': drivers_list,
'server': get_odoo_server_url()
})
@http.route('/load_drivers', type='http', auth='none', website=True)
@@ -29,9 +29,11 @@
<tr><td>{{ driver }}</td></tr>
{%- endfor %}
</table>
<div style="margin-top: 20px;" class="text-center">
<a id="load_driver_btn" class="btn" href='/load_drivers'>Load drivers</a>
</div>
{% if server %}
<div style="margin-top: 20px;" class="text-center">
<a id="load_driver_btn" class="btn" href='/load_drivers'>Load drivers</a>
</div>
{% endif %}
<div class="text-center font-small" style="margin: 10px auto;">
You can clear the drivers configuration
<form style="display: inline-block;margin-left: 4px;" action='/drivers_clear'>