From 7b5239e5487ada81a63c5b36c8dfb8b35e06541e Mon Sep 17 00:00:00 2001 From: Korina Cordero Date: Wed, 19 Feb 2020 05:22:57 +0000 Subject: [PATCH] Add checking for dashboard_enable. #334 --- config/packages/twig.yaml | 1 + templates/home.html.twig | 14 +++++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/config/packages/twig.yaml b/config/packages/twig.yaml index d912927a..cb90797b 100644 --- a/config/packages/twig.yaml +++ b/config/packages/twig.yaml @@ -6,3 +6,4 @@ twig: gmaps_api_key: "%env(GMAPS_API_KEY)%" mqtt_host: "%env(MQTT_WS_HOST)%" mqtt_port: "%env(MQTT_WS_PORT)%" + dashboard_enable: "%env(DASHBOARD_ENABLE)%" diff --git a/templates/home.html.twig b/templates/home.html.twig index 975b0ea5..b7ac2c24 100644 --- a/templates/home.html.twig +++ b/templates/home.html.twig @@ -15,7 +15,9 @@ -{{ include('map/' ~ map_js_file) }} +{% if dashboard_enable == 'true' %} + {{ include('map/' ~ map_js_file) }} +{% endif %} {% endblock %}