WIP: Implement CRUD, improve menu configuration
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
{{ form_start(form) }}
|
||||
<div class="flex flex-col space-y-4 pb-8">
|
||||
{{ form_row(form.question) }}
|
||||
{{ form_row(form.answer) }}
|
||||
</div>
|
||||
<div class="flex items-center space-x-2">
|
||||
<button type="submit" class="btn">
|
||||
Speichern
|
||||
</button>
|
||||
<a href="{{ path('app_admin_system_faq_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 - FAQ anlegen{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="max-w-screen-sm">
|
||||
<h1 class="text-2xl font-bold pb-8">
|
||||
FAQ anlegen
|
||||
</h1>
|
||||
{% include 'admin/system/faq/_form.html.twig' %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,12 @@
|
||||
{% extends 'admin/layout.html.twig' %}
|
||||
|
||||
{% block title %}Einstellungen - FAQ bearbeiten{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="max-w-screen-sm">
|
||||
<h1 class="text-2xl font-bold pb-8">
|
||||
FAQ bearbeiten
|
||||
</h1>
|
||||
{% include 'admin/system/faq/_form.html.twig' %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,67 @@
|
||||
{% extends 'admin/layout.html.twig' %}
|
||||
|
||||
{% block title %}Einstellungen - FAQ{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1 class="text-2xl font-bold pb-8">
|
||||
FAQ
|
||||
</h1>
|
||||
<div class="data-table-wrapper">
|
||||
<div class="data-table-wrapper__inner">
|
||||
<table class="data-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="w-2/5">
|
||||
Frage
|
||||
</th>
|
||||
<th class="w-2/5">
|
||||
Antwort
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody {{ stimulus_controller('sortable', { 'endpoint': path('app_admin_system_faq_sort') }) }}>
|
||||
{% for faq in faqs %}
|
||||
<tr {{ stimulus_target('sortable', 'item') }} data-item-id="{{ faq.id }}">
|
||||
<td>
|
||||
{{ faq.question }}
|
||||
</td>
|
||||
<td>
|
||||
{{ faq.answer|u.truncate(64, '...') }}
|
||||
</td>
|
||||
<td>
|
||||
<div class="flex items-center space-x-2 justify-end">
|
||||
<button type="button"
|
||||
class="text-red-500"
|
||||
{{ stimulus_controller('modal-button', [], [], {'confirmation-modal': '#confirmation-modal'}) }}
|
||||
{{ stimulus_action('modal-button', 'confirmation', null, {
|
||||
'title': 'Bist du sicher?',
|
||||
'content': 'Möchtest du das Honorar wirklich löschen?',
|
||||
'target-url': path('app_admin_system_faq_delete', { 'id': faq.id })
|
||||
}) }}>
|
||||
{{ icon('delete') }}
|
||||
</button>
|
||||
<a href="{{ path('app_admin_system_faq_edit', { 'id': faq.id }) }}">
|
||||
{{ icon('edit') }}
|
||||
</a>
|
||||
<button type="button" class="cursor-move" {{ stimulus_target('sortable', 'handle') }}>
|
||||
{{ icon('sort') }}
|
||||
</button>
|
||||
</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_faq_create') }}" class="btn">
|
||||
Neu
|
||||
</a>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,12 @@
|
||||
{% extends 'admin/layout.html.twig' %}
|
||||
|
||||
{% block title %}Einstellungen - Job-Profil bearbeiten{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="max-w-screen-sm">
|
||||
<h1 class="text-2xl font-bold pb-8">
|
||||
Job-Profil bearbeiten
|
||||
</h1>
|
||||
{% include 'admin/system/job_profile/_form.html.twig' %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -30,13 +30,30 @@
|
||||
{{ jobProfile.name }}
|
||||
</td>
|
||||
<td>
|
||||
{{ jobProfile.requiredTraining|default('-') }}
|
||||
{{ jobProfile.requiredTraining.name|default('-') }}
|
||||
</td>
|
||||
<td>
|
||||
{{ jobProfile.requiredLicenses|join(', ') }}
|
||||
<div class="flex items-center space-x-2">
|
||||
{% for license in jobProfile.requiredLicenses %}
|
||||
{{ icon(license, 'w-5 h-5') }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="flex items-center space-x-2 justify-end">
|
||||
<button type="button"
|
||||
class="text-red-500"
|
||||
{{ stimulus_controller('modal-button', [], [], {'confirmation-modal': '#confirmation-modal'}) }}
|
||||
{{ stimulus_action('modal-button', 'confirmation', null, {
|
||||
'title': 'Bist du sicher?',
|
||||
'content': 'Möchtest du das Job-Profil wirklich löschen?',
|
||||
'target-url': path('app_admin_system_job_profile_delete', { 'id': jobProfile.id })
|
||||
}) }}>
|
||||
{{ icon('delete') }}
|
||||
</button>
|
||||
<a href="{{ path('app_admin_system_job_profile_edit', { 'id': jobProfile.id }) }}">
|
||||
{{ icon('edit') }}
|
||||
</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -31,6 +31,19 @@
|
||||
</td>
|
||||
<td>
|
||||
<div class="flex items-center space-x-2 justify-end">
|
||||
<button type="button"
|
||||
class="text-red-500"
|
||||
{{ stimulus_controller('modal-button', [], [], {'confirmation-modal': '#confirmation-modal'}) }}
|
||||
{{ stimulus_action('modal-button', 'confirmation', null, {
|
||||
'title': 'Bist du sicher?',
|
||||
'content': 'Möchtest du die Fortbildung wirklich löschen?',
|
||||
'target-url': path('app_admin_system_training_delete', { 'id': training.id })
|
||||
}) }}>
|
||||
{{ icon('delete') }}
|
||||
</button>
|
||||
<a href="{{ path('app_admin_system_training_edit', { 'id': training.id }) }}">
|
||||
{{ icon('edit') }}
|
||||
</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user