diff --git a/config/packages/liip_imagine.yaml b/config/packages/liip_imagine.yaml index b618e5d..1c3c4d2 100644 --- a/config/packages/liip_imagine.yaml +++ b/config/packages/liip_imagine.yaml @@ -23,3 +23,8 @@ liip_imagine: jpeg_quality: 75 filters: thumbnail: { size: [ 128, 128 ], mode: outbound } + contact: + format: jpeg + jpeg_quality: 75 + filters: + thumbnail: { size: [ 256, 256 ], mode: outbound } diff --git a/src/Controller/Teamer/ContactController.php b/src/Controller/Teamer/ContactController.php index 33c3562..fd2b6d6 100644 --- a/src/Controller/Teamer/ContactController.php +++ b/src/Controller/Teamer/ContactController.php @@ -2,6 +2,7 @@ namespace App\Controller\Teamer; +use App\Entity\Contact; use App\Repository\ContactRepository; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\Response; @@ -15,19 +16,23 @@ class ContactController extends AbstractController #[Route('/teamer/contact', name: 'app_teamer_contact')] public function index(): Response { - $generalContacts = $this + $allContacts = $this ->contactRepository - ->getGeneralContacts() + ->findAll() ; - $destinationContacts = $this - ->contactRepository - ->getDestinationContacts() - ; + $contacts = [ + Contact::CATEGORY_HR => [], + Contact::CATEGORY_MANAGEMENT => [], + Contact::CATEGORY_HOUSE_MANAGEMENT => [], + ]; + + foreach ($allContacts as $contact) { + $contacts[$contact->getCategory()][] = $contact; + } return $this->render('teamer/contact/index.html.twig', [ - 'generalContacts' => $generalContacts, - 'destinationContacts' => $destinationContacts, + 'contacts' => $contacts, ]); } } \ No newline at end of file diff --git a/templates/teamer/contact/index.html.twig b/templates/teamer/contact/index.html.twig index 371a73b..8828d05 100644 --- a/templates/teamer/contact/index.html.twig +++ b/templates/teamer/contact/index.html.twig @@ -2,37 +2,32 @@ {% block title %}Kontakt{% endblock %} -{% macro contacts(contacts, email) %} -
Ansonsten melde dich gerne beim Team Personalplanung!
- {{ _self.contacts(generalContacts, 'team@ep-reisen.de') }} +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.
- {{ _self.contacts(destinationContacts) }} +