This repository has been archived on 2023-12-29. You can view files and clone it, but cannot push or open issues or pull requests.
dogstats/web/pages/dogs/list.html

27 lines
1.2 KiB
HTML
Raw Permalink Normal View History

<h1>Meine Hunde</h1>
2023-10-23 13:05:16 +02:00
<figure>
<table class="table">
2023-10-23 13:05:16 +02:00
<thead>
2023-10-23 10:00:19 +02:00
<tr>
2023-11-03 21:07:34 +01:00
<th>Foto</th>
<th>Name</th>
<th>Geburstag</th>
<th>Aktiv</th>
<th>Bearbeiten</th>
<th>Löschen</th>
2023-10-23 10:00:19 +02:00
</tr>
</thead>
2023-10-23 13:05:16 +02:00
<tbody>
2023-10-23 10:00:19 +02:00
<?php foreach ($doggos as $dog) : ?>
2023-11-03 21:07:34 +01:00
<tr>
<td><img src="<?= $dog['photo'] ?>/50x50/forcesize"></td>
<td><?= escape($dog['name']); ?></td>
<td><?= escape($dog['birthday']); ?></td>
<td><?= escape($dog['active'])?'Ja':'Nein'; ?></td>
<td><button hx-get="/dogs/edit/<?= $dog['id'] ?>" hx-push-url="/dogs/edit/<?= $dog['id'] ?>" hx-target="#main" class="btn btn-primary"><i class="fas fa-edit"></i></button></td>
<td><button hx-get="/dogs/delete/<?= $dog['id'] ?>" hx-target="#main" hx-confirm="Bist du sicher, dass du <?= escape($dog['name']); ?> löschen willst" class="btn btn-danger"><i class="fas fa-trash"></i></button></td>
</tr>
2023-10-23 10:00:19 +02:00
<?php endforeach; ?>
</tbody>
</table>
2023-10-23 13:05:16 +02:00
</figure>