Improved the presentation forecast.
This commit is contained in:
@@ -90,11 +90,55 @@ use Michelf\Markdown;
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
$events = getEvents();
|
||||
$now = new DateTime();
|
||||
$futureEvents = array_reverse(array_values(array_filter($events, function($e) use ($now) {
|
||||
return (new DateTime($e['start'])) >= (new DateTime('today'));
|
||||
})));
|
||||
?>
|
||||
<div class="row mt-4 calGrid">
|
||||
<div class="col">
|
||||
<table class="table table-bordered calGridTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<?php foreach ($futureEvents as $event): ?>
|
||||
<th class="text-center"><?= (new DateTime($event['start']))->format('j M') ?></th>
|
||||
<?php endforeach; ?>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="cal-grid-label">Presentation 1</td>
|
||||
<?php foreach ($futureEvents as $event): ?>
|
||||
<td class="text-center cal-grid-cell"
|
||||
data-ctl="<?= $event['ctl'] ?>"
|
||||
<?php if (!empty($event['presentation1']['topic'])): ?>
|
||||
data-bs-toggle="tooltip" data-bs-placement="top" title="<?= htmlspecialchars($event['presentation1']['topic']) ?>"
|
||||
<?php endif; ?>>
|
||||
<?= htmlspecialchars($event['presentation1']['presenter'] ?? '') ?>
|
||||
</td>
|
||||
<?php endforeach; ?>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="cal-grid-label">Presentation 2</td>
|
||||
<?php foreach ($futureEvents as $event): ?>
|
||||
<td class="text-center cal-grid-cell"
|
||||
data-ctl="<?= $event['ctl'] ?>"
|
||||
<?php if (!empty($event['presentation2']['topic'])): ?>
|
||||
data-bs-toggle="tooltip" data-bs-placement="top" title="<?= htmlspecialchars($event['presentation2']['topic']) ?>"
|
||||
<?php endif; ?>>
|
||||
<?= htmlspecialchars($event['presentation2']['presenter'] ?? '') ?>
|
||||
</td>
|
||||
<?php endforeach; ?>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-2 calDetails">
|
||||
<div class="col">
|
||||
<?php
|
||||
$events = getEvents();
|
||||
?>
|
||||
<div class="accordion" id="accordionExample">
|
||||
<?php
|
||||
$nextCtl = null;
|
||||
|
||||
Reference in New Issue
Block a user