57 lines
3.0 KiB
PHP
57 lines
3.0 KiB
PHP
<!DOCTYPE html>
|
|
<html>
|
|
<body>
|
|
<section class="section">
|
|
<div class="container">
|
|
<h1 class="title"><?= $artist->artistName ?></h1>
|
|
<h2 class="title is-4">Albums</h2>
|
|
<?php if ($albums): ?>
|
|
<?php foreach ($albums as $album): ?>
|
|
<div class="box">
|
|
<div class="columns">
|
|
<div class="column is-one-third">
|
|
<figure class="image">
|
|
<img src="data:image/jpeg;base64,<?= base64_encode($album->jpeg) ?>" alt="<?= $album->albumName ?> Cover">
|
|
</figure>
|
|
</div>
|
|
<div class="column">
|
|
<h3 class="title is-5"><?= $album->albumName ?></h3>
|
|
<p><strong>Genre:</strong> <?= $album->genreName ?></p>
|
|
<p><strong>Year:</strong> <?= $album->year ?></p>
|
|
<h4 class="title is-6">Songs</h4>
|
|
<div class="table-container">
|
|
<table class="table is-striped is-fullwidth">
|
|
<thead>
|
|
<tr>
|
|
<th>Titre</th>
|
|
<th>Action</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php foreach ($album->songs as $song): ?>
|
|
<tr>
|
|
<td><?= anchor("music/view/{$song->trackId}", $song->songName) ?></td>
|
|
<td>
|
|
<form method="post" action="<?= site_url('playlist/selectPlaylist') ?>" style="display:inline;">
|
|
<input type="hidden" name="itemId" value="<?= $song->trackId ?>">
|
|
<input type="hidden" name="itemType" value="song">
|
|
<button type="submit" class="button is-link is-small">Ajouter à la playlist</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php endforeach; ?>
|
|
<?php else: ?>
|
|
<p>No albums found for this artist.</p>
|
|
<?php endif; ?>
|
|
</div>
|
|
</section>
|
|
</body>
|
|
</html>
|