{{$filters := get_filters}}
{{if $filters}}
  <div class="qor-actions qor-advanced-filter" data-toggle="qor.advancedsearch">
    <button class="mdl-button mdl-button--colored qor-advanced-filter__toggle" type="button">
      {{if has_filter}}
      <span class="qor-notifications__unread"><i class="material-icons" style="font-size: 1.05em">edit</i></span>
      {{end}}
      {{t "qor_admin.filter.advanced_filter" "Advanced Filter"}}
    </button>

    <div class="qor-advanced-filter__dropdown clearfix" style="display: none;" advanced-search-toggle>
      <button class="mdl-button mdl-button--icon qor-advanced-filter__close">
        <i class="material-icons">close</i>
      </button>
      <h3 class="mdl-layout-title">{{t "qor_admin.actions.advanced_filter" "Advanced Filter"}}</h3>
      {{if len saved_filters}}
        <div class="qor-advanced-filter__savedfilter">
          <button class="mdl-button qor-advanced-filter__toggle">{{t "qor_admin.filter.saved_filter" "Saved Filter"}}</button>
          <ul style="display:none;" advanced-search-toggle>
            {{range $filter := saved_filters}}
              <li>
                <a href="{{$filter.URL}}">{{$filter.Name}}</a>
                <button class="mdl-button mdl-button--icon qor-advanced-filter__delete" style="display: none;" data-filter-name="{{$filter.Name}}">
                  <i class="material-icons">close</i>
                </button>
              </li>
            {{end}}
          </ul>
        </div>
      {{end}}

      <form method="GET">
        {{range $filter := $filters}}
          {{render_filter $filter}}
        {{end}}
        <button type="submit" class="mdl-button mdl-button--colored mdl-button--raised">{{t "qor_admin.filter.apply" "Apply"}}</button>
        <button type="button" class="mdl-button mdl-button--colored qor-advanced-filter__save">{{t "qor_admin.filter.save_this_filter" "Save This Filter"}}</button>
      </form>
    </div>
  </div>
{{end}}
