{% import 'appbuilder/general/lib.html' as lib %}

<form id="filter_form" class="form-search" method="get">
<div class="table-responsive">

    <strong>{{_("Add Filter")}}:</strong>
    <div class="btn-group">
  	{% for col in include_cols %}
    	<a href="javascript:void(0)" name={{col}} class="filter btn btn-sm btn-primary" onclick="return false;">{{ label_columns[col] }}
        <span class="caret"></span>
        </a>
    {% endfor %}
    </div>
    
    <table class="table table-condensed filters">
       
    </table>

</div>
{{ lib.btn_search() }}
</form>

<script>
	(function($) {
	var filter = new AdminFilters(
                    '#filter_form',
                    {{ label_columns | tojson | safe }},
                    {{ form_fields | tojson | safe }},
                    {{ search_filters | tojson | safe }},
                    {{ active_filters | tojson | safe }}                                        
                );
	})(jQuery);
	
</script>
