v1.9.1: fix world map rendering and resolve eight small TODO items
World map: - Fix zero-padded ISO numeric ids leaving 31 countries unrendered (Brazil, Australia, Belgium, Austria, Algeria and more) - Fix Russia and Fiji smearing across the full map width at the antimeridian by unwrapping ring longitudes and drawing them at both edges - Crop to 84N-60S, add evenodd fill rule, 174 countries rendered Improvements: - Logger::tail() reads backwards in chunks instead of loading the whole file - External links get rel=noopener noreferrer in footer and Markdown content - formatDisplayName() cleaned up and guarded against empty input - Export statistics as CSV (Excel BOM) or JSON - GeoIP database auto-updates when older than 35 days - Editor shortcuts Ctrl/Cmd+S to save and Ctrl/Cmd+N for a new page - Live search filter in the admin content browser - Content versioning with timestamped .bak copies in content/-backups/ Also removes eight stale TODO entries that were already implemented
This commit is contained in:
@@ -45,7 +45,7 @@
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="d-flex gap-2 mt-3">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
<button type="submit" class="btn btn-primary" title="Opslaan (Ctrl+S)">
|
||||
<i class="bi bi-check-lg"></i> Opslaan
|
||||
</button>
|
||||
<?php if ($isEditable): ?>
|
||||
|
||||
@@ -57,6 +57,14 @@
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="card shadow-sm">
|
||||
<div class="card-header bg-white py-2">
|
||||
<div class="input-group input-group-sm">
|
||||
<span class="input-group-text bg-white border-end-0"><i class="bi bi-search text-muted"></i></span>
|
||||
<input type="search" id="contentFilter" class="form-control border-start-0"
|
||||
placeholder="Filter op bestands- of mapnaam…" autocomplete="off" aria-label="Filter content">
|
||||
<span class="input-group-text bg-white text-muted" id="contentFilterCount"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover mb-0">
|
||||
<thead>
|
||||
@@ -73,7 +81,7 @@
|
||||
<tr><td colspan="5" class="text-muted text-center py-4">Geen bestanden gevonden.</td></tr>
|
||||
<?php else: ?>
|
||||
<?php foreach ($items as $item): ?>
|
||||
<tr>
|
||||
<tr data-name="<?= htmlspecialchars(mb_strtolower($item['name'])) ?>">
|
||||
<td>
|
||||
<?php if ($item['is_dir']): ?>
|
||||
<a href="/admin/content?dir=<?= urlencode($item['path']) ?>">
|
||||
@@ -134,11 +142,55 @@
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
<tr id="contentFilterEmpty" class="d-none">
|
||||
<td colspan="5" class="text-muted text-center py-4">Geen resultaten voor deze filter.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
(function () {
|
||||
var input = document.getElementById('contentFilter');
|
||||
var counter = document.getElementById('contentFilterCount');
|
||||
var emptyRow = document.getElementById('contentFilterEmpty');
|
||||
if (!input) return;
|
||||
|
||||
var rows = Array.prototype.slice.call(document.querySelectorAll('tbody tr[data-name]'));
|
||||
|
||||
function apply() {
|
||||
var q = input.value.trim().toLowerCase();
|
||||
var shown = 0;
|
||||
|
||||
rows.forEach(function (row) {
|
||||
var match = q === '' || row.getAttribute('data-name').indexOf(q) !== -1;
|
||||
row.classList.toggle('d-none', !match);
|
||||
if (match) shown++;
|
||||
});
|
||||
|
||||
if (emptyRow) {
|
||||
emptyRow.classList.toggle('d-none', shown > 0 || rows.length === 0);
|
||||
}
|
||||
if (counter) {
|
||||
counter.textContent = q === ''
|
||||
? rows.length + ' items'
|
||||
: shown + ' van ' + rows.length;
|
||||
}
|
||||
}
|
||||
|
||||
input.addEventListener('input', apply);
|
||||
input.addEventListener('keydown', function (e) {
|
||||
if (e.key === 'Escape') {
|
||||
input.value = '';
|
||||
apply();
|
||||
}
|
||||
});
|
||||
|
||||
apply();
|
||||
})();
|
||||
</script>
|
||||
|
||||
<!-- Create Directory Modal -->
|
||||
<div class="modal fade" id="createDirModal" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
|
||||
@@ -20,10 +20,20 @@ $periodLabels = [7 => 'Laatste 7 dagen', 30 => 'Laatste 30 dagen', 90 => 'Laatst
|
||||
|
||||
<div class="d-flex justify-content-between align-items-center mb-4 flex-wrap gap-2">
|
||||
<h2 class="mb-0"><i class="bi bi-bar-chart"></i> Statistieken</h2>
|
||||
<div class="btn-group">
|
||||
<?php foreach ($periodLabels as $p => $label): ?>
|
||||
<a href="/admin/statistics?period=<?= $p ?>" class="btn btn-sm <?= $period === $p ? 'btn-primary' : 'btn-outline-secondary' ?>"><?= htmlspecialchars($label) ?></a>
|
||||
<?php endforeach; ?>
|
||||
<div class="d-flex gap-2 flex-wrap">
|
||||
<div class="btn-group">
|
||||
<?php foreach ($periodLabels as $p => $label): ?>
|
||||
<a href="/admin/statistics?period=<?= $p ?>" class="btn btn-sm <?= $period === $p ? 'btn-primary' : 'btn-outline-secondary' ?>"><?= htmlspecialchars($label) ?></a>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<a href="/admin/statistics?period=<?= $period ?>&export=csv" class="btn btn-sm btn-outline-success" title="Exporteer als CSV">
|
||||
<i class="bi bi-filetype-csv"></i> CSV
|
||||
</a>
|
||||
<a href="/admin/statistics?period=<?= $period ?>&export=json" class="btn btn-sm btn-outline-success" title="Exporteer als JSON">
|
||||
<i class="bi bi-filetype-json"></i> JSON
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user