mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Avances
This commit is contained in:
@ -6,23 +6,67 @@
|
||||
<!--Content Body-->
|
||||
<div class="row mt-4">
|
||||
<div class="col-md-12">
|
||||
<h4 class="mb-4">Backups disponibles</h4>
|
||||
<a href="<?= route_to('backupsCreate') ?>" class="btn btn-primary mb-3">Crear backup</a>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table id="tablaBackups" class="table table-striped table-hover w-100">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Archivo</th>
|
||||
<th>Fecha</th>
|
||||
<th>Tamaño</th>
|
||||
<th>Local</th>
|
||||
<th>Remoto</th>
|
||||
<th>Acciones</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($backups as $b): ?>
|
||||
<tr>
|
||||
<td><?= esc($b['filename']) ?></td>
|
||||
<td><?= esc($b['fecha']) ?></td>
|
||||
<td><?= esc($b['tamano']) ?></td>
|
||||
<td><span class="badge bg-<?= $b['local'] ? 'success' : 'secondary' ?>">
|
||||
<?= $b['local'] ? 'Sí' : 'No' ?>
|
||||
</span></td>
|
||||
<td><span class="badge bg-<?= $b['remoto'] ? 'info' : 'secondary' ?>">
|
||||
<?= $b['remoto'] ? 'Sí' : 'No' ?>
|
||||
</span></td>
|
||||
<td class="text-nowrap">
|
||||
<?php if ($b['local']): ?>
|
||||
<a href="<?= base_url('backups/restore/' . $b['filename']) ?>"
|
||||
class="btn btn-sm btn-warning">Restaurar</a>
|
||||
<a href="<?= base_url('backups/delete-local/' . $b['id']) ?>"
|
||||
class="btn btn-sm btn-danger">Eliminar local</a>
|
||||
<?php elseif ($b['remoto']): ?>
|
||||
<a href="<?= base_url('backups/restore/' . $b['filename'] . '/remote') ?>"
|
||||
class="btn btn-sm btn-warning">Restaurar Remoto</a>
|
||||
<?php else: ?>
|
||||
<span class="text-muted">No disponible</span>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<h2>Backups disponibles</h2>
|
||||
<a href="<?= route_to('backupsCreate') ?>">Crear backup</a>
|
||||
<ul>
|
||||
<?php foreach ($files as $file): ?>
|
||||
<li>
|
||||
<?= $file ?>
|
||||
<a href="<?= base_url('backups/restore/' . $file) ?>">[Restaurar]</a>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?= session('message') ?>
|
||||
</div>
|
||||
</div>
|
||||
<?= $this->endSection() ?>
|
||||
|
||||
<?= $this->section('additionalInlineJs') ?>
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$('#tablaBackups').DataTable({
|
||||
order: [[1, 'desc']],
|
||||
language: {
|
||||
url: '/assets/vendor/datatables/i18n/es-ES.json' // ajusta si usas idioma español
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?= $this->endSection() ?>
|
||||
Reference in New Issue
Block a user