<div ng-if="currentReport.id">
  <div class="row spbrow">
    <div class="form-intermediate-title">Cahier de vie associé au dossier</div>
    <div class="col-xs-12">
      <table class="table table-bordered">
        <tr>
          <th>Nom</th>
          <th>État</th>
          <th>Conformité</th>
          <th>Actions</th>
        </tr>
        <tr ng-repeat="cahier in currentCahiers track by $index">
          <td class="text-center">{{ cahier.properties.nom }}</td>
          <td class="text-center">
            <i
              class="fa"
              ng-class="{'fa-check':cahier.properties.etat=='actif','fa-times':cahier.properties.etat=='inactif'}"
            ></i>
            {{ cahier.properties.etat }}
          </td>
          <td class="text-center">
            <i
              class="fa"
              ng-class="{'fa-check':cahier.properties.conforme == true,'fa-times':cahier.properties.conforme == false}"
            ></i>
          </td>

          <td class="text-center">
            <div
              class="btn btn-xs btn-default cursorHelp"
              title="Afficher/Cacher le cahier de vie dans l'arborescence"
              ng-click="toggleCahierOnDossier(cahier,$index)"
            >
              <i
                class="fa"
                ng-class="{'fa-eye-slash':renderDisplayHideCahier(cahier,$index)==true,'fa-eye':renderDisplayHideCahier(cahier,$index)==false}"
              ></i>
            </div>
            <div
              class="btn btn-danger btn-xs"
              ng-click="removeSelectedCahier(cahier,$index)"
            >
              <i class="fa fa-times"></i>
            </div>
          </td>
        </tr>
      </table>
    </div>
    <div class="form-intermediate-title">Ajouter un nouveau cahier de vie</div>
    <div class="col-xs-12">
      <label> Date </label>
      <div javautildate gcatt="{name:'date'}" result="newCahier"></div>
    </div>
  </div>
  <div class="row spbrow">
    <div class="col-xs-12 text-right">
      <div
        class="btn btn-default"
        ng-click="addCahierToDossier()"
        ng-disabled="!newCahier.date"
      >
        Ajouter
      </div>
    </div>
  </div>
</div>
