<div class="modal-header separator">
  <i
    c8y-icon="times"
    class="btn-modal-close pull-right interact"
    title="{{ 'Cancel' | translate }}"
    ng-click="cancel()"
  ></i>
  <h3
    id="modal-title"
    translate
  >
    Filter options
  </h3>
</div>

<div
  class="modal-body"
  id="modal-body"
>
  <form
    name="filterForm"
    novalidate
  >
    <div class="row">
      <div class="col-lg-12">
        <c8y-schema-form
          schema="column.filtering.schema"
          form="column.filtering.form"
          model="column.config.filtering"
        ></c8y-schema-form>
      </div>
    </div>
    <div
      class="form-group"
      ng-show="column.sorting"
    >
      <label translate>And sort</label>
      <div class="form-control-static">
        <div class="btn-group">
          <button
            title="{{ 'Ascending' | translate }}"
            type="button"
            class="btn btn-default btn-sm"
            ng-model="column.config.sorting.order"
            uib-btn-radio="SORTING_ORDER.ASCENDING.value"
          >
            <i c8y-icon="sort-alpha-asc"></i>
            <translate>Ascending</translate>
          </button>
          <button
            class="btn btn-default btn-sm"
            type="button"
            title="{{ 'Descending' | translate }}"
            ng-model="column.config.sorting.order"
            uib-btn-radio="SORTING_ORDER.DESCENDING.value"
          >
            <i c8y-icon="sort-alpha-desc"></i>
            <translate>Descending</translate>
          </button>
          <button
            class="btn btn-default btn-sm"
            type="button"
            title="{{ 'Don\'t sort' | translate }}"
            ng-model="column.config.sorting.order"
            uib-btn-radio="SORTING_ORDER.NONE.value"
          >
            <translate>Don't sort</translate>
          </button>
        </div>
      </div>
    </div>
  </form>
</div>

<div class="modal-footer">
  <button
    class="btn btn-default"
    type="button"
    title="{{ 'Cancel' | translate }}"
    ng-click="cancel()"
  >
    {{ 'Cancel' | translate }}
  </button>
  <button
    class="btn btn-danger"
    type="button"
    title="{{ 'Reset' | translate }}"
    ng-click="clearConfig(column.config)"
  >
    {{ 'Reset' | translate }}
  </button>
  <button
    class="btn btn-primary"
    type="button"
    title="{{ 'Apply' | translate }}"
    ng-click="applyConfig(column.config)"
    ng-disabled="filterForm.$invalid"
  >
    {{ 'Apply' | translate }}
  </button>
</div>