<md-content class="fullheight" ng-controller="FieldsCtrl">
  <div style="overflow-y: auto; height:45%">
    <md-toolbar md-scroll-shrink>
      <div class="md-toolbar-tools">
          <span class="caps">{{ report.root_model_name }} Relations</span>
      </div>
    </md-toolbar>  
    <input placeholder="Search Relations" style="width: 100%" ng-model="searchRelations"></input>
    <md-content>
      <div ui-tree data-drag-enabled="false">
      <ol ui-tree-nodes="" ng-model="related_fields">
        <li data-collapsed="false" ng-include="static('report_builder/partials/node_renderer.html')" ng-repeat="field in related_fields | filter:searchRelations" ui-tree-node>
        </li>
      </ol>
      </div>
    </md-content>

  </div>
  <div style="overflow-y: auto; height:45%">
    <md-toolbar md-scroll-shrink>
      <div class="md-toolbar-tools">
        <span class="caps">{{ fields_header }} Fields</span>
      </div>
    </md-toolbar>  
    <input placeholder="Search Fields" style="width: 100%" ng-model="searchFields"></input>
    <md-content>
      <div ui-tree data-drag-enabled="false">
      <ol ui-tree-nodes="" ng-model="fields">
        <li class="field" data-collapsed="false" ng-repeat="field in fields | filter:searchFields" ui-tree-node>
          <div ui-tree-handle layout="row" style="margin-right: 7px;">
            <div class="caps" flex ng-click="click_field(field)">
              {{field.field_verbose}}
            </div>
            <div flex="10" style="min-width: 37px;">
              <md-button class="add_button" ng-click="add_field(field)"> Add </md-button>
            </div>
          </div>
        </li>
      </ol>
      </div>
    </md-content>

  </div>
  <md-content style="overflow-y: auto; height:10%">
    {{ help_text }}
  </md-content>
</md-content>
