{% load helpers %}
<div class="pull-right">
    {% if not termination and perms.circuits.add_circuittermination %}
        <a href="{% url 'circuits:circuittermination_add' circuit=object.pk %}?term_side={{ side }}" class="btn btn-xs btn-success">
            <span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add
        </a>
    {% endif %}
    {% if termination and perms.circuits.change_circuittermination %}
        <a href="{% url 'circuits:circuittermination_edit' pk=termination.pk %}" class="btn btn-xs btn-warning">
            <span class="mdi mdi-pencil" aria-hidden="true"></span> Edit
        </a>
        <a href="{% url 'circuits:circuit_terminations_swap' pk=object.pk %}" class="btn btn-xs btn-primary">
            <span class="mdi mdi-swap-vertical" aria-hidden="true"></span> Swap
        </a>
    {% endif %}
    {% if termination and perms.circuits.delete_circuittermination %}
        <a href="{% url 'circuits:circuittermination_delete' pk=termination.pk %}?return_url={{ object.get_absolute_url }}" class="btn btn-xs btn-danger">
            <span class="mdi mdi-trash-can-outline" aria-hidden="true"></span> Delete
        </a>
    {% endif %}
    {% if termination %}
        <a href="{% url 'circuits:circuittermination' pk=termination.pk %}" class="btn btn-xs btn-default">
            <span class="mdi mdi-information-outline" aria-hidden="true"></span> Detail
        </a>
    {% endif %}
</div>