77 行
2.7 KiB
PHP
77 行
2.7 KiB
PHP
<?= $this->extend('templates/baseAdmin') ?>
|
|
|
|
<?= $this->section('content') ?>
|
|
|
|
<script src="https://code.jquery.com/jquery-3.5.1.js"></script>
|
|
<script src="https://cdn.datatables.net/1.12.1/js/jquery.dataTables.min.js"></script>
|
|
<script src="https://cdn.datatables.net/1.12.1/js/dataTables.bootstrap5.min.js"></script>
|
|
|
|
<h1><?= $tituloEncuesta ?></h1>
|
|
<p>Respuestas de: <span class="font-weight-bolder"><?= $prestador['nombre'] . ' ' . $prestador['apaterno'] . ' ' . $prestador['amaterno'] ?></span></p>
|
|
|
|
<div class="card">
|
|
<div class="card-body">
|
|
|
|
<table id="table-solicitudes" class="table table-bordered table-striped">
|
|
<thead>
|
|
<th>Pregunta</th>
|
|
<th>Respuesta</th>
|
|
</thead>
|
|
<tbody>
|
|
|
|
<?php foreach ($respuestas as $respuesta) : ?>
|
|
<tr>
|
|
<td><?= $respuesta[0]['question'] ?></td>
|
|
|
|
<!-- Respuestas de opción múltiple -->
|
|
<?php if ($respuesta[0]['type'] === '3') : ?>
|
|
<td>
|
|
<?php foreach ($respuesta as $opcion) : ?>
|
|
<?= $opcion['answer'] ?>
|
|
<br>
|
|
<?php endforeach ?>
|
|
</td>
|
|
<?php else : ?>
|
|
<td><?= $respuesta[0]['answer'] ?></td>
|
|
<?php endif ?>
|
|
</tr>
|
|
<?php endforeach ?>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
let table = new DataTable('#table-solicitudes', {
|
|
'searching': true,
|
|
'ordering': true,
|
|
'language': {
|
|
"decimal": "",
|
|
"emptyTable": "No hay información",
|
|
"info": "Mostrando _START_ a _END_ de _TOTAL_ registros",
|
|
"infoEmpty": "Mostrando 0 to 0 of 0 registros",
|
|
"infoFiltered": "(Filtrado de _MAX_ total registros)",
|
|
"infoPostFix": "",
|
|
"thousands": ",",
|
|
"lengthMenu": "Mostrar _MENU_ registros",
|
|
"loadingRecords": "Cargando...",
|
|
"processing": "Procesando...",
|
|
"search": "Buscar:",
|
|
"zeroRecords": "No se encontraron resultados",
|
|
"paginate": {
|
|
"first": "Primero",
|
|
"last": "Ultimo",
|
|
"next": "Siguiente",
|
|
"previous": "Anterior"
|
|
}
|
|
},
|
|
'order': [],
|
|
});
|
|
});
|
|
</script>
|
|
|
|
<?= $this->endSection() ?>
|