{% set search = _args.search %}
{% if search.active() %}
<div class="alert alert-info">
<p>
This view is currently filtered/sorted and may not reflect all data.
<a href="#" data-campussuite-search-clear><strong>Clear</strong></a> the filters to show the default dashboard view.
</p>
</div>
{% endif %}
<div class="action-bar">
<div class="action-filters">
{% block checks %}{% endblock %}
{% set show = false %}
{% for filter in search.filters %}
{% if filter.option('hidden', false) is same as(false) %}
{% set show = true %}
{% endif %}
{% endfor %}
{% if show %}
<div class="dropdown action-item">
<a class="btn btn-filter dropdown-toggle" data-toggle="dropdown" aria-expanded="true">
<span>Filter</span>
<i class="fa fa-chevron-down"></i>
</a>
<div class="dropdown-menu" style="width: 360px">
<form class="dropdown-form">
{% for filter in search.filters %}
{% if filter.option('hidden', false) is not same as(true) %}
<div class="form-group col-sm-12">
<label>{{ filter.option('label', filter.field) }}</label>
{% include filter.view with {
term: filter
} %}
</div>
{% endif %}
{% endfor %}
<div class="form-group form-actions col-sm-12">
<a class="btn btn-link" href="#" data-campussuite-search-submit>APPLY</a>
<a class="btn btn-link" href="#" data-campussuite-search-clear>CLEAR</a>
</div>
</form>
</div>
</div>
{% endif %}
{% if search.sorts|length > 0 %}
{% include search.sort(0).view with {
term: search.sort(0)
} %}
{% endif %}
{% block extras %}{% endblock %}
</div>
{% if block('searchbox') is not empty %}
<div class="action-search">
{% block searchbox %}{% endblock %}
</div>
{% endif %}
</div>