blob: c209daadb91799a075ac76fa6894408620cd83bf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
<? if (count($blocks) === 0): ?>
<?= MessageBox::info(_('Aktuell werden keine Termine angeboten.'))->hideClose() ?>
<? else: ?>
<table class="default">
<colgroup>
<col width="10%">
<col width="10%">
<col>
<col width="24px">
</colgroup>
<thead>
<tr>
<th><?= _('Uhrzeit') ?></th>
<th><?= _('Status') ?></th>
<th><?= _('Informationen') ?></th>
<th></th>
</tr>
</thead>
<? foreach ($blocks as $block): ?>
<tbody>
<tr id="block-<?= htmlReady($block->id) ?>">
<th colspan="4">
<?= $this->render_partial('consultation/block-description.php', compact('block')) ?>
</th>
</tr>
<? foreach ($block->slots as $slot): ?>
<tr id="<?= htmlReady($slot->id) ?>">
<td>
<?= date('H:i', $slot->start_time) ?>
-
<?= date('H:i', $slot->end_time) ?>
</td>
<td>
<?= $this->render_partial('consultation/slot-occupation.php', compact('slot')) ?>
</td>
<td>
<?= $displayNote($slot->note, 2048) ?>
<?= $this->render_partial('consultation/slot-bookings.php', compact('slot')) ?>
</td>
<td class="actions">
<? if ($slot->isOccupied($GLOBALS['user']->id)): ?>
<a href="<?= $controller->cancel($block, $slot) ?>" data-dialog="size=auto">
<?= Icon::create('trash')->asImg(tooltip2(_('Termin absagen'))) ?>
</a>
<? elseif (!$slot->isOccupied()): ?>
<a href="<?= $controller->book($block, $slot) ?>" data-dialog="size=auto">
<?= Icon::create('add')->asImg(tooltip2(_('Termin reservieren'))) ?>
</a>
<? endif; ?>
</td>
</tr>
<? endforeach; ?>
</tbody>
<? endforeach; ?>
<? if ($count > $limit): ?>
<tfoot>
<tr>
<td colspan="4">
<?= Pagination::create($count, $page, $limit)->asLinks(function ($page) use ($controller) {
return $controller->index($page);
}) ?>
</td>
</tr>
</tfoot>
<? endif; ?>
</table>
<? endif; ?>
|