{% extends 'generic/object.html' %}
{% load helpers %}

{% block extra_tabs %}
    {% if current %}
        <li role="presentation" class="nav-item">
            <a class="nav-link {% if active_tab == 'config' %} active{% endif %}" href="{% url 'plugins:netbox_config_backup:backup_config' pk=object.pk current=current.pk %}">Config</a>
        </li>
    {% else %}
        <li role="presentation" class="nav-item">
            <span class="nav-link disabled">Config</span>
        </li>
    {% endif %}

    {% if current and previous %}
        <li role="presentation" class="nav-item">
            <a class="nav-link {% if active_tab == 'diff' %} active{% endif %}" href="{% url 'plugins:netbox_config_backup:backup_diff' pk=object.pk current=current.pk previous=previous.pk %}">Diff</a>
        </li>
    {% else %}
        <li role="presentation" class="nav-item">
            <span class="nav-link disabled">Diff</span>
        </li>
    {% endif %}
{% endblock %}
