summaryrefslogtreecommitdiff
path: root/horizon/templates/horizon/common/_tab_group.html
blob: 8f3aa47fe39e606e030700c30fc26e2dbf91fb61 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{% 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 %}