<div class="bs-component main-pagination" ng-controller="empresaCrtl">
	<div class="row">
		<div class="col-md-4">
			<form class="form-inline">
				<div class="form-group">
					<label >Buscar</label>
					<input type="text" ng-model="search" class="form-control" placeholder="Buscar">
				</div>
			</form>
		</div>
		<div class="col-md-8">
			<p>Total de Empresas registradas : <strong>{{totalItems}}</strong></p>
		</div>
	</div>
	<table class="table table-striped table-hover">
		<thead>
			<tr>
				<th colspan="2">
					<span></span>
				</th>
				<th ng-click="sort('nit')"><i class="fas fa-sort"></i> Nit
					<span class="fas fa-sort" ng-show="sortKey=='nit'" ng-class="{'fas fa-sort-amount-up':reverse,'fas fa-sort-amount-down':!reverse}"></span>
				</th>
				<th ng-click="sort('nombre')"><i class="fas fa-sort"></i> Nombre
					<span class="fas fa-sort" ng-show="sortKey=='nombre'" ng-class="{'fas fa-sort-amount-up':reverse,'fas fa-sort-amount-down':!reverse}"></span>
				</th>

                <th ng-click="sort('estado')"><i class="fas fa-sort"></i> Estado
					<span class="fas fa-sort" ng-show="sortKey=='estado'" ng-class="{'fas fa-sort-amount-up':reverse,'fas fa-sort-amount-down':!reverse}"></span>
				</th>

			</tr>

		</thead>

		<tbody>
			<tr dir-paginate="empresa in empresas|orderBy:sortKey:reverse|filter:search|itemsPerPage:5">
				<td class="acciones"><a class="a-edit" title="Editar" href="<?php echo base_url('empresa/edit')."/" ?>{{empresa.id}}"><i class="fas fa-edit c-edit"></i></a></td>

				<td class="acciones"><a class="a-del" title="Eliminar" ng-click="deleteEmpresa(empresa.id)"><i class="fas fa-eraser c-del"></i></a></td>
				<td>{{empresa.nit}}</td>
				<td>{{empresa.nombre}}</td>
				<td>{{empresa.estado == 1 ? 'Activo' : 'Inactivo'}}</td>
			</tr>
		</tbody>
	</table>
	<dir-pagination-controls
		max-size="5"
		direction-links="true"
		boundary-links="true" >
	</dir-pagination-controls>
</div>
