2024-12-31 15:53:15 +01:00
|
|
|
<link rel="stylesheet" href="/css/vehicles.css">
|
|
|
|
<section class="vehicles">
|
|
|
|
<?php if (empty($this->get('vehicles'))): ?>
|
2025-01-02 02:02:14 +01:00
|
|
|
<p>No vehicles yet. <a href="/vehicles/create">Add your first vehicle</a>.</p>
|
2024-12-31 15:53:15 +01:00
|
|
|
<?php else: ?>
|
2025-01-03 16:16:15 +01:00
|
|
|
<div class="btn-wrapper">
|
|
|
|
<a href="/vehicles/create" class="btn-green">Add new vehicle!</a>
|
|
|
|
</div>
|
2024-12-31 15:53:15 +01:00
|
|
|
<div class="vehicle-wrapper">
|
|
|
|
<?php foreach ($this->get('vehicles') as $vehicle): ?>
|
|
|
|
<div class="vehicle bordered">
|
|
|
|
<b><?= htmlspecialchars($vehicle['name']) ?></b>
|
2025-01-03 16:16:15 +01:00
|
|
|
<p><?= htmlspecialchars($vehicle['registration_plate']) ?></p>
|
2025-01-03 17:10:08 +01:00
|
|
|
<p><?= htmlspecialchars($vehicle['fuel_type']) ?></p>
|
2025-01-03 16:16:15 +01:00
|
|
|
<p><?= htmlspecialchars($vehicle['note'] ?? "") ?></p>
|
|
|
|
<div class="actions">
|
|
|
|
<a href="/vehicles/edit?id=<?= $vehicle['id'] ?>">Edit</a>
|
|
|
|
<a href="/vehicles/delete?id=<?= $vehicle['id'] ?>" onclick="return confirm('Are you sure you want to delete this habit?')">Delete</a>
|
|
|
|
</div>
|
2024-12-31 15:53:15 +01:00
|
|
|
</div>
|
|
|
|
<?php endforeach; ?>
|
|
|
|
</div>
|
|
|
|
<?php endif; ?>
|
|
|
|
</section>
|