This commit is contained in:
2025-09-17 09:00:54 +02:00
parent 21230d6ca5
commit b7b07e5abf
17 changed files with 1271 additions and 126 deletions

View File

@@ -2,6 +2,7 @@
namespace App\Controller;
use App\Repository\GroupRepository;
use App\Repository\ProjectRepository;
use App\Service\EtherpadService;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
@@ -11,14 +12,16 @@ use Symfony\Component\Routing\Attribute\Route;
class HomeController extends AbstractController
{
#[Route('/', name: 'app_home')]
public function home(ProjectRepository $projectRepository): Response
public function home(ProjectRepository $projectRepository, GroupRepository $groupRepository): Response
{
$projects = $projectRepository->findAll();
$groups = $groupRepository->findAll();
return $this->render('home/home.html.twig', [
'usemenu' => true,
'usesidebar' => false,
'projects' => $projects,
'groups' => $groups,
]);
}
@@ -35,14 +38,7 @@ class HomeController extends AbstractController
public function etherpad(string $id, EtherpadService $etherpadService): Response
{
$padAccess = $etherpadService->preparePadAccess($this->getUser(), $id);
dump(vars: $padAccess);
$response = $this->render('etherpad/show.html.twig', [
'iframeUrl' => $padAccess['iframeUrl'],
]);
$response->headers->setCookie($padAccess['cookie']);
return $response;
return $this->redirect($padAccess['iframeUrl']);
}
}