Files
CodePress/admin/theme/default/views/pages/plugins-new.twig
T
E.Noorlander c2bcd7be22 System plugin support: admin menu items, admin routes, API integration
- PluginManager: getAdminMenuItems(), handleAdminRoute(), getPluginType()
- admin.php: load PluginManager, pass plugin_admin_menu to Twig
- admin.php: route to plugin admin pages via handleAdminRoute()
- admin.twig: show 'Plugins' sidebar section for system plugins
- plugins-new.twig: choose content or system plugin type
- handlePluginsNew: generate proper template based on type (content/system)
- plugin-admin.twig: renders plugin output in admin layout
- GeoIPInfo: example system plugin (admin page with GeoIP info)
- System plugins: getAdminMenu(), getAdminRoutes(), handleAdminRoute()
- Content plugins: getSidebarContent() (unchanged)
2026-08-11 18:06:17 +02:00

39 lines
1.7 KiB
Twig

{% extends "layouts/admin.twig" %}
{% block title %}Nieuwe plugin - CodePress Admin{% endblock %}
{% block content %}
<h2 class="mb-4"><i class="bi bi-plug"></i> Nieuwe plugin aanmaken</h2>
<form method="post" class="card shadow-sm">
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
<div class="card-body">
<div class="mb-3">
<label for="name" class="form-label">Plugin naam</label>
<input type="text" class="form-control" id="name" name="name" required autofocus>
<small class="form-text text-muted">Alleen letters, cijfers, underscores en streepjes.</small>
</div>
<div class="mb-3">
<label class="form-label">Plugin type</label>
<div class="form-check">
<input class="form-check-input" type="radio" name="type" id="type-content" value="content" checked>
<label class="form-check-label" for="type-content">
<strong>Content plugin</strong> — Verschijnt in de sidebar op content pagina's
</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="type" id="type-system" value="system">
<label class="form-check-label" for="type-system">
<strong>Systeem plugin</strong> — Voegt functionaliteit toe aan het CMS (admin menu, API)
</label>
</div>
</div>
</div>
<div class="card-footer bg-white">
<button type="submit" class="btn btn-primary">
<i class="bi bi-check-lg"></i> Aanmaken
</button>
<a href="/admin/plugins" class="btn btn-outline-secondary">Annuleren</a>
</div>
</form>
{% endblock %}