{##
 # Tabber template
 #}

{% if this.isWrapperVisible() %}
  <h1>{{ t(this.getMainTitle()) }}</h1>
{% endif %}

{% if this.isWrapperVisible() %}
  <div class="tabbed-content-wrapper">
    <div class="tabs-container">
      {% if this.isTabsNavigationVisible() %}
        <div class="page-tabs">
    
          <ul>
            {% for tabPage in this.getTabs() %}
              <li class="tab{% if tabPage.selected %}-current active{% endif %}">
                {%  if this.getTabLinkTemplate(tabPage) %}
                  {% include this.getTabLinkTemplate(tabPage) %}
                {%  else %}
                  <a href="{{ tabPage.url|raw }}">{{ tabPage.title|raw }}</a>
                {%  endif %}
              </li>
            {% endfor %}
          </ul>
    
        </div>
      {% endif %}
      <div class="clear"></div>
  
      <div class="tab-content">
        {% if this.isTemplateOnlyTab() %}
          {% include this.getTabTemplate() %}
        {% endif %}
        {% if this.isWidgetOnlyTab() %}
          {{ widget(widget=this.getTabWidget()) }}
        {% endif %}
        {% if this.isFullWidgetTab() %}
          {{ widget(widget=this.getTabWidget(), template=this.getTabTemplate()) }}
        {% endif %}
        {% if this.isCommonTab() %}
          {% include this.getPageTemplate() %}
        {% endif %}
      </div>
  
    </div>
  </div>
{% endif %}

{% if not this.isWrapperVisible() %}
  <div>
    {% if this.isTemplateOnlyTab() %}
      {% include this.getTabTemplate() %}
    {% endif %}
    {% if this.isWidgetOnlyTab() %}
      {{ widget(widget=this.getTabWidget()) }}
    {% endif %}
    {% if this.isFullWidgetTab() %}
      {{ widget(widget=this.getTabWidget(), template=this.getTabTemplate()) }}
    {% endif %}
    {% if this.isCommonTab() %}
      {% include this.getPageTemplate() %}
    {% endif %}
  </div>
{% endif %}
