{% comment %} Recursive template for rendering panel splits and regions. Expects 'split' context variable with: direction, resizable, children[] {% endcomment %} {% load django_cards_tags %}
{% for child in split.children %} {% if not forloop.first and split.resizable %}
{% endif %} {% if child.type == "region" %}
{% with collapse_dir=child.collapse_direction|default:split.direction %} {% if child.menu or child.title %}
{% if child.title %}{{ child.title }}{% endif %} {% if child.menu %}{{ child.menu.render|default:"" }}{% endif %} {% if child.collapsible %} {% endif %}
{% elif child.collapsible %} {% endif %} {% endwith %} {% if child.toolbar %}
{{ child.toolbar.render|default:"" }}
{% endif %} {% if child.tabs %}
{% for tab in child.tabs %} {% if tab.menu %}
{{ tab.menu.render|default:"" }}
{% endif %} {% endfor %}
{% for tab in child.tabs %}
{% for card in tab.cards %} {% show_card card override_card_context=panel_no_header_context %} {% endfor %}
{% endfor %}
{% else %}
{% for card in child.cards %} {% if child.menu or child.title %} {% show_card card override_card_context=panel_no_header_context %} {% else %} {% show_card card override_card_context=panel_card_context %} {% endif %} {% endfor %}
{% endif %}
{% elif child.type == "split" %} {% if child.collapsible %}
{% if child.title %}
{{ child.title }}
{% endif %}
{% include "cards/standard/_panel_split.html" with split=child.split panel_card_context=panel_card_context panel_no_header_context=panel_no_header_context %}
{% else %} {% include "cards/standard/_panel_split.html" with split=child.split panel_card_context=panel_card_context panel_no_header_context=panel_no_header_context %} {% endif %} {% endif %} {% endfor %}