You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
2.1KB

  1. <?= $this->extend('templates/baseAdmin') ?>
  2. <?= $this->section('content') ?>
  3. <h2>lista de prestadores</h2>
  4. <script src="https://code.jquery.com/jquery-3.5.1.js"></script>
  5. <script src="https://cdn.datatables.net/1.12.1/js/jquery.dataTables.min.js"></script>
  6. <script src="https://cdn.datatables.net/1.12.1/js/dataTables.bootstrap5.min.js"></script>
  7. <div class="card">
  8. <div class="card-body">
  9. <table id="table-solicitudes" class="table table-bordered table-striped">
  10. <thead>
  11. <th>Nombre</th>
  12. <th>Tipo</th>
  13. </thead>
  14. <tbody>
  15. <?php foreach ($prestadores as $prestador) : ?>
  16. <tr>
  17. <td><?= $prestador['nombre'] . ' ' . $prestador['apaterno'] . ' ' . $prestador['amaterno'] ?></td>
  18. <td><?= $prestador['tipo'] ?></td>
  19. </tr>
  20. <?php endforeach ?>
  21. </tbody>
  22. </table>
  23. </div>
  24. </div>
  25. <script>
  26. document.addEventListener('DOMContentLoaded', function() {
  27. let table = new DataTable('#table-solicitudes', {
  28. 'searching': true,
  29. 'ordering': true,
  30. 'language': {
  31. "decimal": "",
  32. "emptyTable": "No hay información",
  33. "info": "Mostrando _START_ a _END_ de _TOTAL_ registros",
  34. "infoEmpty": "Mostrando 0 to 0 of 0 registros",
  35. "infoFiltered": "(Filtrado de _MAX_ total registros)",
  36. "infoPostFix": "",
  37. "thousands": ",",
  38. "lengthMenu": "Mostrar _MENU_ registros",
  39. "loadingRecords": "Cargando...",
  40. "processing": "Procesando...",
  41. "search": "Buscar:",
  42. "zeroRecords": "No se encontraron resultados",
  43. "paginate": {
  44. "first": "Primero",
  45. "last": "Ultimo",
  46. "next": "Siguiente",
  47. "previous": "Anterior"
  48. }
  49. },
  50. 'order': [],
  51. });
  52. });
  53. </script>
  54. <?= $this->endSection() ?>