<div class="elasticFilterAttributeCfg">
  <div
    class="title"
    ng-class="{'master' : feat.type=='master' , 'active' : feat.ancjointure}"
  >
    <input
      ng-if="feat.type!='master'"
      type="checkbox"
      ng-model="feat.ancjointure"
      ng-change="innerDefaultUpdateANC(feat)"
    />
    {{ feat.fti.alias }}
  </div>

  <div class="body" ng-if="feat.type=='master' || feat.ancjointure">
    <div class="actions">
      <div class="sub join" ng-if="feat.ancjointure">
        <div>
          <input
            type="radio"
            name="jointuretype-{{feat.fti.name}}"
            ng-model="feat.jointurenmtype"
            value="getOnlyFirstline"
          />
          <span translate
            >elastic.search.jointure.jointuregetOnlyFirstline</span
          >
        </div>
        <div>
          <input
            type="radio"
            ng-model="feat.jointurenmtype"
            value="duplicateLines"
            name="jointuretype-{{feat.fti.name}}"
          />
          <span translate>elastic.search.jointure.jointureduplicateLines</span>
        </div>
      </div>

      <div class="sub search">
        <input
          type="text"
          ng-model="cfg.search"
          placeholder="Filtrer les attributs"
        />
      </div>
      <div class="sub reset">
        <input type="checkbox" ng-model="cfg.reset" ng-change="resetAll()" />
        Sélectionner tout
      </div>
    </div>
    <div class="attributes">
      <!-- <pre>{{feat.fti.attributes | json }}</pre> -->
      <ul ng-if="!isAncBacCtrl">
        <li
          ng-repeat="attr in feat.fti.attributes | filter:cfg.search | orderBy : 'alias'"
        >
          <input type="checkbox" ng-model="attr.selected" />
          <span>{{ attr.alias }}</span>
        </li>
      </ul>
      <ul ng-if="isAncBacCtrl" class="ancControleReponse">
        <li ng-repeat="(cat,attrs) in ancCtrlReponseCategories">
          <div class="grp">{{ cat }}</div>
          <ul>
            <li ng-repeat="attr in attrs | filter:cfg.search ">
              <div class="checkbox">
                <label>
                  <input type="checkbox" ng-model="attr.selected" />
                  <span>{{ attr.prefixedAlias }}</span>
                </label>
              </div>
            </li>
          </ul>
        </li>
      </ul>
    </div>
  </div>
</div>
