Updated ticker to support multible events a day
This commit is contained in:
parent
e0fcf5f265
commit
d7885ddfe6
|
@ -34,8 +34,17 @@ $agenda = new \pvv\side\Agenda([
|
||||||
<ul id="ticker">
|
<ul id="ticker">
|
||||||
<?php
|
<?php
|
||||||
foreach($agenda->getNextDays() as $period => $events) {
|
foreach($agenda->getNextDays() as $period => $events) {
|
||||||
$event = reset($events);
|
if (!$events) continue;
|
||||||
echo '<li>' . strtoupper($translation[$period]) . ': <a href="' . $event->getURL() . '">' . $event->getName() . '</a>';
|
$first = true;
|
||||||
|
foreach($events as $event){
|
||||||
|
if (!$first){
|
||||||
|
echo '<i style="opacity:0.7;"> og </i>';
|
||||||
|
} else {
|
||||||
|
echo '<li style="text-align: center;"><span style="text-transform: uppercase;">' . $translation[$period] . '</span>: ';
|
||||||
|
}
|
||||||
|
echo '<a href="' . $event->getURL() . '">' . $event->getName() . '</a>';
|
||||||
|
$first = false;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue