{% if perms.dcim.change_devicetype %}
    <form method="post">
        {% csrf_token %}
        <div class="panel panel-default">
            <div class="panel-heading">
                <strong>{{ title }}</strong>
                <div class="pull-right">
                    {% if table.rows|length > 1 %}
                        <button class="btn btn-default btn-xs toggle">
                            <span class="glyphicon glyphicon-unchecked" aria-hidden="true"></span> Select all
                        </button>
                    {% endif %}
                    {% if table.rows|length > 10 %}
                        <a href="{% url add_url pk=devicetype.pk %}{{ add_url_extra }}" class="btn btn-primary btn-xs">
                            <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
                            Add {{ title }}
                        </a>
                    {% endif %}
                </div>
            </div>
            {% include 'responsive_table.html' %}
            <div class="panel-footer">
                {% if table.rows %}
                    {% if edit_url %}
                        <button type="submit" name="_edit" formaction="{% url edit_url pk=devicetype.pk %}" 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 pk=devicetype.pk %}" 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 pk=devicetype.pk %}{{ add_url_extra }}" 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 %}
