<li class="field" data-collapsed="false" ui-tree-node="">
  <div layout-align="center center">
    <ng-form layout="row" layout-align="center center">
      <div class="move_trash" flex="">
        <img ui-tree-handle="" src="{{ static('report_builder/img/reorder.svg') }}"></img>
        <img ng-click="deleteField(this)" src="{{ static('report_builder/img/delete.svg') }}"></img>
      </div>
      <div title="{{ field.path + field.field }}" flex="" class="caps">
        <span ng-if="field.path_verbose">({{ field.path_verbose }}) </span>
        {{ field.field_verbose }}
      </div>

      <div class="col_filter_type" flex="">
        <select ng-model="field.filter_type" ng-options="item.value as item.display_name for item in filterFieldOptions.filter_type.choices">
        </select>
      </div>

      <div flex="" ng-switch="field.filter_type">
        <div ng-switch-when="week_day">
          <select ng-model="field.filter_value">
            <option value="1">Sunday</option>
            <option value="2">Monday</option>
            <option value="3">Tuesday</option>
            <option value="4">Wednesday</option>
            <option value="5">Thursday</option>
            <option value="6">Friday</option>
            <option value="7">Saturday</option>
          </select>
        </div>
        <div ng-switch-when="isnull">
          <md-checkbox ng-model="field.filter_value" ng-true-value="'True'" aria-label="Is Null">
        </div>
        <div ng-switch-when="max">
         <md-checkbox ng-model="field.filter_value" ng-true-value="'True'" aria-label="Max (annotation-filter)">
        </div>
        <div ng-switch-when="min">
          <md-checkbox ng-model="field.filter_value" ng-true-value="'True'" aria-label="Min (annotation-filter)">
        </div>
        <div ng-switch-default ng-switch="field.field_type">
          <input ng-switch-when="DateField" pikaday="pikaday" format="YYYY-MM-DD" ng-model="field.filter_value"></input>
          <div ng-switch-when="BooleanField">
            <md-checkbox ng-model="field.filter_value">
          </div>
          <input ng-switch-default type="text" ng-model="field.filter_value"></input>
          <div ng-if="field.filter_type == 'range'" flex="" ng-switch="field.field_type">
            <input ng-switch-when="DateField" pikaday="pikaday" format="YYYY-MM-DD" ng-model="field.filter_value2"></input>
            <input ng-switch-default type="text" ng-model="field.filter_value2"></input>
          </div>
        </div>

      </div>


      <div class="col_checkbox" flex="">
        <md-checkbox ng-model="field.exclude" aria-label="Exclude?"></md-checkbox>
       </div>
    </ng-form>
  </div>
</li>
<ol ui-tree-nodes="" ng-model="field.related_fields" ng-class="{hidden: collapsed}">
  <li ng-repeat="field in field.related_fields | filter:searchRelations" ui-tree-node ng-include="static('report_builder/partials/node_renderer.html')">
  </li>
</ol>
