<div class="subitem">  
  <div class="title">
    Position et adresse du site
  </div>
  <div>
    <div class="ancBacPositionDossier" ng-class="{'fullScreen':fullScreen,'hasPosition': dossier.geometry}">
      <div class="row">
        <div class="col-xs-12">
          <div class="subitem">
            <div class="adresse_wrapper">
              <div class="adresse" ng-click="toggleFullScreen()" title="Ouvrir la carte">
                <div>
                  <span class="pos ispos" ng-if="dossier.geometry">
                    <i class="fa fa-map-marker"></i> Site
                  </span>
                  <span class="pos nopos" ng-if="!dossier.geometry">
                    <i class="fa fa-map-marker"></i> Position inconnue
                  </span>
                </div>
              </div>
            </div>
            <div class="tools top">
              <div class="btn btn-sm btn-default closeBtn" ng-click="toggleFullScreen()">
                <i class="fa fa-times"></i>
              </div>
              <div class="search">
                <i class="fa fa-search searchIcon"></i>
                <select
                  class="mode"
                  ng-options="f.id as f.alias for f in searchModes"
                  ng-model="currentSearchMode.v"
                ></select>
                <input
                  ng-show="currentSearchMode.v=='adresse'"
                  type="text"
                  autocomplete="new-text"
                  placeholder="Saisir une adresse"
                  name="adressePicker"
                  ng-model="adresses.res"
                  comparator="normalizeInput($viewValue)"
                  bs-options="position as position.label for position in getInformationsFromAddress($viewValue)"
                  limit="10"
                  data-animation="am-flip-x"
                  trim-value="false"
                  ng-trim="false"
                  bs-typeahead
                />

                <input
                  ng-show="currentSearchMode.v=='parcelles'"
                  type="text"
                  autocomplete="new-text"
                  placeholder="Commune"
                  name="parcellePicker"
                  ng-model="parcelles.commune"
                  ng-change="getInformationsFromParcelles(true)"
                  data-ng-trim="false"
                  data-animation="am-flip-x"
                />
                <input
                  ng-show="currentSearchMode.v=='parcelles'"
                  type="text"
                  placeholder="Section"
                  name="parcellePicker"
                  ng-model="parcelles.section"
                  ng-change="getInformationsFromParcelles(true)"
                  data-ng-trim="false"
                  data-animation="am-flip-x"
                />
                <input
                  ng-show="currentSearchMode.v=='parcelles'"
                  type="text"
                  placeholder="Numéro"
                  name="parcellePicker"
                  ng-model="parcelles.numero"
                  ng-change="getInformationsFromParcelles(true)"
                  data-ng-trim="false"
                  data-animation="am-flip-x"
                />
                <input
                  ng-show="currentSearchMode.v=='requetes'"
                  type="text"
                  placeholder="Rechercher une requête"
                  name="requetePicker"
                  ng-model="pickedRequest"
                  bs-options="p as p.name for p in getRequeteByName($viewValue)"
                  trim-value="false"
                  data-ng-trim="false"
                  data-animation="am-flip-x"
                  bs-typeahead
                />

                <i class="fa fa-times resetPositionDossier" ng-click="resetPositionDossier()"></i>
              </div>

              <div ng-if="currentSearchMode.v=='parcelles'" ng-hide="hideResult" class="search resultSearch">
                <div ng-repeat="p in result" ng-click="setResult(p,p)">
                  <span>{{p.properties.fullName}}</span>
                </div>
              </div>
              <div class="position" ng-class="{'toggled':dessinEnCours}" ng-click="toggleDrawPosition() "
                title="Positionner manuellement le dossier">
                <i class="fa fa-map-marker"></i>
              </div>
            </div>

            <div ng-if="map" class="tools left">
              <div gcmap gcmapmap="map" is-anc-or-bac="true"></div>
              <features-config ng-if="featuresConfig" config="featuresConfig" map="map" from-anc="true"
                tooltip="tooltipTitle"></features-config>
            </div>

            <div class="mapPreview">
              <div id="pos_dossier"></div>
            </div>

            <div id="abpd_popup" class="ol-popup" ng-class="{'set': posDossierData.set}" style="background-color: rgba(255, 255, 255, 0.6);">
              <a href="#" id="abpd_popup-closer" class="ol-popup-closer"></a>
              <div id="abpd_popup-content">
                <div>
                  <div class="title">Informations</div>
                  <div class="body">
                    <div class="sub" ng-class="{'checked': posDossierData.position.checked}">
                      <input type="checkbox" ng-model="posDossierData.position.checked" />
                      <label> Position</label>
                      <span class="value" ng-if="posDossierData.position.value">
                        <i class="fa fa-check placed" />
                      </span>
                    </div>
                    <div class="sub" ng-class="{'checked': posDossierData.adresse.checked}">
                      <input type="checkbox" ng-model="posDossierData.adresse.checked" />
                      <label> Adresse </label>
                      <span class="value" title="{{ posDossierData.adresse.label }}">
                        {{ posDossierData.adresse.label }}
                      </span>
                    </div>
                    <div class="sub" ng-class="{'checked': posDossierData.parcelle.checked}">
                      <input type="checkbox" ng-model="posDossierData.parcelle.checked" />
                      <label> Parcelle </label>
                      <span class="value" title="{{ posDossierData.parcelle.label }}">
                        {{ posDossierData.parcelle.label }}
                      </span>
                    </div>
                  </div>
                  <div class="actions">
                    <div class="btn btn-default btn-xs pull-right" ng-click="updatePositionDossier()">
                      <i class="fa fa-save"></i> Mettre à jour
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class="row">
        <div class="col-xs-12">
          <div class="subitem">
            <div class="col-xs-12">
            </div>
            <span class="previewAdresse">
              {{dossier.properties.adresse_num_rue}}
              {{dossier.properties.adresse_num_rue_extra}}
              {{dossier.properties.adresse_rue}}
              {{dossier.properties.adresse_cp}}
              {{dossier.properties.adresse_ville}}
              {{dossier.properties.adresse_pays}}
            </span>
            <div class="pull-right btn btn-default btn-sm showDetailAdresse"
              ng-click="showDetailAdresse = !showDetailAdresse">
              <i class="fa fa-edit"></i> Détail
            </div>
            <div class="content adresseDetailWrapper" ng-if="showDetailAdresse">
              <anc-adresse res="dossier.properties" show-title="true" force-ville="true"
                show_coordonnes="apptype == 'bac'" coordinates="dossier.geometry.coordinates"></anc-adresse>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>