Initial commit BIJ CI4
This commit is contained in:
15
app/Views/layouts/partials/admin_alert.php
Normal file
15
app/Views/layouts/partials/admin_alert.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
/** @var list<string>|array<int, string>|null $errors */
|
||||
$errors = is_array($errors ?? null) ? $errors : [];
|
||||
if ($errors === []) {
|
||||
return;
|
||||
}
|
||||
?>
|
||||
<div class="rounded-2xl border border-amber-200 bg-amber-50 p-4 text-sm text-amber-900 shadow-sm" role="alert">
|
||||
<p class="font-medium text-amber-950">Perlu perhatian</p>
|
||||
<ul class="mt-2 list-inside list-disc space-y-1">
|
||||
<?php foreach ($errors as $e) : ?>
|
||||
<li><?= esc((string) $e) ?></li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</div>
|
||||
14
app/Views/layouts/partials/empty_state.php
Normal file
14
app/Views/layouts/partials/empty_state.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
$icon = isset($icon) && is_string($icon) ? $icon : 'fa-inbox';
|
||||
$title = isset($title) && is_string($title) ? $title : 'Tidak ada data';
|
||||
$hint = isset($hint) && is_string($hint) ? $hint : '';
|
||||
?>
|
||||
<div class="flex flex-col items-center justify-center rounded-2xl border border-dashed border-gray-200 bg-gray-50 px-6 py-12 text-center">
|
||||
<span class="flex h-14 w-14 items-center justify-center rounded-full bg-white text-2xl text-gray-400 shadow-sm ring-1 ring-gray-100">
|
||||
<i class="fa-solid <?= esc($icon) ?>"></i>
|
||||
</span>
|
||||
<p class="mt-4 text-sm font-semibold text-gray-900"><?= esc($title) ?></p>
|
||||
<?php if ($hint !== '') : ?>
|
||||
<p class="mt-2 max-w-md text-sm text-gray-500"><?= esc($hint) ?></p>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
Reference in New Issue
Block a user