modify('first day of this month'); $offset = (int)$first->format('N') - 1; $days = (int)$cursor->format('t'); $trailing = (7 - (($offset + $days) % 7)) % 7; $weekStart = $weekCursor->modify('monday this week'); $weekEnd = $weekStart->modify('+6 days'); $byDay = []; foreach ($items as $item) { $byDay[substr($item['instance_starts_at'], 0, 10)][] = $item; }$edit = $editItem ?? []; $editStart = !empty($edit['starts_at']) ? new DateTimeImmutable($edit['starts_at']) : null; $colors = ['appointment' => 'blue','veterinary' => 'red','transport' => 'orange','pre_adoption' => 'purple','task' => 'green','other' => 'secondary','vaccine' => 'cyan','deworming' => 'yellow','treatment_start' => 'teal','treatment_end' => 'pink']; $sourceTabs = ['vaccine' => 'tab-vac','deworming' => 'tab-med','treatment_start' => 'tab-trt','treatment_end' => 'tab-trt']; $legend = ['organization' => ['appointment' => '#206bc4','veterinary' => '#d63939','transport' => '#f76707','pre_adoption' => '#ae3ec9','task' => '#2fb344'],'medical' => ['vaccine' => '#17a2b8','deworming' => '#f59f00','treatment_start' => '#0ca678','treatment_end' => '#d6336c']]; ?>
= h(t('agenda.subscription_help')) ?>
| = h(t('common.date')) ?> | = h(t('agenda.event')) ?> | = h(t('animal.animal')) ?> | = h(t('agenda.assigned')) ?> | = h(t('agenda.status')) ?> | |
|---|---|---|---|---|---|
| = h(date('d/m/Y', strtotime($item['instance_starts_at']))) ?>
= $item['all_day'] ? h(t('agenda.all_day')) : h(substr($item['instance_starts_at'], 11, 5)) ?>
|
= h($item['title']) ?>
= h(t('agenda.type_' . $item['item_type'])) ?>= $item['location'] ? ' · ' . h($item['location']) : '' ?>
|
= $item['animal_name'] ? '' . h($item['animal_name']) . '' : '—' ?> | = h($item['assigned_name'] ?: '—') ?> | = h(t('agenda.status_' . $item['status'])) ?> | = h(t('agenda.open_animal')) ?> |
| = h(t('agenda.none')) ?> | |||||