{% if perms.dcim.change_devicetype %}
    <form method="post">
        {% csrf_token %}
        <div class="panel panel-default">
            <div class="panel-heading">
                <strong>{{ title }}</strong>
            </div>
            {% include 'responsive_table.html' %}
            <div class="panel-footer noprint">
                {% if table.rows %}
                    {% if edit_url %}
                        <button type="submit" name="_edit" formaction="{% url edit_url %}?device_type={{ devicetype.pk }}&return_url={{ devicetype.get_absolute_url }}" class="btn btn-xs btn-warning">
                            <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> Edit Selected
                        </button>
                    {% endif %}
                    {% if delete_url %}
                        <button type="submit" name="_delete" formaction="{% url delete_url %}?device_type={{ devicetype.pk }}&return_url={{ devicetype.get_absolute_url }}" class="btn btn-xs btn-danger">
                            <span class="glyphicon glyphicon-trash" aria-hidden="true"></span> Delete Selected
                        </button>
                    {% endif %}
                {% endif %}
                <div class="pull-right">
                    <a href="{% url add_url %}?device_type={{ devicetype.pk }}&return_url={{ devicetype.get_absolute_url }}" class="btn btn-primary btn-xs">
                        <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
                        Add {{ title }}
                    </a>
                </div>
                <div class="clearfix"></div>
            </div>
        </div>
    </form>
{% else %}
    <div class="panel panel-default">
        <div class="panel-heading">
            <strong>{{ title }}</strong>
        </div>
        {% include 'responsive_table.html' %}
    </div>
{% endif %}
