v2.5.1: Admin theme refactor, Navigation plugin, user roles, guide restructure

- Reorganize admin into admin/theme/default/ (views + assets)
- Rename GuideNav to Navigation plugin (essential, protected)
- Plugin assets support (SCSS/CSS) loaded after theme CSS
- User roles: Admin, Content Manager, BI Manager, Site Admin
- Role-based access control (RBAC) for admin routes and sidebar
- Guide restructure: sub-topics in separate folders with sidebar nav
- Dynamic breadcrumb for homepage and subdirectories
- Fix theme path traversal (../../ -> ../) in admin.php
- Fix CodeMirror mode load order (xml -> css -> js -> htmlmixed -> php)
- Fix editor-toolbar.js null checks for plugin edit pages
- Layout select from theme.json with live frontmatter update
- Footer sticky at bottom of viewport (min-height: 100vh)
- Breadcrumb color fix (var(--nav-font) -> var(--header-bg))
- Remove language switcher from guide pages
- Update README.md and README.en.md
- Bump version to 2.5.1
This commit is contained in:
2026-08-10 15:36:29 +02:00
parent 0961b23b8d
commit cd498c8c3a
209 changed files with 11033 additions and 9125 deletions
+62
View File
@@ -0,0 +1,62 @@
{% extends "layouts/admin.twig" %}
{% block title %}Logs - CodePress Admin{% endblock %}
{% block content %}
<h2 class="mb-4"><i class="bi bi-journal-text"></i> Logs</h2>
<div class="card shadow-sm mb-4">
<div class="card-body">
<form method="GET" action="/admin/logs" class="row g-3 align-items-end">
<div class="col-auto">
<div class="btn-group" role="group">
<a href="/admin/logs?tab=admin" class="btn btn-sm {{ tab == 'admin' ? 'btn-primary' : 'btn-outline-primary' }}">
<i class="bi bi-shield-check"></i> Admin
</a>
<a href="/admin/logs?tab=requests" class="btn btn-sm {{ tab == 'requests' ? 'btn-primary' : 'btn-outline-primary' }}">
<i class="bi bi-globe"></i> Requests
</a>
</div>
</div>
<div class="col-auto">
<a href="/admin/logs?tab={{ tab }}&download=1" class="btn btn-sm btn-outline-secondary">
<i class="bi bi-download"></i> Download
</a>
</div>
</form>
</div>
</div>
<div class="card shadow-sm">
<div class="card-body p-0" style="max-height: 600px; overflow-y: auto;">
<table class="table table-sm table-hover mb-0">
<thead class="sticky-top bg-white">
<tr>
<th>Tijd</th>
<th>Level</th>
<th>IP</th>
<th>Bericht</th>
</tr>
</thead>
<tbody>
{% for log in logs %}
<tr>
<td class="text-muted">{{ log.time }}</td>
<td>
<span class="badge bg-{{ log.level == 'warning' ? 'warning text-dark' : (log.level == 'error' ? 'danger' : 'info') }}">
{{ log.level }}
</span>
</td>
<td class="text-muted">{{ log.ip }}</td>
<td><code class="text-muted">{{ log.message }}</code></td>
</tr>
{% else %}
<tr>
<td colspan="4" class="text-muted text-center py-4">Geen logs gevonden.</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
{% endblock %}