- 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
71 lines
3.7 KiB
Twig
71 lines
3.7 KiB
Twig
{% extends "layouts/admin.twig" %}
|
|
|
|
{% block title %}Plugins - CodePress Admin{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="d-flex justify-content-between align-items-center mb-4">
|
|
<h2><i class="bi bi-plug"></i> Plugins</h2>
|
|
<a href="/admin/plugins-new" class="btn btn-primary btn-sm">
|
|
<i class="bi bi-plus-lg"></i> Nieuwe plugin
|
|
</a>
|
|
</div>
|
|
|
|
<div class="row g-4">
|
|
{% for plugin in plugins %}
|
|
<div class="col-md-6 col-lg-4">
|
|
<div class="card shadow-sm h-100">
|
|
<div class="card-header d-flex justify-content-between align-items-center">
|
|
<span class="fw-bold">{{ plugin.name|default(plugin.name) }}</span>
|
|
<span class="badge bg-{{ plugin.enabled ? 'success' : 'secondary' }}">{{ plugin.enabled ? 'Actief' : 'Inactief' }}</span>
|
|
</div>
|
|
<div class="card-body">
|
|
<p class="card-text text-muted mb-2">{{ plugin.description|default('Geen beschrijving') }}</p>
|
|
<p class="small text-muted mb-3">
|
|
{% if plugin.version %}<span class="badge bg-info">v{{ plugin.version }}</span>{% endif %}
|
|
{% if plugin.author %}<span class="badge bg-secondary">{{ plugin.author }}</span>{% endif %}
|
|
</p>
|
|
</div>
|
|
<div class="card-footer bg-white">
|
|
<div class="btn-group w-100" role="group">
|
|
{% if plugin.protected %}
|
|
<span class="btn btn-sm btn-outline-secondary disabled" title="Essentiële plugin - kan niet worden bewerkt, gedeactiveerd of verwijderd">
|
|
<i class="bi bi-shield-check"></i> Essentieel
|
|
</span>
|
|
{% else %}
|
|
<a href="/admin/plugins-edit?plugin={{ plugin.name|url_encode }}" class="btn btn-sm btn-outline-primary">
|
|
<i class="bi bi-pencil"></i> Bewerken
|
|
</a>
|
|
{% if plugin.hasConfig %}
|
|
<a href="/admin/plugins-config?plugin={{ plugin.name|url_encode }}" class="btn btn-sm btn-outline-info">
|
|
<i class="bi bi-gear"></i> Config
|
|
</a>
|
|
{% endif %}
|
|
<form method="POST" action="/admin/plugins-toggle" class="d-inline">
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
|
|
<input type="hidden" name="plugin" value="{{ plugin.name }}">
|
|
<button type="submit" class="btn btn-sm btn-{{ plugin.enabled ? 'outline-warning' : 'outline-success' }}">
|
|
<i class="bi bi-{{ plugin.enabled ? 'pause' : 'play' }}"></i> {{ plugin.enabled ? 'Deactiveren' : 'Activeren' }}
|
|
</button>
|
|
</form>
|
|
<form method="POST" action="/admin/plugins-delete" class="d-inline" onsubmit="return confirm('Weet je zeker dat je deze plugin wilt verwijderen?')">
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
|
|
<input type="hidden" name="plugin" value="{{ plugin.name }}">
|
|
<button type="submit" class="btn btn-sm btn-outline-danger">
|
|
<i class="bi bi-trash"></i>
|
|
</button>
|
|
</form>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% else %}
|
|
<div class="col-12">
|
|
<div class="alert alert-info">
|
|
<i class="bi bi-info-circle"></i> Geen plugins gevonden. Maak een nieuwe plugin aan om te beginnen.
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
{% endblock %}
|