diff --git a/assets/css/app.scss b/assets/css/app.scss index ba76f8845..7a2d7be57 100644 --- a/assets/css/app.scss +++ b/assets/css/app.scss @@ -16,4 +16,4 @@ @import "./layout/main"; @import "./layout/header"; @import "./layout/navbar"; - +@import "./layout/join"; diff --git a/assets/css/layout/_join.scss b/assets/css/layout/_join.scss new file mode 100644 index 000000000..98915ec5e --- /dev/null +++ b/assets/css/layout/_join.scss @@ -0,0 +1,5 @@ +.max-vh60{ + max-height: 60vh; + overflow: hidden; + overflow-y: auto; +} diff --git a/assets/css/style.css b/assets/css/style.css index 3e389bbbd..856c63012 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -543,3 +543,4 @@ label.required:after { #modalAdressbook a[aria-expanded="true"] { background: white; } + diff --git a/assets/js/frontend.js b/assets/js/frontend.js index 9952788e5..dffa6f7ac 100644 --- a/assets/js/frontend.js +++ b/assets/js/frontend.js @@ -18,4 +18,7 @@ $(document).ready(function () { $('#snackbar').removeClass('show'); }, 3000); }, 500); -}); \ No newline at end of file +}); +$(window).on('load', function () { + $('[data-toggle="popover"]').popover({html: true}); +}); diff --git a/src/Twig/RoomsInFuture.php b/src/Twig/RoomsInFuture.php new file mode 100644 index 000000000..6aeda6ed9 --- /dev/null +++ b/src/Twig/RoomsInFuture.php @@ -0,0 +1,54 @@ +licenseService = $licenseService; + $this->em = $entityManager; + } + + public function getFilters() + { + return [ + new TwigFilter('roomsinFuture', [$this, 'roomsinFuture']), + ]; + } + + public function roomsinFuture(Server $server) + { + $now = new \DateTime(); + $qb = $this->em->getRepository(Rooms::class)->createQueryBuilder('rooms'); + $qb->andWhere('rooms.server = :server') + ->andWhere('rooms.showRoomOnJoinpage = true') + ->andWhere('rooms.start > :now') + ->setParameter('server', $server) + ->setParameter('now',$now) + ->orderBy('rooms.start', 'ASC'); + $rooms = $qb->getQuery()->getResult(); + + return $rooms; + + } + +} \ No newline at end of file diff --git a/templates/join/index.html.twig b/templates/join/index.html.twig index e05589ebb..24c9aedd9 100644 --- a/templates/join/index.html.twig +++ b/templates/join/index.html.twig @@ -160,15 +160,46 @@ Image by {{ image['photographer'] }} provided by + src="{{ asset('images/pexels.png') }}"/> {% endif %} - + {% if server and server|roomsinFuture|length > 0 %} +
+
+
+
+

{{ 'Öffentliche Konferenzen'|trans }}

+
+
    + + {% for r in server|roomsinFuture %} +
  • + {{ r.start|date('d.m.Y | H:i') }} +
    {{ r.name }}
    + + {% if r.public %} + {{ 'Anmelden'|trans }} + {% endif %} +
  • + + {% endfor %} + +
+
+
+
+
+ {% endif %} + {{ include('base/__snack.html.twig') }} {% endblock %}