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

43 lines
1.1 KiB
HTML
Raw Normal View History

2023-10-23 13:05:16 +02:00
<h1">Meine Hunde</h1>
2023-10-22 23:05:24 +02:00
2023-10-23 13:05:16 +02:00
<figure>
<table>
<thead>
2023-10-23 10:00:19 +02:00
<tr>
<?php foreach (array_keys($doggos[0]) as $key) : ?>
2023-10-23 13:05:16 +02:00
<th>
2023-10-23 10:00:19 +02:00
<?= $key ?>
</th>
<?php endforeach; ?>
2023-10-22 23:05:24 +02:00
2023-10-23 13:05:16 +02:00
<th>
2023-10-23 10:00:19 +02:00
Bearbeiten
</th>
2023-10-23 13:05:16 +02:00
<th>
2023-10-23 10:00:19 +02:00
Löschen
</th>
</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-10-22 23:05:24 +02:00
2023-10-23 13:05:16 +02:00
<tr>
2023-10-23 10:00:19 +02:00
<?php foreach (array_keys($dog) as $key) : ?>
2023-10-23 13:05:16 +02:00
<td>
2023-10-23 10:00:19 +02:00
<?= $dog[$key] ?>
</td>
<?php endforeach; ?>
2023-10-22 23:05:24 +02:00
2023-10-23 13:05:16 +02:00
<td>
<button hx-get="/dogs/edit/<?= $dog['id'] ?>" hx-push-url="/dogs/edit/<?= $dog['id'] ?>" hx-target="#main" >Bearbeiten</button>
2023-10-23 10:00:19 +02:00
</td>
2023-10-23 13:05:16 +02:00
<td>
<button hx-get="/dogs/delete/<?= $dog['id'] ?>" hx-target="#main" >Löschen</button>
2023-10-23 10:00:19 +02:00
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
2023-10-23 13:05:16 +02:00
</figure>