horizon/horizon/templates/horizon/common/_tab_group.html

26 lines
785 B
HTML

{% with tab_group.get_tabs as tabs %}
{% if tabs %}
{# Tab Navigation #}
{% if tab_group.show_single_tab or tabs|length > 1 %}
<ul id="{{ tab_group.get_id }}" {{ tab_group.attr_string|safe }}>
{% for tab in tabs %}
<li {{ tab.attr_string|safe }}>
<a href="?{{ tab_group.param_name }}={{ tab.get_id }}" data-toggle="tab" data-target="#{{ tab.get_id }}" data-loaded="{{ tab.load|yesno:"true,false" }}">{{ tab.name }}</a>
</li>
{% endfor %}
</ul>
{% endif %}
{# Tab Content #}
<div class="tab-content">
{% for tab in tabs %}
<div id="{{ tab.get_id }}" class="tab-pane{% if tab.is_active %} active{% endif %} {% block additional_classes %}{% endblock %}">
{{ tab.render }}
</div>
{% endfor %}
</div>
{% endif %}
{% endwith %}