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.

44 lines
1.5KB

  1. <?= $this->extend('templates/base') ?>
  2. <!-- title -->
  3. <?= $this->section('title') ?>HORAS TABLE<?= $this->endSection() ?>
  4. <!-- head -->
  5. <?= $this->section('head') ?>
  6. <link rel="stylesheet" href="https://cdn.datatables.net/1.12.1/css/jquery.dataTables.min.css">
  7. <script src="https://code.jquery.com/jquery-3.5.1.js"></script>
  8. <script src="https://cdn.datatables.net/1.12.1/js/jquery.dataTables.min.js"></script>
  9. <?= $this->endSection() ?>
  10. <!-- content -->
  11. <?= $this->section('content') ?>
  12. <table id="example" class="display dataTable" style="width:100%" aria-describedby="example_info">
  13. <thead>
  14. <tr>
  15. <th class="sorting sorting_asc" tabindex="0" aria-controls="example" rowspan="1" colspan="1" style="width: 128.867px;" aria-sort="ascending" aria-label="Name: activate to sort column descending">Fecha</th>
  16. <th class="sorting" tabindex="0" aria-controls="example" rowspan="1" colspan="1" style="width: 217.267px;" aria-label="Position: activate to sort column ascending">Horas</th>
  17. </tr>
  18. </thead>
  19. <tbody>
  20. <?php foreach ($segundosDiarios as $dia) : ?>
  21. <tr>
  22. <td class="sorting_1"><?= esc($dia['dia']) ?> / <?= esc($dia['mes']) ?> / <?= esc($dia['ano']) ?></td>
  23. <td><?= esc($dia['total_horas_truncadas']) / 3600 ?>
  24. </tr>
  25. </tr>
  26. <?php endforeach ?>
  27. </tbody>
  28. </table>
  29. <script>
  30. document.addEventListener('DOMContentLoaded', function() {
  31. let table = new DataTable('#example');
  32. });
  33. </script>
  34. <?= $this->endSection() ?>