{% extends 'generic/object_children.html' %}
{% block bulk_controls %}
    {% if content_type == "authorized_key" %}
        {% if model == "device" %}
            <div class="btn-group" role="group">
                <a href="{% url 'plugins:netbox_authorized_keys:authorizedkeydevice_add' device_id=object.id %}?return_url={{ return_url }}"
                   class="btn btn-info">
                    <i class="mdi mdi-plus-thick" aria-hidden="true"></i>Bulk-Add Authorized Key
                </a>
            </div>
            <div class="btn-group" role="group">
                <a href="{% url 'plugins:netbox_authorized_keys:authorizedkeydevice_remove' device_id=object.id %}?return_url={{ return_url }}"
                   class="btn btn-danger">
                    <i class="mdi mdi-trash-can-outline" aria-hidden="true"></i>Bulk-Remove Authorized Key
                </a>
            </div>
        {% elif model == "virtual_machine" %}
            <div class="btn-group" role="group">
                <a href="{% url 'plugins:netbox_authorized_keys:authorizedkeyvirtualmachine_add' virtual_machine_id=object.id %}?return_url={{ return_url }}"
                   class="btn btn-info">
                    <i class="mdi mdi-plus-thick" aria-hidden="true"></i>Bulk-Add Authorized Key
                </a>
            </div>
            <div class="btn-group" role="group">
                <a href="{% url 'plugins:netbox_authorized_keys:authorizedkeyvirtualmachine_remove' virtual_machine_id=object.id %}?return_url={{ return_url }}"
                   class="btn btn-danger">
                    <i class="mdi mdi-trash-can-outline" aria-hidden="true"></i>Bulk-Remove Authorized Key
                </a>
            </div>
        {% endif %}
    {% elif content_type == "credential" %}
        {% if model == "device" %}
            <div class="btn-group" role="group">
                <a href="{% url 'plugins:netbox_authorized_keys:credentialdevice_add' device_id=object.id %}?return_url={{ return_url }}"
                   class="btn btn-info">
                    <i class="mdi mdi-plus-thick" aria-hidden="true"></i>Bulk-Add Credential
                </a>
            </div>
            <div class="btn-group" role="group">
                <a href="{% url 'plugins:netbox_authorized_keys:credentialdevice_remove' device_id=object.id %}?return_url={{ return_url }}"
                   class="btn btn-danger">
                    <i class="mdi mdi-trash-can-outline" aria-hidden="true"></i>Bulk-Remove Credential
                </a>
            </div>
        {% elif model == "virtual_machine" %}
            <div class="btn-group" role="group">
                <a href="{% url 'plugins:netbox_authorized_keys:credentialvirtualmachine_add' virtual_machine_id=object.id %}?return_url={{ return_url }}"
                   class="btn btn-info">
                    <i class="mdi mdi-plus-thick" aria-hidden="true"></i>Bulk-Add Credential
                </a>
            </div>
            <div class="btn-group" role="group">
                <a href="{% url 'plugins:netbox_authorized_keys:credentialvirtualmachine_remove' virtual_machine_id=object.id %}?return_url={{ return_url }}"
                   class="btn btn-danger">
                    <i class="mdi mdi-trash-can-outline" aria-hidden="true"></i>Bulk-Remove Credential
                </a>
            </div>
        {% endif %}
    {% endif %}
{% endblock %}
