Skip to content

Commit

Permalink
slice/explore header (#996)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Alanna Scott authored Aug 25, 2016
1 parent 30071ee commit 36a6714
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 30 deletions.
31 changes: 1 addition & 30 deletions caravel/templates/caravel/explore.html
Original file line number Diff line number Diff line change
Expand Up @@ -188,36 +188,7 @@
<div class="panel-title">
<div class="row">
<div class="col-md-6">
{% if slice %}
{% if slice.slice_name %}
<h2>
{{ slice.slice_name }}
<small class="star-edit-icons">
<span class="favstar" obj_id="{{ slice.id }}"></span>
<span>
<a
href="/slicemodelview/edit/{{ slice.id }}"
data-toggle="tooltip"
title="Edit Description"
class="edit-slice-description-icon"
>
{% if slice.description %}
<i
class="fa fa-question-circle-o"
data-toggle="tooltip"
data-placement="bottom"
title="{{ slice.description }}">
</i>
{% endif %}
<i class="fa fa-edit"></i>
</a>
</span>
</small>
</h2>
{% else %}
<h2>untitled</h2>
{% endif %}
{% endif %}
{% include 'caravel/partials/_explore_title.html' %}
</div>
<div class="col-md-6">
<div class="slice-meta-controls pull-right">
Expand Down
30 changes: 30 additions & 0 deletions caravel/templates/caravel/partials/_explore_title.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{% if slice %}
{% if slice.slice_name %}
<h2>
{{ slice.slice_name }}
<small class="star-edit-icons">
<span class="favstar" obj_id="{{ slice.id }}"></span>
<span>
<a
href="/slicemodelview/edit/{{ slice.id }}"
data-toggle="tooltip"
title="Edit Description"
class="edit-slice-description-icon"
>
{% if slice.description %}
<i
class="fa fa-question-circle-o"
data-toggle="tooltip"
data-placement="bottom"
title="{{ slice.description }}">
</i>
{% endif %}
<i class="fa fa-edit"></i>
</a>
</span>
</small>
</h2>
{% endif %}
{% else %}
<h2>[{{ viz.datasource.table_name }}] - untitled</h2>
{% endif %}

0 comments on commit 36a6714

Please sign in to comment.