2024-06-19 14:08:59 +02:00

40 lines
1.7 KiB
PHP

<section class="section">
<div class="container">
<h1 class="title">Détails de la Playlist</h1>
<?php if ($items): ?>
<p><strong>Nombre de chansons:</strong> <?= $itemCount ?></p>
<div class="table-container" style="max-height: 400px; overflow-y: auto;">
<table class="table is-fullwidth is-striped">
<thead>
<tr>
<th>Titre</th>
<th>Artiste</th>
<th>Album</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<?php foreach ($items as $item): ?>
<tr>
<td><?= anchor("music/view/{$item->item_id}", $item->songName) ?></td>
<td><?= $item->artistName ?></td>
<td><?= $item->albumName ?></td>
<td>
<form method="post" action="<?= site_url('playlist/deleteItem/'.$item->playlist_id.'/'.$item->item_id) ?>" style="display:inline;">
<button type="submit" class="button is-danger is-small">Supprimer</button>
</form>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<?php else: ?>
<p>La playlist est vide.</p>
<?php endif; ?>
<a href="<?= site_url('playlist') ?>" class="button is-link">Retour aux playlists</a>
</div>
</section>