<div class="col-lg-12">
  <ul id="tabs" class="nav nav-tabs" data-tabs="tabs">
    <br>
    {% for tab in result_tabs %}
      {% if forloop.first %}
        <li class="active">
      {% else %}
        <li>
      {% endif %}
        <a href=#{{tab.id}} data-toggle="tab">
          <b>{{tab.title}}</b>
          {% if tab.show_badge %}
            <span class="badge">{{tab.badge}}</span>
          {% endif %}
        </a>
      </li>
    {% endfor %}
  </ul>

  <div id="my-tab-content" class="tab-content">
    {% for tab in result_tabs %}
      {% if forloop.first %}
        <div class="tab-pane active" id={{tab.id}} style="margin-top: 2em;">
      {% else %}
        <div class="tab-pane" id={{tab.id}} style="margin-top: 2em;">
      {% endif %}

      {% include tab.template with results=tab %}
      </div>
    {% endfor %}
  </div>
</div>
