modal-transportista.html 3.67 KB
<div class="modal-header py-1">
    <h5 class="modal-title">Busqueda de Transportista</h5>
</div>
<div class="modal-body" id="modal-body">
    <div class="input-group">
        <input
            ladda="searchLoading"
            type="text"
            class="form-control"
            placeholder="Busqueda"
            ng-model="filters"
            ng-change="search()"
            ng-keydown="busquedaDown($event.keyCode)"
            ng-keypress="busquedaPress($event.keyCode)"
            foca-focus="selectedTransportista == -1"
            ng-focus="selectedTransportista = -1"
        >
        <div class="input-group-append">
            <button
                ladda="searchLoading"
                class="btn btn-outline-secondary"
                type="button"
                ng-click="busquedaPress(13)"
            >
                <i class="fa fa-search" aria-hidden="true"></i>
            </button>
        </div>
    </div>
    <table ng-show="primerBusqueda" class="table table-striped table-sm">
        <thead>
            <tr>
                <th>Nombre</th>
                <th>CUIT</th>
                <th></th>
            </tr>
        </thead>
        <tbody>
            <tr ng-show="currentPageTransportistas.length == 0 && primerBusqueda">
                <td colspan="5">
                    No se encontraron resultados.
                </td>
            </tr>
            <tr class="selectable"
                ng-repeat="(key,transportista) in currentPageTransportistas"
                ng-click="select(transportista)">
                <td ng-bind="transportista.nombre"></td>
                <td ng-bind="transportista.CUIT"></td>
                <td>
                    <button
                        type="button"
                        class="btn btn-xs p-1 float-right"
                        ng-class="{
                            'btn-secondary': selectedTransportista != key,
                            'btn-primary': selectedTransportista == key
                        }"
                        foca-focus="selectedTransportista == {{key}}"
                        ng-keydown="itemTransportista($event.keyCode)"
                    >
                        <i class="fa fa-arrow-right" aria-hidden="true"></i>
                    </button>
                </td>
            </tr>
        </tbody>
    </table>
    <nav ng-show="currentPageTransportistas.length > 0 && primerBusqueda">
        <ul class="pagination pagination-sm justify-content mb-0">
            <li class="page-item" ng-class="{'disabled': currentPage == 1}">
                <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage - 1)">
                    <span aria-hidden="true">&laquo;</span>
                    <span class="sr-only">Anterior</span>
                </a>
            </li>
            <li
                class="page-item"
                ng-repeat="pagina in paginas"
                ng-class="{'active': pagina == currentPage}"
            >
                <a
                    class="page-link"
                    href="javascript:void();"
                    ng-click="selectPage(pagina)"
                    ng-bind="pagina"
                ></a>
            </li>
            <li class="page-item" ng-class="{'disabled': currentPage == lastPage}">
                <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage + 1)">
                    <span aria-hidden="true">&raquo;</span>
                    <span class="sr-only">Siguiente</span>
                </a>
            </li>
        </ul>
    </nav>
</div>
<div class="modal-footer py-1">
    <button class="btn btn-sm btn-secondary" type="button" ng-click="cancel()">Cancelar</button>
</div>