['✓','text-green',t('common.yes')],'no' => ['✕','text-red',t('common.no')],default => ['—','text-secondary',t('common.unknown')] }; return '' . $symbol . ''; }; $testBadge = static function (string $value, string $label): string { [$symbol,$class,$title] = match($value) { 'neg' => ['−','bg-green-lt',t('animals.test_negative')],'pos' => ['+','bg-red-lt',t('animals.test_positive')],'doubtful' => ['?','bg-yellow-lt',t('animals.test_doubtful')],default => ['?','bg-secondary-lt',t('animals.test_unknown')] }; return '' . h($label . ' ' . $symbol) . ''; }; ?>

diff(new DateTimeImmutable('today')); $ageLabel = $age->y > 0 ? $age->y . ' a' . ($age->m ? ' · ' . $age->m . ' m' : '') : $age->m . ' m'; if (!empty($animal['birth_is_estimated'])) { $ageLabel = '~ ' . $ageLabel; } } catch (Throwable) { } } $sex = match((string)($animal['sex'] ?? 'U')) { 'M' => ['♂','bg-blue-lt text-blue',t('sex.male')],'F' => ['♀','bg-purple-lt text-purple',t('sex.female')],default => ['?','bg-secondary-lt text-secondary',t('sex.unknown')] }; $removed = $animal[$isTrash ? 'deleted_at' : 'archived_at'] ?? null; $removedDate = $removed ? (new DateTimeImmutable((string)$removed))->format('d/m/Y H:i') : '—'; ?>
·
['🐶',t('animals.dogs')],'compatibility_cats' => ['🐱',t('animals.cats')],'house_trained' => ['🧼',t('animals.cleanliness')]] as $key => [$icon,$label]):$qs = $_GET; $qs['sort'] = $key; $qs['dir'] = $sort === $key && $dir === 'ASC' ? 'desc' : 'asc'; ?>
FIV/FeLV
(float)$animal['prev_weight'] ? '↑' : ((float)$animal['last_weight'] < (float)$animal['prev_weight'] ? '↓' : '→'); } ?> kg