Publier Globinours 1.0.0-rc.3
This commit is contained in:
parent
ea8c24d622
commit
9a2b4068da
325 changed files with 38230 additions and 20 deletions
31
app/Views/_animal_show_history.php
Normal file
31
app/Views/_animal_show_history.php
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
// Sous-vue de la fiche animale ; les variables sont préparées par AnimalsController::show().
|
||||
?>
|
||||
<!-- HISTORIQUE -->
|
||||
<div class="tab-pane" id="tab-hist">
|
||||
<?php $visibleHistory = $canViewMedical ? $history : array_values(array_filter($history, static fn (array $row): bool => !in_array((string)($row['type'] ?? ''), ['medical','treatment','vaccine','deworming','death'], true))); ?>
|
||||
<?php if (empty($visibleHistory)): ?>
|
||||
<div class="text-muted"><?= h(t('animal.no_history_event')) ?></div>
|
||||
<?php else: ?>
|
||||
<ul class="list list-timeline">
|
||||
<?php foreach ($visibleHistory as $h):
|
||||
$style = $historyStyles[$h['type']] ?? ['bg' => 'bg-muted','icon' => 'circle'];
|
||||
?>
|
||||
<li>
|
||||
<div class="list-timeline-icon <?= $style['bg'] ?>">
|
||||
<i class="ti ti-<?= $style['icon'] ?>"></i>
|
||||
</div>
|
||||
<div class="list-timeline-content">
|
||||
<div class="fw-bold"><?= h($h['label']) ?></div>
|
||||
<div class="text-muted small"><?= h($h['created_at']) ?></div>
|
||||
<?php if (!empty($h['actor_name'])): ?><div class="text-muted small">
|
||||
<?= h(t('common.by', ['name' => $h['actor_name']])) ?></div><?php endif; ?>
|
||||
<?php if (!empty($h['details'])): ?>
|
||||
<div class="mt-1"><?= nl2br(h($h['details'])) ?></div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue