feat: improve layout of contacts page
This commit is contained in:
@@ -23,3 +23,8 @@ liip_imagine:
|
|||||||
jpeg_quality: 75
|
jpeg_quality: 75
|
||||||
filters:
|
filters:
|
||||||
thumbnail: { size: [ 128, 128 ], mode: outbound }
|
thumbnail: { size: [ 128, 128 ], mode: outbound }
|
||||||
|
contact:
|
||||||
|
format: jpeg
|
||||||
|
jpeg_quality: 75
|
||||||
|
filters:
|
||||||
|
thumbnail: { size: [ 256, 256 ], mode: outbound }
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Controller\Teamer;
|
namespace App\Controller\Teamer;
|
||||||
|
|
||||||
|
use App\Entity\Contact;
|
||||||
use App\Repository\ContactRepository;
|
use App\Repository\ContactRepository;
|
||||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
@@ -15,19 +16,23 @@ class ContactController extends AbstractController
|
|||||||
#[Route('/teamer/contact', name: 'app_teamer_contact')]
|
#[Route('/teamer/contact', name: 'app_teamer_contact')]
|
||||||
public function index(): Response
|
public function index(): Response
|
||||||
{
|
{
|
||||||
$generalContacts = $this
|
$allContacts = $this
|
||||||
->contactRepository
|
->contactRepository
|
||||||
->getGeneralContacts()
|
->findAll()
|
||||||
;
|
;
|
||||||
|
|
||||||
$destinationContacts = $this
|
$contacts = [
|
||||||
->contactRepository
|
Contact::CATEGORY_HR => [],
|
||||||
->getDestinationContacts()
|
Contact::CATEGORY_MANAGEMENT => [],
|
||||||
;
|
Contact::CATEGORY_HOUSE_MANAGEMENT => [],
|
||||||
|
];
|
||||||
|
|
||||||
|
foreach ($allContacts as $contact) {
|
||||||
|
$contacts[$contact->getCategory()][] = $contact;
|
||||||
|
}
|
||||||
|
|
||||||
return $this->render('teamer/contact/index.html.twig', [
|
return $this->render('teamer/contact/index.html.twig', [
|
||||||
'generalContacts' => $generalContacts,
|
'contacts' => $contacts,
|
||||||
'destinationContacts' => $destinationContacts,
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,37 +2,32 @@
|
|||||||
|
|
||||||
{% block title %}Kontakt{% endblock %}
|
{% block title %}Kontakt{% endblock %}
|
||||||
|
|
||||||
{% macro contacts(contacts, email) %}
|
{% macro contact(contact) %}
|
||||||
<div class="pb-8">
|
<div class="flex flex-col items-center space-y-2 px-8 py-4 w-48 md:w-64">
|
||||||
<div class="flex justify-center">
|
{% if contact.photo %}
|
||||||
<div class="flex flex-wrap items-center">
|
<div class="relative group">
|
||||||
{% for contact in contacts %}
|
<img src="{{ asset(contact.photo.filename | imagine_filter('contact')) }}"
|
||||||
<div class="flex flex-col items-center space-y-2 px-8 py-4">
|
class="w-40 md:w-48 h-auto border-2 border-primary rounded-full"
|
||||||
{% if contact.photo %}
|
alt="{{ contact.name }}">
|
||||||
<img src="{{ asset(contact.photo.filename | imagine_filter('profile')) }}"
|
<div class="absolute top-0 left-0 inset-0 rounded-full flex flex-col items-center justify-center space-y-2 bg-primary/80 text-white invisible group-hover:visible">
|
||||||
class="w-32 h-auto border-2 border-primary rounded-full"
|
{% if contact.email %}
|
||||||
alt="{{ contact.name }}">
|
<a href="mailto:{{ contact.email }}" title="E-Mail">
|
||||||
{% endif %}
|
{{ icon('mail', 'w-8 h-8') }}
|
||||||
<div class="font-bold">
|
</a>
|
||||||
{{ contact.name }}
|
{% endif %}
|
||||||
</div>
|
{% if contact.phone %}
|
||||||
{% if contact.destination %}
|
<a href="tel:{{ contact.phone }}" title="Telefon">
|
||||||
<div>
|
{{ icon('phone', 'w-8 h-8') }}
|
||||||
{{ contact.destination }}
|
</a>
|
||||||
</div>
|
{% endif %}
|
||||||
<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>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
<div class="text-center">
|
||||||
|
<span class="font-bold">{{ contact.name }}</span>
|
||||||
|
{% if contact.category %}<br>{{ ('label.contact.category.' ~ contact.category) | trans }}{% endif %}
|
||||||
|
{% if contact.destination %}<br>{{ contact.destination }}{% endif %}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
@@ -48,11 +43,30 @@
|
|||||||
<p class="pb-4">
|
<p class="pb-4">
|
||||||
Ansonsten melde dich gerne beim Team Personalplanung!
|
Ansonsten melde dich gerne beim Team Personalplanung!
|
||||||
</p>
|
</p>
|
||||||
{{ _self.contacts(generalContacts, '[email protected]') }}
|
<div class="pb-8">
|
||||||
|
<div class="flex justify-center flex-wrap items-start">
|
||||||
|
{% for contact in contacts.hr %}
|
||||||
|
{{ _self.contact(contact) }}
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<p class="pb-4">
|
<p class="pb-4">
|
||||||
Hast du Fragen zu deinem nächsten Einsatz in einer konkreten Destination? Dann melde dich gerne bei den
|
Hast du Fragen zu deinem nächsten Einsatz in einer konkreten Destination? Dann melde dich gerne bei den
|
||||||
zuständigen Büromitarbeitenden.
|
zuständigen Büromitarbeitenden oder Hausleitungen.
|
||||||
</p>
|
</p>
|
||||||
{{ _self.contacts(destinationContacts) }}
|
<div class="pb-4">
|
||||||
|
<div class="flex justify-center flex-wrap items-start">
|
||||||
|
{% for contact in contacts.management %}
|
||||||
|
{{ _self.contact(contact) }}
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="pb-8">
|
||||||
|
<div class="flex justify-center flex-wrap items-start">
|
||||||
|
{% for contact in contacts.house_management %}
|
||||||
|
{{ _self.contact(contact) }}
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@@ -23,6 +23,11 @@ label:
|
|||||||
checked: geprüft
|
checked: geprüft
|
||||||
paid: bezahlt
|
paid: bezahlt
|
||||||
rejected: abgelehnt
|
rejected: abgelehnt
|
||||||
|
contact:
|
||||||
|
category:
|
||||||
|
hr: Personalplanung
|
||||||
|
management: Management
|
||||||
|
house_management: Hausmanagement
|
||||||
|
|
||||||
message:
|
message:
|
||||||
confirm_contract:
|
confirm_contract:
|
||||||
|
|||||||
Reference in New Issue
Block a user