{% extends 'generic/_base.html' %}
{% load buttons %}
{% load helpers %}
{% load i18n %}
{% load render_table from django_tables2 %}
{% block title %}{% trans "Settings" %}{% endblock %}

{% block controls %}
<div class="btn-list">
    {% block control-buttons %}
    {% url 'plugins:netbox_diode_plugin:settings_edit' as edit_url %}
    {% include "buttons/edit.html" with url=edit_url %}
    {% endblock control-buttons %}
</div>
{% endblock controls %}

{% block content %}
<div class="row mb-3">
    <div class="col">
        <div class="card">
            <table class="table table-hover attr-table">
                <tr>
                    <th scope="row">{% trans "Diode target" %}</th>
                    <td>{{ diode_target }}</td>
                </tr>
                {% if has_branching_plugin %}
                <tr>
                    <th scope="row">{% trans "Branch" %}</th>
                    <td>
                        {% if branch %}
                            <a href="{% url 'plugins:netbox_branching:branch' pk=branch.pk %}">{{ branch.name }}</a>
                        {% else %}
                            Main (default)
                        {% endif %}
                    </td>
                </tr>
                {% endif %}
            </table>
        </div>
    </div>
</div>
{% endblock content %}
