Fix db activities on frontpage without url

This commit is contained in:
2018-02-11 01:01:05 +01:00
parent e98084aaf4
commit 61e7c73901
3 changed files with 43 additions and 20 deletions

View File

@@ -42,7 +42,12 @@ $translation = ['i dag', 'i morgen', 'denne uka', 'neste uke', 'denne måneden',
<ul>
<?php foreach($events as $event) { $counter2++ ?>
<li>
<a href="<?= htmlspecialchars($event->getURL()) ?>"><?= $event->getName(); ?></a>
<?php if ($event->getURL()) { ?>
<a href="<?= htmlspecialchars($event->getURL()) ?>"><?= $event->getName(); ?></a>
<?php } else { ?>
<strong><?= $event->getName(); ?></strong>
<?php } ?>
<?php /* <a class="icon subscribe">+</a> */ ?>
<?php if ($period !== \pvv\side\Agenda::TODAY) {
echo '<span class="time">' . $event->getStart()->format('H:i') . '</span>';