request->get('inlineMedicalEdit', 0); $openProgressEditId = (int)Yii::$app->request->get('inlineProgressEdit', 0); $coverImageUrl = trim((string)$animalCoverImageUrl); $hasCoverImage = $coverImageUrl !== '' && (preg_match('/^https?:\/\//i', $coverImageUrl) || substr($coverImageUrl, 0, 1) === '/'); $statusLabel = Animal::statusOptions()[$animal->status] ?? (string)$animal->status; $detailFieldMap = [ 'name' => (string)$animal->getDisplayName(), 'species' => (string)$animal->species, 'breed' => (string)$animal->breed, 'sex' => (string)$animal->sex, 'status' => (string)$statusLabel, 'location_name' => (string)$animal->location_name, 'animal_uid' => (string)$animal->animal_uid, 'public_summary' => trim((string)$animal->public_summary), 'last_medical' => !empty($medicalVisits) ? DateDisplayHelper::format((string)$medicalVisits[0]->visit_at) : '', ]; $heroFieldValues = []; foreach ($detailHeroFields as $fieldKey) { $fieldKey = trim((string)$fieldKey); if ($fieldKey === '' || $fieldKey === 'name' || !array_key_exists($fieldKey, $detailFieldMap)) { continue; } $value = trim((string)$detailFieldMap[$fieldKey]); if ($value === '') { continue; } $heroFieldValues[] = $value; } $customHeroCount = 0; foreach ($customFieldValues as $customField) { if ($customHeroCount >= 3) { break; } $label = trim((string)($customField['label'] ?? '')); $value = trim((string)($customField['value'] ?? '')); if ($label === '' || $value === '') { continue; } $heroFieldValues[] = $label . ': ' . $value; $customHeroCount++; } if (class_exists(GalleryAssets::class)) { GalleryAssets::register($this); } $uiGalleryId = 'animal-gallery-' . (int)$animal->id; ?>
| = Yii::t('AnimalManagementModule.base', 'From') ?> | = Yii::t('AnimalManagementModule.base', 'To') ?> | = Yii::t('AnimalManagementModule.base', 'Status') ?> | = Yii::t('AnimalManagementModule.base', 'Updated') ?> |
|---|---|---|---|
| = Html::encode($fromSpace ? $fromSpace->name : Yii::t('AnimalManagementModule.base', 'Unknown')) ?> | = Html::encode($toSpace ? $toSpace->name : Yii::t('AnimalManagementModule.base', 'Unknown')) ?> | = Html::encode(AnimalTransfer::statusOptions()[$transfer->status] ?? $transfer->status) ?> | = Html::encode(DateDisplayHelper::format((string)$transfer->updated_at)) ?> |
| = Yii::t('AnimalManagementModule.base', 'When') ?> | = Yii::t('AnimalManagementModule.base', 'By') ?> | = Yii::t('AnimalManagementModule.base', 'Event') ?> | = Yii::t('AnimalManagementModule.base', 'Status Change') ?> | = Yii::t('AnimalManagementModule.base', 'Message') ?> |
|---|---|---|---|---|
| = Html::encode(DateDisplayHelper::format((string)$event->created_at)) ?> | = Html::encode($actor ? $actor->displayName : Yii::t('AnimalManagementModule.base', 'System')) ?> | = Html::encode((string)$event->event_type) ?> | = Html::encode((string)($event->from_status ?: '-') . ' -> ' . (string)($event->to_status ?: '-')) ?> | = Html::encode((string)$event->message) ?> |