feat: rename admin screen, allow deleting a resource

This commit is contained in:
fromme committed 2026-09-17 17:56:44 +02:00
1 parent dc1822b8cf
commit 5e5bf00f8f
7 files changed
+197 -9

No files matched your search

+8 -4
View File
@@ -3,11 +3,12 @@
here once saved -- the same shape as the sibling apps' admin lists.
Retired resources stay listed, muted, because this is the only place they can be reactivated.
Only an empty room offers "Löschen"; DeleteController refuses the rest regardless.
Only an empty room offers "Löschen"; DeleteController refuses the rest regardless. A resource
can always be deleted, taking its bookings with it -- the modal says how many.
#}
{% extends 'layout.html.twig' %}
{% block title %}Plätze & Räume · ephub{% endblock %}
{% block title %}Ressourcen · ephub{% endblock %}
{% macro opener(url, label, variant = 'neutral') %}
<button type="button" class="button button--small button--{{ variant }}"
@@ -29,7 +30,10 @@
<span class="badge bg-gray-100 text-gray-600 ml-1">nicht buchbar</span>
{% endif %}
</span>
{{ _self.opener(path('app_admin_resource_edit', { id: resource.id }), 'Bearbeiten') }}
<div class="flex gap-2">
{{ _self.opener(path('app_admin_resource_edit', { id: resource.id }), 'Bearbeiten') }}
{{ _self.opener(path('app_admin_resource_delete', { id: resource.id }), 'Löschen') }}
</div>
</li>
{% endfor %}
</ul>
@@ -39,7 +43,7 @@
{% block content %}
<a class="text-sm text-gray-500 hover:text-gray-900" href="{{ path('app_dashboard') }}">← Übersicht</a>
<h1 class="pt-2">Plätze & Räume</h1>
<h1 class="pt-2">Ressourcen</h1>
<p class="subline">Was gebucht werden kann und wo es steht.</p>
{% for section in sections %}