This commit is contained in:
stiti 2024-06-10 16:55:35 +02:00
parent cedf6b38ae
commit 9e6ac4de1b

View File

@ -15,15 +15,6 @@
<?php else: ?> <?php else: ?>
<span class="no-cover">Aucune couverture disponible</span> <span class="no-cover">Aucune couverture disponible</span>
<?php endif; ?> <?php endif; ?>
<ul class="songs-list">
<?php foreach($album->tracks as $track): ?>
<li>
<span><strong><?php echo $track->number . '.' . $track->diskNumber; ?></strong></span>
<span><?php echo $track->songName; ?></span>
<span><strong><?php echo gmdate("i:s", $track->duration); ?></strong></span>
</li>
<?php endforeach; ?>
</ul>
<?php if ($this->session->userdata('user_id')): ?> <?php if ($this->session->userdata('user_id')): ?>
<!-- Si l'utilisateur est connecté --> <!-- Si l'utilisateur est connecté -->
@ -34,11 +25,21 @@
<option value="<?php echo $playlist->id; ?>"><?php echo $playlist->name; ?></option> <option value="<?php echo $playlist->id; ?>"><?php echo $playlist->name; ?></option>
<?php endforeach; ?> <?php endforeach; ?>
</select> </select>
<button onclick="addToPlaylist(<?php echo $album->id; ?>)" class="btn-add-to-playlist">Ajouter à la playlist</button> <button onclick="addToPlaylist(<?php echo $album->id; ?>)" class="btn-add-to-playlist">Ajouter l'album à la playlist</button>
<?php else: ?> <?php else: ?>
<p class="no-playlist">Vous n'avez pas encore de playlist. Créez-en une pour ajouter cet album !</p> <p class="no-playlist">Vous n'avez pas encore de playlist. Créez-en une pour ajouter cet album !</p>
<?php endif; ?> <?php endif; ?>
<?php endif; ?> <?php endif; ?>
<br>
<ul class="songs-list">
<?php foreach($album->tracks as $track): ?>
<li>
<span><strong><?php echo $track->number . '.' . $track->diskNumber; ?></strong></span>
<span><?php echo $track->songName; ?></span>
<span><strong><?php echo gmdate("i:s", $track->duration); ?></strong></span>
</li>
<?php endforeach; ?>
</ul>
</div> </div>
</li> </li>
<?php endforeach; ?> <?php endforeach; ?>