{% extends "appbuilder/base.html" %}
{% import 'appbuilder/general/lib.html' as lib %}

{% block content %}

{{ lib.panel_begin(title) }}
	{% block list_search scoped %}
		{% call lib.accordion_tag("accordion1",_("Search"), False) %}
			{{ widgets.get('search')()|safe }} 
		{% endcall %}
	{% endblock %}

    <div class="well well-sm">
    <label>{{ group_by_label }}:</label>
    {% for group_by in group_by_columns %}
        <a href="{{url_for('.chart',group_by=group_by)}}" class="btn btn-sm btn-primary">
        {% if label_columns[group_by] %}
            {{ label_columns[group_by] }}
        {% else %}
            {{ group_by }}
        {% endif %}
        </a>
    {% endfor %}
    </div>

    {{ widgets.get('chart')()|safe }}

{{ lib.panel_end() }}
{% endblock %}
