{% if perms.netbox_secrets.view_secret %}
    <button class="btn btn-sm btn-success unlock-secret" secret-id="{{ object.pk }}" title="Unlock Secret"><i
            class="mdi mdi-lock"></i>
    </button>
    <button class="btn btn-sm btn-outline-dark copy-secret d-none" secret-id="{{ object.pk }}" title="Copy to clipboard"
            data-clipboard-target="#secret_{{ object.pk }}"><i class="mdi mdi-content-copy"></i>
    </button>
    <button class="btn btn-sm btn-danger lock-secret d-none" secret-id="{{ object.pk }}" title="Lock Secret">
        <i class="mdi mdi-lock-open"></i>
    </button>
{% endif %}

{% if '/plugins/secrets/' not in request.path %}
    {% if perms.netbox_secrets.change_secret %}
        <a class="btn btn-warning btn-sm" title="Edit Secret"
           href="{% url 'plugins:netbox_secrets:secret_edit' pk=object.pk %}?return_url={{ request.path }}"><i
                class="mdi mdi-pencil" aria-hidden="true"></i></a>
    {% endif %}

    {% if perms.netbox_secrets.delete_secret %}
        <a class="btn btn-danger btn-sm" title="Delete Secret"
           href="{% url 'plugins:netbox_secrets:secret_delete' pk=object.pk %}?return_url={{ request.path }}"><i
                class="mdi mdi-trash-can-outline" aria-hidden="true"></i></a>
    {% endif %}
{% endif %}
