<h2>
  Fichiers
  <small class="text-muted" ng-if="errfnd > 0"><span class="glyphicon glyphicon-exclamation-sign"></span> <ng-pluralize count="errfnd" when="{'one': '{} erreur trouvée', 'other': '{} erreurs trouvées'}"></ng-pluralize></small>
  <button type="button" ng-click="checksumAll()" class="float-right btn btn-sm btn-secondary"><span class="glyphicon glyphicon-flash" aria-hidden="true"></span> Vérifier les fichiers</button>
</h2>

<p><input type="search" class="form-control" placeholder="Search" ng-model="query" autofocus></p>
<table class="table table-hover table-bordered table-striped table-sm">
  <thead class="thead-dark">
    <tr>
      <th ng-repeat="field in fields">
	{{ field }}
      </th>
    </tr>
  </thead>
  <tbody>
    <tr ng-repeat="file in files | filter: query" ng-class="{'bg-danger': file.err !== undefined && file.err !== true}" ng-click="show(file)">
      <td ng-repeat="field in fields">
	{{ file[field] }}
	<span ng-if="field == 'id' && file.err !== undefined && file.err !== true" title="{{ file.err }}" class="glyphicon glyphicon-exclamation-sign"></span>
      </td>
    </tr>
  </tbody>
</table>
