From 36a6714e9e5a57480cf9bf86a9fa4ccd65ca1c54 Mon Sep 17 00:00:00 2001 From: Alanna Scott Date: Thu, 25 Aug 2016 11:22:11 -0700 Subject: [PATCH] slice/explore header (#996) * move slice header to partial, show datasource in slice title area if no slice is saved * change partial name, and use same styling as slice title * use jinja style guide spacing rule * use [datasource] - untitled --- caravel/templates/caravel/explore.html | 31 +------------------ .../caravel/partials/_explore_title.html | 30 ++++++++++++++++++ 2 files changed, 31 insertions(+), 30 deletions(-) create mode 100644 caravel/templates/caravel/partials/_explore_title.html diff --git a/caravel/templates/caravel/explore.html b/caravel/templates/caravel/explore.html index 52da875b4eb09..ec1010c45b10d 100644 --- a/caravel/templates/caravel/explore.html +++ b/caravel/templates/caravel/explore.html @@ -188,36 +188,7 @@
- {% if slice %} - {% if slice.slice_name %} -

- {{ slice.slice_name }} - - - - - {% if slice.description %} - - - {% endif %} - - - - -

- {% else %} -

untitled

- {% endif %} - {% endif %} + {% include 'caravel/partials/_explore_title.html' %}
diff --git a/caravel/templates/caravel/partials/_explore_title.html b/caravel/templates/caravel/partials/_explore_title.html new file mode 100644 index 0000000000000..9f9767ce47e4c --- /dev/null +++ b/caravel/templates/caravel/partials/_explore_title.html @@ -0,0 +1,30 @@ +{% if slice %} + {% if slice.slice_name %} +

+ {{ slice.slice_name }} + + + + + {% if slice.description %} + + + {% endif %} + + + + +

+ {% endif %} +{% else %} +

[{{ viz.datasource.table_name }}] - untitled

+{% endif %}