WIP: Implement admin CRUD

This commit is contained in:
Björn Fromme
2023-09-26 17:44:01 +02:00
parent 3e0353c79b
commit c55fd85314
63 changed files with 1367 additions and 532 deletions
@@ -0,0 +1,14 @@
{{ form_start(form) }}
<div class="flex flex-col space-y-4 pb-8">
{{ form_row(form.name) }}
</div>
<div class="flex items-center space-x-2">
<button type="submit" class="btn">
Speichern
</button>
<a href="{{ path('app_admin_system_training_index') }}" class="btn btn--secondary">
Abbrechen
</a>
</div>
{{ form_rest(form) }}
{{ form_end(form) }}
@@ -0,0 +1,12 @@
{% extends 'admin/layout.html.twig' %}
{% block title %}Einstellungen - Fortbildung anlegen{% endblock %}
{% block content %}
<div class="max-w-screen-sm">
<h1 class="text-2xl font-bold pb-8">
Fortbildung anlegen
</h1>
{% include 'admin/system/training/_form.html.twig' %}
</div>
{% endblock %}
@@ -0,0 +1,12 @@
{% extends 'admin/layout.html.twig' %}
{% block title %}Einstellungen - Fortbildung bearbeiten{% endblock %}
{% block content %}
<div class="max-w-screen-sm">
<h1 class="text-2xl font-bold pb-8">
Fortbildung bearbeiten
</h1>
{% include 'admin/system/training/_form.html.twig' %}
</div>
{% endblock %}
@@ -0,0 +1,51 @@
{% extends 'admin/layout.html.twig' %}
{% block title %}Einstellungen - Fortbildungen{% endblock %}
{% block content %}
<h1 class="text-2xl font-bold pb-8">
Fortbildungen
</h1>
<div class="data-table-wrapper">
<div class="data-table-wrapper__inner">
<table class="data-table">
<thead>
<tr>
<th>
Bezeichnung
</th>
<th>
Teilnahmen
</th>
<th></th>
</tr>
</thead>
<tbody>
{% for training in trainings %}
<tr>
<td>
{{ training.name }}
</td>
<td>
{{ training.trainingAttendances|length|default('-') }}
</td>
<td>
<div class="flex items-center space-x-2 justify-end">
</div>
</td>
</tr>
{% else %}
<tr>
<td colspan="3">
<div class="text-sm">Keine Daten...</div>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
<a href="{{ path('app_admin_system_training_create') }}" class="btn">
Neu
</a>
{% endblock %}