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

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

    <div class="btn-group">
        <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
        {{_("Add Filter")}}
      <span class="caret"></span>
        </button>
        <ul class="dropdown-menu">
            {% for col in include_cols %}
            <li><a href="javascript:void(0)" name="{{col}}" class="filter" onclick="return false;">
                {{ label_columns[col] }}</a>
            </li>
            {% endfor %}
        </ul>
    </div>

    <table class="table table-responsive table-hover filters">
        <tbody>

        </tbody>
    </table>

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

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

</script>
