{% extends 'base/layout.html' %}
{% load buttons %}
{% load helpers %}
{% load perms %}

{% block title %}Settings{% endblock %}

{% block header %}
  <div class="title-container px-3 pb-3">

    {# Title #}
    
    <div id="content-title">
      {% include "slurpit_netbox/logo.html" %}
      {# Center-align title in object-edit views #}
      <h1 class="h2 w-100">Settings</h1>      
    </div>

    {# Controls #}
    {% block controls %}{% endblock controls %}

  </div>
{% endblock header %}

{% block tabs %}
  <ul class="nav nav-tabs px-3">
    <li class="nav-item" role="presentation">
      <a class="nav-link {% if request.GET.tab == 'source' or request.GET.tab is None %}active{% endif %}" href="?tab=source">General</a>
    </li>
    <li class="nav-item" role="presentation">
        <a class="nav-link {% if request.GET.tab == 'data_tabs' %}active{% endif %}" href="?tab=data_tabs">Data tabs</a>
    </li>
  </ul>
{% endblock tabs %}


{% block content-wrapper %}
    <div class="tab-content">
        {% if request.GET.tab == 'source' or request.GET.tab is None %}
            {% include "slurpit_netbox/settings/general.html" %}
        {% elif request.GET.tab == 'data_tabs' %}
            {% include "slurpit_netbox/settings/data_tabs.html" %}
        {% endif %}
  </div> 

{% endblock content-wrapper %}

<footer class="footer container-fluid">
    {% block footer %}
      <div class="row align-items-center justify-content-between mx-0">
  
        <div class="col-sm-12 col-md-auto fs-4 noprint">
          <nav class="nav justify-content-center justify-content-lg-start">
            {% block footer_links %}
              <a type="button" class="nav-link h6" href="https://slurpit.io" target="_blank">
                https://slurpit.io
              </a>
            {% endblock footer_links %}
          </nav>
        </div>
  
        <div class="col-sm-12 col-md-auto text-center text-lg-end text-muted"  >
          <span class="d-block d-md-inline">{% annotated_now %} {% now 'T' %}</span>
          <span class="ms-md-3 d-block d-md-inline">{{ settings.HOSTNAME }} (v{{ settings.VERSION }})</span>
          <span class="ms-md-3 d-block d-md-inline">Slurpit(v{{ settings.PLUGINS_CONFIG.slurpit_netbox.version }})</span>
        </div>
  
      </div>
    {% endblock footer %}
  </footer>
