diff --git a/caravel/templates/caravel/basic.html b/caravel/templates/caravel/basic.html index 2ca5f5c29a8b..7934b088c55a 100644 --- a/caravel/templates/caravel/basic.html +++ b/caravel/templates/caravel/basic.html @@ -21,7 +21,7 @@ {% block navbar %} - {% if not viz or viz.request.args.get("standalone") != "true" %} + {% if not standalone_mode %}
{% include 'appbuilder/navbar.html' %}
diff --git a/caravel/templates/caravel/dashboard.html b/caravel/templates/caravel/dashboard.html index f559e672e6af..f6c65fcd21be 100644 --- a/caravel/templates/caravel/dashboard.html +++ b/caravel/templates/caravel/dashboard.html @@ -71,7 +71,9 @@
Choose how frequent should the dashboard refresh
-
+ {% if not standalone_mode %} +
+ {% endif %}
@@ -83,31 +85,33 @@

-
-
- - - - - - - - - + {% if not standalone_mode %} +
+
+ + + + + + + + + +
-
+ {% endif %}
diff --git a/caravel/views.py b/caravel/views.py index 033a52d241dd..d2cd5e969203 100755 --- a/caravel/views.py +++ b/caravel/views.py @@ -1346,7 +1346,7 @@ def explore(self, datasource_type, datasource_id): headers=generate_download_headers("csv"), mimetype="application/csv") elif request.args.get("standalone") == "true": - return self.render_template("caravel/standalone.html", viz=viz_obj) + return self.render_template("caravel/standalone.html", viz=viz_obj, standalone_mode=True) else: return self.render_template( "caravel/explore.html", @@ -1796,12 +1796,14 @@ def dashboard(**kwargs): # noqa dash_edit_perm = check_ownership(dash, raise_if_false=False) dash_save_perm = \ dash_edit_perm and self.can_access('can_save_dash', 'Caravel') + standalone = request.args.get("standalone") == "true" return self.render_template( "caravel/dashboard.html", dashboard=dash, user_id=g.user.get_id(), templates=templates, dash_save_perm=dash_save_perm, - dash_edit_perm=dash_edit_perm) + dash_edit_perm=dash_edit_perm, + standalone_mode=standalone) @has_access @expose("/sync_druid/", methods=['POST'])