Commit a4b5f5da0383fa090275fad4a7dcb9d1cf639706
1 parent
60fb918954
Exists in
master
buscador en header, paginado en footer, cambio icons
Showing
1 changed file
with
37 additions
and
27 deletions
Show diff stats
src/views/modal-chofer.html
1 | <div class="modal-header py-1"> | 1 | <div class="modal-header py-1"> |
2 | <h5 class="modal-title">Busqueda de Chofer</h5> | 2 | <div class="row w-100"> |
3 | </div> | 3 | <div class="col-lg-6"> |
4 | <div class="modal-body" id="modal-body"> | 4 | <h5 class="modal-title my-1">Busqueda de Chofer</h5> |
5 | <div class="input-group"> | 5 | </div> |
6 | <input | 6 | <div class="input-group col-lg-6 pr-0 my-2"> |
7 | ladda="searchLoading" | 7 | <input |
8 | type="text" | ||
9 | class="form-control" | ||
10 | placeholder="Busqueda" | ||
11 | ng-model="filters" | ||
12 | ng-change="search()" | ||
13 | ng-keydown="busquedaDown($event.keyCode)" | ||
14 | ng-keypress="busquedaPress($event.keyCode)" | ||
15 | foca-focus="selectedChofer == -1" | ||
16 | ng-focus="selectedChofer = -1" | ||
17 | > | ||
18 | <div class="input-group-append"> | ||
19 | <button | ||
20 | ladda="searchLoading" | 8 | ladda="searchLoading" |
21 | class="btn btn-outline-secondary" | 9 | type="text" |
22 | type="button" | 10 | class="form-control" |
23 | ng-click="busquedaPress(13)" | 11 | placeholder="Busqueda" |
12 | ng-model="filters" | ||
13 | ng-change="search()" | ||
14 | ng-keydown="busquedaDown($event.keyCode)" | ||
15 | ng-keypress="busquedaPress($event.keyCode)" | ||
16 | foca-focus="selectedChofer == -1" | ||
17 | ng-focus="selectedChofer = -1" | ||
24 | > | 18 | > |
25 | <i class="fa fa-search" aria-hidden="true"></i> | 19 | <div class="input-group-append"> |
26 | </button> | 20 | <button |
21 | ladda="searchLoading" | ||
22 | class="btn btn-outline-secondary" | ||
23 | type="button" | ||
24 | ng-click="busquedaPress(13)" | ||
25 | > | ||
26 | <i class="fa fa-search" aria-hidden="true"></i> | ||
27 | </button> | ||
28 | </div> | ||
27 | </div> | 29 | </div> |
28 | </div> | 30 | </div> |
31 | |||
32 | </div> | ||
33 | <div class="modal-body" id="modal-body"> | ||
34 | |||
35 | <div ng-show="!primerBusqueda"> | ||
36 | Debe realizar una primer búsqueda. | ||
37 | </div> | ||
38 | |||
29 | <table ng-show="primerBusqueda" class="table table-striped table-sm"> | 39 | <table ng-show="primerBusqueda" class="table table-striped table-sm"> |
30 | <thead> | 40 | <thead> |
31 | <tr> | 41 | <tr> |
32 | <th>Código</th> | 42 | <th>Código</th> |
33 | <th>Nombre</th> | 43 | <th>Nombre</th> |
34 | <th>DNI</th> | 44 | <th>DNI</th> |
35 | <th>Teléfono</th> | 45 | <th>Teléfono</th> |
36 | <th></th> | 46 | <th></th> |
37 | </tr> | 47 | </tr> |
38 | </thead> | 48 | </thead> |
39 | <tbody> | 49 | <tbody> |
40 | <tr ng-show="currentPageChoferes.length == 0 && primerBusqueda"> | 50 | <tr ng-show="currentPageChoferes.length == 0 && primerBusqueda"> |
41 | <td colspan="5"> | 51 | <td colspan="5"> |
42 | No se encontraron resultados. | 52 | No se encontraron resultados. |
43 | </td> | 53 | </td> |
44 | </tr> | 54 | </tr> |
45 | <tr class="selectable" | 55 | <tr class="selectable" |
46 | ng-repeat="(key,chofer) in currentPageChoferes" | 56 | ng-repeat="(key,chofer) in currentPageChoferes" |
47 | ng-click="select(chofer)"> | 57 | ng-click="select(chofer)"> |
48 | <td ng-bind="chofer.id"></td> | 58 | <td ng-bind="chofer.id"></td> |
49 | <td ng-bind="chofer.nombre"></td> | 59 | <td ng-bind="chofer.nombre"></td> |
50 | <td ng-bind="chofer.dni"></td> | 60 | <td ng-bind="chofer.dni"></td> |
51 | <td ng-bind="chofer.telefono"></td> | 61 | <td ng-bind="chofer.telefono"></td> |
52 | <td> | 62 | <td> |
53 | <button | 63 | <button |
54 | type="button" | 64 | type="button" |
55 | class="btn btn-xs p-1 float-right" | 65 | class="btn btn-xs p-1 float-right" |
56 | ng-class="{ | 66 | ng-class="{ |
57 | 'btn-secondary': selectedChofer != key, | 67 | 'btn-secondary': selectedChofer != key, |
58 | 'btn-primary': selectedChofer == key | 68 | 'btn-primary': selectedChofer == key |
59 | }" | 69 | }" |
60 | foca-focus="selectedChofer == {{key}}" | 70 | foca-focus="selectedChofer == {{key}}" |
61 | ng-keydown="itemChofer($event.keyCode)" | 71 | ng-keydown="itemChofer($event.keyCode)" |
62 | > | 72 | > |
63 | <i class="fa fa-arrow-right" aria-hidden="true"></i> | 73 | <i class="fa fa-circle-thin" aria-hidden="true"></i> |
64 | </button> | 74 | </button> |
65 | </td> | 75 | </td> |
66 | </tr> | 76 | </tr> |
67 | </tbody> | 77 | </tbody> |
68 | </table> | 78 | </table> |
69 | <nav ng-show="currentPageChoferes.length > 0 && primerBusqueda"> | 79 | </div> |
80 | <div class="modal-footer py-1"> | ||
81 | <nav ng-show="currentPageChoferes.length > 0 && primerBusqueda" class="mr-auto"> | ||
70 | <ul class="pagination pagination-sm justify-content mb-0"> | 82 | <ul class="pagination pagination-sm justify-content mb-0"> |
71 | <li class="page-item" ng-class="{'disabled': currentPage == 1}"> | 83 | <li class="page-item" ng-class="{'disabled': currentPage == 1}"> |
72 | <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage - 1)"> | 84 | <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage - 1)"> |
73 | <span aria-hidden="true">«</span> | 85 | <span aria-hidden="true">«</span> |
74 | <span class="sr-only">Anterior</span> | 86 | <span class="sr-only">Anterior</span> |
75 | </a> | 87 | </a> |
76 | </li> | 88 | </li> |
77 | <li | 89 | <li |
78 | class="page-item" | 90 | class="page-item" |
79 | ng-repeat="pagina in paginas" | 91 | ng-repeat="pagina in paginas" |
80 | ng-class="{'active': pagina == currentPage}" | 92 | ng-class="{'active': pagina == currentPage}" |
81 | > | 93 | > |
82 | <a | 94 | <a |
83 | class="page-link" | 95 | class="page-link" |
84 | href="javascript:void();" | 96 | href="javascript:void();" |
85 | ng-click="selectPage(pagina)" | 97 | ng-click="selectPage(pagina)" |
86 | ng-bind="pagina" | 98 | ng-bind="pagina" |
87 | ></a> | 99 | ></a> |