Files
myep-team/templates/admin/system/contact/index.html.twig
T
2023-10-16 12:05:18 +02:00

81 lines
3.3 KiB
Twig

{% extends 'admin/layout.html.twig' %}
{% block title %}Ansprechpartner{% endblock %}
{% block content %}
<h1 class="text-2xl font-bold pb-8">
Ansprechpartner
</h1>
<div class="data-table-wrapper">
<div class="data-table-wrapper__inner">
<table class="data-table">
<thead>
<tr>
<th>
Name
</th>
<th>
E-Mail
</th>
<th>
Destination
</th>
<th></th>
</tr>
</thead>
<tbody>
{% for contact in contacts %}
<tr>
<td>
{{ contact.name }}
</td>
<td>
{{ contact.email }}
</td>
<td>
{{ contact.destination|default('-') }}
</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 den Ansprechpartner wirklich löschen?',
'target-url': path('app_admin_system_contact_delete', { 'id': contact.id })
}) }}>
{{ icon('delete') }}
</button>
<button type="button"
{{ stimulus_controller('modal-button', [], [], {'ajax-modal': '#ajax-modal'}) }}
{{ stimulus_action('modal-button', 'ajax', null, {
'title': 'Ansprechpartner bearbeiten',
'url': path('app_admin_system_contact_edit', { 'id': contact.id })
}) }}>
{{ icon('edit') }}
</button>
</div>
</td>
</tr>
{% else %}
<tr>
<td colspan="7">
Keine Daten...
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
<button type="button"
class="btn"
{{ stimulus_controller('modal-button', [], [], {'ajax-modal': '#ajax-modal'}) }}
{{ stimulus_action('modal-button', 'ajax', null, {
'title': 'Ansprechpartner hinzufügen',
'url': path('app_admin_system_contact_create')
}) }}>
Neu
</button>
{% endblock %}