WIP: Implement stuff

This commit is contained in:
Björn Fromme
2023-10-03 18:05:12 +02:00
parent 25a016a02b
commit dec8feedf2
10 changed files with 53 additions and 10 deletions
@@ -0,0 +1,16 @@
<?php
namespace App\Controller\Teamer;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
class ContactController extends AbstractController
{
#[Route('/teamer/contact', name: 'app_teamer_contact')]
public function index(): Response
{
return $this->render('teamer/contact.html.twig');
}
}
+6 -1
View File
@@ -8,6 +8,7 @@ use Knp\Menu\ItemInterface;
use Symfony\Bundle\SecurityBundle\Security;
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\Security\Core\Authentication\Token\SwitchUserToken;
use Symfony\Component\Uid\Uuid;
use Symfony\Contracts\Translation\TranslatorInterface;
abstract class AbstractMenuBuilder
@@ -141,6 +142,10 @@ abstract class AbstractMenuBuilder
protected function addDivider(ItemInterface $menu): void
{
$menu->addChild('%DIVIDER%');
$menu->addChild(Uuid::v4(), [
'extras' => [
'divider' => true,
],
]);
}
}
+3
View File
@@ -93,6 +93,9 @@ class AdminMenuBuilder extends AbstractMenuBuilder
$this->addManagerItem($menu);
$this->addTeamerItem($menu);
$this->addDivider($menu);
$this->addLogoutItem($menu);
return $menu;
+3
View File
@@ -12,6 +12,9 @@ class ManagerMenuBuilder extends AbstractMenuBuilder
$this->addAdminItem($menu);
$this->addTeamerItem($menu);
$this->addDivider($menu);
$this->addLogoutItem($menu);
return $menu;
+4 -1
View File
@@ -74,7 +74,7 @@ class TeamerMenuBuilder extends AbstractMenuBuilder
'title' => 'FAQ',
],
[
'route' => 'app_teamer_disposition_watchlist',
'route' => 'app_teamer_contact',
'title' => 'Kontakt',
],
],
@@ -87,6 +87,9 @@ class TeamerMenuBuilder extends AbstractMenuBuilder
$this->addAdminItem($menu);
$this->addManagerItem($menu);
$this->addDivider($menu);
$this->addLogoutItem($menu);
return $menu;
+1 -1
View File
@@ -61,7 +61,7 @@
aria-expanded="false">
{{ block('label') }}
</button>
{% elseif item.label == '%DIVIDER%' %}
{% elseif item.extras.divider == true %}
<hr class="my-4 h-px bg-gray-200">
{% else %}
<div class="hover:bg-gray-50 group flex gap-x-3 rounded-md p-2 text-sm leading-6 font-semibold text-gray-700" role="button">
+1 -1
View File
@@ -10,7 +10,7 @@
{% if app.user.teamer.photo %}
<a href="{{ path('app_teamer_profile_index') }}" title="Mein Profil">
<img src="{{ asset(app.user.teamer.photo.filename | imagine_filter('profile')) }}"
class="h-8 w-auto rounded-full border-2 border-primary"
class="h-8 w-auto rounded-full"
alt="{{ app.user.teamer.firstName }}">
</a>
{% endif %}
+9
View File
@@ -0,0 +1,9 @@
{% extends 'teamer/layout.html.twig' %}
{% block title %}Kontakt{% endblock %}
{% block content %}
<h1 class="text-2xl font-bold pb-8">
Kontakt
</h1>
{% endblock %}
+3 -3
View File
@@ -10,13 +10,13 @@
{% for faq in faqs %}
<div {{ stimulus_controller('toggle', [], {'closed': 'hidden'}) }}>
<div {{ stimulus_action('toggle', 'toggle', 'click') }} role="button" class="flex items-center space-x-2">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-8 h-8" {{ stimulus_target('toggle', 'icon') }}>
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6" {{ stimulus_target('toggle', 'icon') }}>
<path stroke-linecap="round" stroke-linejoin="round" d="M8.25 4.5l7.5 7.5-7.5 7.5" />
</svg>
<span class="flex-1 text-xl">{{ faq.question }}</span>
<span class="flex-1 text-lg">{{ faq.question }}</span>
</div>
<div class="hidden" {{ stimulus_target('toggle', 'toggle') }}>
<div class="pl-10 pr-4 py-2">
<div class="pl-8 pr-4 py-2">
{{ faq.answer|nl2br }}
</div>
</div>
+7 -3
View File
@@ -76,9 +76,13 @@
<h2 class="text-xl font-bold pb-2">
Sonstiges
</h2>
<div class="flex flex-col space-y-4 pb-8">
{{ form_row(form.status) }}
{{ form_row(form.remarks) }}
<div class="grid md:grid-cols-2 gap-y-4 md:gap-x-8 pb-8">
<div>
{{ form_row(form.status) }}
</div>
<div>
{{ form_row(form.remarks) }}
</div>
</div>
<button type="submit" class="btn">