{% load render_table from django_tables2 %}
{% load helpers %}

<div class="panel panel-{{ panel_class|default:'default' }}">
    {% if heading %}
        <div class="panel-heading">
            <strong>{{ heading }}</strong>
        </div>
    {% endif %}
    {% if table.rows %}
        <div class="table-responsive">
            {% render_table table table_inc_template|default:'inc/table.html' %}
        </div>
    {% else %}
        <div class="panel-body text-muted">None</div>
    {% endif %}
    {% if add_obj_url %}
        <div class="panel-footer noprint">
            <div class="pull-right">
                <a href="{{ add_obj_url }}" class="btn btn-primary btn-xs">
                    <span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add {{ table.data.data.model|meta:"verbose_name" }}
                </a>
            </div>

            <div class="clearfix"></div>
        </div>
    {% endif %}
</div>
