1
0
mirror of synced 2025-12-28 00:23:25 +00:00

feat(home) displaying cached stations

This commit is contained in:
Valentin
2024-06-14 18:02:10 +02:00
parent cf5f96f47b
commit 387bc0a2d7
7 changed files with 595 additions and 35 deletions

View File

@@ -16,10 +16,10 @@
<tr>
<td><?php echo htmlspecialchars($station['name']); ?></td>
<td class="text-end">
<?php if (isFavorite($_SESSION['user_id'], $station['id'], $i)): ?>
<button class="btn btn-danger remove-stop" data-station-id="<?= $station['id'] ?>" data-line-id="<?= $i ?>">Revoke</button>
<?php if (isFavorite($_SESSION['user_id'], $station['stopId'], $i)): ?>
<button class="btn btn-danger remove-stop" data-station-id="<?= $station['stopId'] ?>" data-line-id="<?= $i ?>">Revoke</button>
<?php else: ?>
<button class="btn btn-success add-stop" data-station-id="<?= $station['id'] ?>" data-line-id="<?= $i ?>">Add</button>
<button class="btn btn-success add-stop" data-station-id="<?= $station['stopId'] ?>" data-line-id="<?= $i ?>">Add</button>
<?php endif; ?>
</td>
</tr>