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.

solicitudes.php 2.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <?= $this->extend('templates/baseAdmin') ?>
  2. <?= $this->section('content') ?>
  3. <!-- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/5.1.3/css/bootstrap.min.css"> -->
  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>Email</th>
  13. <th>Status</th>
  14. <th>Revisar</th>
  15. </thead>
  16. <tbody>
  17. <?php foreach ($solicitudes as $solicitud) : ?>
  18. <tr class="<?= $solicitud['status'] == 2 ? 'table-danger' : '' ?>">
  19. <td><?= $solicitud['nombre'] . ' ' . $solicitud['apaterno'] . ' ' . $solicitud['amaterno'] ?></td>
  20. <td><?= $solicitud['email'] ?></td>
  21. <td><?= $solicitud['status'] == 0 ? 'Por aprobar' : 'Rechazada' ?></td>
  22. <td>
  23. <a href="<?= route_to('admin_solicitud_revisar', $solicitud['id']) ?>" class="btn btn-info ">
  24. <i class="nav-icon fas fa-user-check"></i>
  25. </a>
  26. </td>
  27. </tr>
  28. <?php endforeach ?>
  29. </tbody>
  30. </table>
  31. </div>
  32. </div>
  33. <script>
  34. document.addEventListener('DOMContentLoaded', function() {
  35. let table = new DataTable('#table-solicitudes', {
  36. 'searching': true,
  37. 'ordering': true,
  38. 'language': {
  39. "decimal": "",
  40. "emptyTable": "No hay información",
  41. "info": "Mostrando _START_ a _END_ de _TOTAL_ registros",
  42. "infoEmpty": "Mostrando 0 to 0 of 0 registros",
  43. "infoFiltered": "(Filtrado de _MAX_ total registros)",
  44. "infoPostFix": "",
  45. "thousands": ",",
  46. "lengthMenu": "Mostrar _MENU_ registros",
  47. "loadingRecords": "Cargando...",
  48. "processing": "Procesando...",
  49. "search": "Buscar:",
  50. "zeroRecords": "No se encontraron resultados",
  51. "paginate": {
  52. "first": "Primero",
  53. "last": "Ultimo",
  54. "next": "Siguiente",
  55. "previous": "Anterior"
  56. }
  57. },
  58. 'order': [],
  59. });
  60. });
  61. </script>
  62. <?= $this->endSection() ?>