Amélioration de la page des albums
This commit is contained in:
34
CodeIgniter-3.1.13/application/views/albums_list.php
Normal file
34
CodeIgniter-3.1.13/application/views/albums_list.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<head>
|
||||
<link rel="stylesheet" href="assets/css/style.css">
|
||||
<link rel="icon" type="image/x-icon" href="assets/img/Logo_ONZEUR.png">
|
||||
<title>Page d'accueil</title>
|
||||
</head>
|
||||
|
||||
<h1 class="title">Listes des albums</h1>
|
||||
<section class="list">
|
||||
<?php
|
||||
foreach($albums as $album){
|
||||
echo "<div><article>";
|
||||
echo "<header class='short-text'>";
|
||||
echo anchor("albums/view/{$album->id}","{$album->name}");
|
||||
echo "</header>";
|
||||
echo '<img src="data:image/jpeg;base64,'.base64_encode($album->jpeg).'" />';
|
||||
echo "<footer class='short-text'>{$album->year} - {$album->artistName}</footer>
|
||||
</article></div>";
|
||||
}
|
||||
?>
|
||||
</section>
|
||||
|
||||
<div class="pagination">
|
||||
<?php if ($current_page > 1): ?>
|
||||
<a href="<?php echo base_url('albums/index/'.($current_page-1)); ?>">Previous</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php for ($i = 1; $i <= $total_pages; $i++): ?>
|
||||
<a href="<?php echo base_url('albums/index/'.$i); ?>" <?php echo ($i == $current_page) ? 'class="active"' : ''; ?>><?php echo $i; ?></a>
|
||||
<?php endfor; ?>
|
||||
|
||||
<?php if ($current_page < $total_pages): ?>
|
||||
<a href="<?php echo base_url('albums/index/'.($current_page+1)); ?>">Suivant</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
Reference in New Issue
Block a user