<!-- extend base layout -->
{% extends "appbuilder/base.html" %}
{% import 'appbuilder/general/lib.html' as lib %}

{% block content %}
{{ lib.panel_begin(title) }}

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

{% if related_views %}
        {% for view in related_views %}
                {% call lib.accordion_tag(view.__class__.__name__,view.list_title, False) %}
                                {% set list_widget = view._get_list_widget(filters = {related_fks[0]: filter_value}) %}
                        {{ list_widget.get('list')()|safe }}
                    {% endcall %} 
        {% endfor %}
{% endif %}


{{ lib.panel_end() }}

{% endblock %}
