Feat: Add contacts
This commit is contained in:
@@ -71,6 +71,7 @@
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{{ knp_pagination_render(pagination) }}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,23 @@
|
||||
{{ form_start(form) }}
|
||||
<div class="flex flex-col space-y-4 pb-4">
|
||||
{{ form_row(form.name) }}
|
||||
{{ form_row(form.email) }}
|
||||
{{ form_row(form.destination) }}
|
||||
<div>
|
||||
<h4 class="font-bold pb-2">
|
||||
Foto
|
||||
</h4>
|
||||
{% include '_partials/_upload_collection_form.html.twig' with {
|
||||
'endpoint_upload': path('_uploader_upload_photo'),
|
||||
'max_filesize': 5,
|
||||
'max_files': 1,
|
||||
'accepted_files': 'image/jpg,image/jpeg',
|
||||
} %}
|
||||
{{ form_errors(form) }}
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" class="btn">
|
||||
speichern
|
||||
</button>
|
||||
{{ form_rest(form) }}
|
||||
{{ form_end(form) }}
|
||||
@@ -0,0 +1 @@
|
||||
{% include 'admin/system/contact/_form.html.twig' %}
|
||||
@@ -0,0 +1 @@
|
||||
{% include 'admin/system/contact/_form.html.twig' %}
|
||||
@@ -0,0 +1,81 @@
|
||||
{% 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 %}
|
||||
@@ -85,6 +85,7 @@
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{{ knp_pagination_render(pagination) }}
|
||||
</div>
|
||||
</div>
|
||||
<button type="button"
|
||||
|
||||
@@ -2,8 +2,55 @@
|
||||
|
||||
{% block title %}Kontakt{% endblock %}
|
||||
|
||||
{% macro contacts(contacts, email) %}
|
||||
<div class="pb-8">
|
||||
<div class="flex justify-center">
|
||||
<div class="flex flex-wrap items-center">
|
||||
{% for contact in contacts %}
|
||||
<div class="flex flex-col items-center space-y-2 px-8 py-4">
|
||||
{% if contact.photo %}
|
||||
<img src="{{ asset(contact.photo.filename | imagine_filter('profile')) }}"
|
||||
class="w-32 h-auto border-2 border-primary rounded-full"
|
||||
alt="{{ contact.name }}">
|
||||
{% endif %}
|
||||
<div class="font-bold">
|
||||
{{ contact.name }}
|
||||
</div>
|
||||
{% if contact.destination %}
|
||||
<div>
|
||||
{{ contact.destination }}
|
||||
</div>
|
||||
<div>
|
||||
<a href="mailto:{{ contact.email }}" class="underline">{{ contact.email }}</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% if email %}
|
||||
<div class="text-center">
|
||||
<a href="mailto:{{ email }}" class="text-lg fobt-bold underline">{{ email }}</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% block content %}
|
||||
<h1 class="text-2xl font-bold pb-8">
|
||||
Kontakt
|
||||
</h1>
|
||||
<p class="pb-4">
|
||||
Hast du allgemeine Fragen zum Teamer-sein bei E&P Reisen, zur Benutzung von MyE&P Team, zur Abrechnung
|
||||
oder Sonstigem? Hast du schon geschaut, ob deine Frage in den FAQs beantwortet wird?
|
||||
</p>
|
||||
<p>
|
||||
Dann melde dich gerne beim Team Personalplanung!
|
||||
</p>
|
||||
{{ _self.contacts(generalContacts, '[email protected]') }}
|
||||
<p>
|
||||
Hast du Fragen zu deinem nächsten Einsatz in einer konkreten Destination? Dann melde dich gerne bei der*dem
|
||||
zuständigen Reisemanager*in!
|
||||
</p>
|
||||
{{ _self.contacts(destinationContacts) }}
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user