fix: dashboard tiles use onclick navigation, last backup links to record detail
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Universal: Auto Version Bump / Version Bump (push) Has been cancelled
Generic: Repo Health / Release configuration (push) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Universal: Auto Version Bump / Version Bump (push) Has been cancelled
Generic: Repo Health / Release configuration (push) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
Authored-by: Moko Consulting Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -34,79 +34,81 @@ $ajaxUrl = Route::_('index.php?option=com_mokobackup&format=json', false);
|
||||
<div class="row">
|
||||
<!-- Row 1: Status Cards (clickable) -->
|
||||
<div class="col-md-3 mb-3">
|
||||
<a href="<?php echo Route::_('index.php?option=com_mokobackup&view=backups'); ?>" class="text-decoration-none">
|
||||
<div class="card h-100" style="cursor:pointer;" onmouseover="this.classList.add('shadow')" onmouseout="this.classList.remove('shadow')">
|
||||
<div class="card-body text-center">
|
||||
<span class="icon-database fs-1 text-primary" aria-hidden="true"></span>
|
||||
<h5 class="card-title mt-2"><?php echo Text::_('COM_MOKOBACKUP_DASHBOARD_LAST_BACKUP'); ?></h5>
|
||||
<?php if ($this->lastBackup) : ?>
|
||||
<p class="card-text text-success fw-bold">
|
||||
<?php echo HTMLHelper::_('date', $this->lastBackup->backupend, Text::_('DATE_FORMAT_LC4')); ?>
|
||||
</p>
|
||||
<small class="text-muted">
|
||||
<?php echo $this->escape($this->lastBackup->profile_title); ?>
|
||||
—
|
||||
<?php echo HTMLHelper::_('number.bytes', $this->lastBackup->total_size); ?>
|
||||
</small>
|
||||
<?php else : ?>
|
||||
<p class="card-text text-warning"><?php echo Text::_('COM_MOKOBACKUP_DASHBOARD_NO_BACKUPS'); ?></p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3 mb-3">
|
||||
<a href="<?php echo Route::_('index.php?option=com_scheduler&view=tasks'); ?>" class="text-decoration-none">
|
||||
<div class="card h-100" style="cursor:pointer;" onmouseover="this.classList.add('shadow')" onmouseout="this.classList.remove('shadow')">
|
||||
<div class="card-body text-center">
|
||||
<span class="icon-calendar fs-1 text-info" aria-hidden="true"></span>
|
||||
<h5 class="card-title mt-2"><?php echo Text::_('COM_MOKOBACKUP_DASHBOARD_NEXT_SCHEDULED'); ?></h5>
|
||||
<?php if ($this->nextScheduled) : ?>
|
||||
<p class="card-text fw-bold">
|
||||
<?php echo HTMLHelper::_('date', $this->nextScheduled->next_execution, Text::_('DATE_FORMAT_LC4')); ?>
|
||||
</p>
|
||||
<small class="text-muted"><?php echo $this->escape($this->nextScheduled->title); ?></small>
|
||||
<?php else : ?>
|
||||
<p class="card-text text-muted"><?php echo Text::_('COM_MOKOBACKUP_DASHBOARD_NO_SCHEDULED'); ?></p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3 mb-3">
|
||||
<a href="<?php echo Route::_('index.php?option=com_mokobackup&view=backups'); ?>" class="text-decoration-none">
|
||||
<div class="card h-100" style="cursor:pointer;" onmouseover="this.classList.add('shadow')" onmouseout="this.classList.remove('shadow')">
|
||||
<div class="card-body text-center">
|
||||
<span class="icon-copy fs-1 text-secondary" aria-hidden="true"></span>
|
||||
<h5 class="card-title mt-2"><?php echo Text::_('COM_MOKOBACKUP_DASHBOARD_TOTAL_BACKUPS'); ?></h5>
|
||||
<p class="card-text fw-bold fs-3"><?php echo (int) $this->stats->total_count; ?></p>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3 mb-3">
|
||||
<a href="<?php echo Route::_('index.php?option=com_mokobackup&view=backups'); ?>" class="text-decoration-none">
|
||||
<div class="card h-100" style="cursor:pointer;" onmouseover="this.classList.add('shadow')" onmouseout="this.classList.remove('shadow')">
|
||||
<div class="card-body text-center">
|
||||
<span class="icon-folder-open fs-1 text-warning" aria-hidden="true"></span>
|
||||
<h5 class="card-title mt-2"><?php echo Text::_('COM_MOKOBACKUP_DASHBOARD_STORAGE'); ?></h5>
|
||||
<p class="card-text fw-bold fs-3">
|
||||
<?php echo HTMLHelper::_('number.bytes', (int) $this->stats->total_size); ?>
|
||||
<div class="card h-100 mb-tile" role="link" data-href="<?php echo $this->lastBackup ? Route::_('index.php?option=com_mokobackup&view=backup&id=' . $this->lastBackup->id) : Route::_('index.php?option=com_mokobackup&view=backups'); ?>">
|
||||
<div class="card-body text-center">
|
||||
<span class="icon-database fs-1 text-primary" aria-hidden="true"></span>
|
||||
<h5 class="card-title mt-2"><?php echo Text::_('COM_MOKOBACKUP_DASHBOARD_LAST_BACKUP'); ?></h5>
|
||||
<?php if ($this->lastBackup) : ?>
|
||||
<p class="card-text text-success fw-bold">
|
||||
<?php echo HTMLHelper::_('date', $this->lastBackup->backupend, Text::_('DATE_FORMAT_LC4')); ?>
|
||||
</p>
|
||||
<?php if ($this->stats->fail_count_7d > 0) : ?>
|
||||
<span class="badge bg-danger">
|
||||
<?php echo Text::sprintf('COM_MOKOBACKUP_DASHBOARD_FAILURES_7D', $this->stats->fail_count_7d); ?>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<small class="text-muted">
|
||||
<?php echo $this->escape($this->lastBackup->profile_title); ?>
|
||||
—
|
||||
<?php echo HTMLHelper::_('number.bytes', $this->lastBackup->total_size); ?>
|
||||
</small>
|
||||
<?php else : ?>
|
||||
<p class="card-text text-warning"><?php echo Text::_('COM_MOKOBACKUP_DASHBOARD_NO_BACKUPS'); ?></p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="card h-100 mb-tile" role="link" data-href="<?php echo Route::_('index.php?option=com_scheduler&view=tasks'); ?>">
|
||||
<div class="card-body text-center">
|
||||
<span class="icon-calendar fs-1 text-info" aria-hidden="true"></span>
|
||||
<h5 class="card-title mt-2"><?php echo Text::_('COM_MOKOBACKUP_DASHBOARD_NEXT_SCHEDULED'); ?></h5>
|
||||
<?php if ($this->nextScheduled) : ?>
|
||||
<p class="card-text fw-bold">
|
||||
<?php echo HTMLHelper::_('date', $this->nextScheduled->next_execution, Text::_('DATE_FORMAT_LC4')); ?>
|
||||
</p>
|
||||
<small class="text-muted"><?php echo $this->escape($this->nextScheduled->title); ?></small>
|
||||
<?php else : ?>
|
||||
<p class="card-text text-muted"><?php echo Text::_('COM_MOKOBACKUP_DASHBOARD_NO_SCHEDULED'); ?></p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="card h-100 mb-tile" role="link" data-href="<?php echo Route::_('index.php?option=com_mokobackup&view=backups'); ?>">
|
||||
<div class="card-body text-center">
|
||||
<span class="icon-copy fs-1 text-secondary" aria-hidden="true"></span>
|
||||
<h5 class="card-title mt-2"><?php echo Text::_('COM_MOKOBACKUP_DASHBOARD_TOTAL_BACKUPS'); ?></h5>
|
||||
<p class="card-text fw-bold fs-3"><?php echo (int) $this->stats->total_count; ?></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="card h-100 mb-tile" role="link" data-href="<?php echo Route::_('index.php?option=com_mokobackup&view=backups'); ?>">
|
||||
<div class="card-body text-center">
|
||||
<span class="icon-folder-open fs-1 text-warning" aria-hidden="true"></span>
|
||||
<h5 class="card-title mt-2"><?php echo Text::_('COM_MOKOBACKUP_DASHBOARD_STORAGE'); ?></h5>
|
||||
<p class="card-text fw-bold fs-3">
|
||||
<?php echo HTMLHelper::_('number.bytes', (int) $this->stats->total_size); ?>
|
||||
</p>
|
||||
<?php if ($this->stats->fail_count_7d > 0) : ?>
|
||||
<span class="badge bg-danger">
|
||||
<?php echo Text::sprintf('COM_MOKOBACKUP_DASHBOARD_FAILURES_7D', $this->stats->fail_count_7d); ?>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.mb-tile { cursor: pointer; transition: box-shadow 0.2s, transform 0.1s; }
|
||||
.mb-tile:hover { box-shadow: 0 .5rem 1rem rgba(0,0,0,.15); transform: translateY(-2px); }
|
||||
</style>
|
||||
<script>
|
||||
document.querySelectorAll('.mb-tile').forEach(function(tile) {
|
||||
tile.addEventListener('click', function() { window.location.href = this.dataset.href; });
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- Row 2: Quick Actions -->
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-6">
|
||||
|
||||
Reference in New Issue
Block a user