{% extends "layouts/charts_base.html" %}

{% block chart_body %}
<div class="row">
    <div class="col-md-12">
        <h2 class="lead text-center">
            <small>
                <a href="{{ url_for('jsondash.dashboard') }}" class="btn-xs btn-default pull-left">
                    <span class="fa fa-angle-left"></span> Back
                </a>
            </small>
            {{ view.name }}
            <small>
                {% include "partials/dashboard-options.html" %}
            </small>
        </h2>
        <div class="{{ 'collapse' if view.modules|length else '' }}" id="edit-view-container">
            {% if not view.modules|length %}
                <div class="alert alert-warning text-center">
                    <p>
                        It looks like this dashboard has no modules - add some below.
                    </p>
                </div>
            {% endif %}
            {% include "partials/form-view.html" %}
        </div>
        {% include "partials/form-json.html" %}
        <div class="layout" id="view-builder">
            <div id="container"></div>
        </div>
    </div>
</div>
{% include "partials/edit-data-modal.html" %}
{% endblock %}
