New features: - ContentBackup class with ZIP backup/restore and git versioning - Admin backup & restore page (content-backup.twig) with git init/commit/log/restore - Plugin type system: system (blue) vs content (green) with visual badges - PluginAPIInterface + AdminPluginAPI for plugin architecture - Essential plugin flag (cannot edit/deactivate/delete) Improvements: - Consolidated enabled_plugins config (removed plugins.enabled) - Removed Analytics/Logging toggles from admin config page - Fixed Dashboard plugin Twig comments rendered as text - Updated 20 guide files (NL+EN): configuratie, plugins, plugin-development, core-classes, theme-json, layouts, scss-styling, admin-beheerder, nieuw-thema, architectuur - Improved accessibility test script (grep -E, min/max checks) Cleanup: - Removed unused classes: ARIAComponents, AccessibilityManager, ContentSecurityPolicy, etc. - Removed vendor packages: mustache/mustache, php-mqtt/client - Removed old templates: logs.twig, statistics.twig (now plugins) - Moved language files to language/ directory Tests: - Pentest: 30/30 passed, 0 vulnerabilities - WCAG 2.1 AA: 25/25 passed, 100% compliance
82 lines
4.9 KiB
Twig
82 lines
4.9 KiB
Twig
{% extends "layouts/admin.twig" %}
|
|
|
|
{% block title %}{{ ta.plugins|default('Plugins') }} - {{ ta.admin_title|default('CodePress Admin') }}{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="d-flex justify-content-between align-items-center mb-4">
|
|
<h2><i class="bi bi-plug"></i> {{ ta.plugins|default('Plugins') }}</h2>
|
|
<a href="/admin/plugins-new" class="btn btn-primary btn-sm">
|
|
<i class="bi bi-plus-lg"></i> {{ ta.new_plugin|default('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 {% if plugin.type == 'system' %}border-primary{% elseif plugin.type == 'content' %}border-success{% endif %}">
|
|
<div class="card-header d-flex justify-content-between align-items-center">
|
|
<span class="fw-bold">
|
|
{% if plugin.type == 'system' %}<i class="bi bi-gear-fill text-primary"></i>
|
|
{% elseif plugin.type == 'content' %}<i class="bi bi-puzzle-fill text-success"></i>
|
|
{% else %}<i class="bi bi-plug-fill"></i>{% endif %}
|
|
{{ plugin.name|default(plugin.name) }}
|
|
</span>
|
|
<div class="d-flex gap-1">
|
|
{% if plugin.type == 'system' %}
|
|
<span class="badge bg-primary">{{ ta.plugin_type_system|default('Systeem') }}</span>
|
|
{% elseif plugin.type == 'content' %}
|
|
<span class="badge bg-success">{{ ta.plugin_type_content|default('Content') }}</span>
|
|
{% endif %}
|
|
<span class="badge bg-{{ plugin.enabled ? 'success' : 'secondary' }}">{{ plugin.enabled ? ta.active|default('Actief') : ta.inactive|default('Inactief') }}</span>
|
|
</div>
|
|
</div>
|
|
<div class="card-body">
|
|
<p class="card-text text-muted mb-2">{{ plugin.description|default(ta.no_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 or plugin.essential %}
|
|
<span class="btn btn-sm btn-outline-secondary disabled" title="{{ ta.essential_title|default('Essentiële plugin - kan niet worden bewerkt, gedeactiveerd of verwijderd') }}">
|
|
<i class="bi bi-shield-check"></i> {{ ta.essential|default('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> {{ ta.edit|default('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> {{ ta.config|default('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 ? ta.deactivate|default('Deactiveren') : ta.activate|default('Activeren') }}
|
|
</button>
|
|
</form>
|
|
<form method="POST" action="/admin/plugins-delete" class="d-inline" onsubmit="return confirm('{{ ta.confirm_delete_plugin|default('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> {{ ta.no_plugins|default('Geen plugins gevonden. Maak een nieuwe plugin aan om te beginnen.') }}
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
{% endblock %} |