feat(navigate) navigation available and most usefull features)
This commit is contained in:
@@ -1,10 +1,7 @@
|
||||
<div class="row">
|
||||
<?php
|
||||
|
||||
$stations = getStops($i);
|
||||
|
||||
$half = ceil(count($stations) / 2);
|
||||
$chunks = array_chunk($stations, ceil(count($stations) / 2), true);
|
||||
$chunks = array_chunk($stations, $half, true);
|
||||
?>
|
||||
|
||||
<?php foreach ($chunks as $chunk): ?>
|
||||
@@ -20,7 +17,13 @@
|
||||
<?php foreach ($chunk as $station): ?>
|
||||
<tr>
|
||||
<td><?php echo htmlspecialchars($station['fields']['nom_zda']); ?></td>
|
||||
<td class="text-end"><button class="btn btn-success">Ajouter</button></td>
|
||||
<td class="text-end">
|
||||
<?php if (isFavorite($_SESSION['user_id'], $station['fields']['id_ref_zda'], $i)): ?>
|
||||
<button class="btn btn-danger remove-stop" data-station-id="<?= $station['fields']['id_ref_zda'] ?>" data-line-id="<?= $i ?>">Retirer</button>
|
||||
<?php else: ?>
|
||||
<button class="btn btn-success add-stop" data-station-id="<?= $station['fields']['id_ref_zda'] ?>" data-line-id="<?= $i ?>">Ajouter</button>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
|
||||
Reference in New Issue
Block a user