Fichier application/views/album/listalbums_view.php

<?php
/*
 * Created by generator
 *
 */

$this->load->helper('form');
$this->load->helper('url');
$this->load->helper('template');
$this->load->helper('views');

if($this->session->userdata('user_name') == "") {
	redirect('welcome/index');
}

?><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head><!-- Liste des Albums -->
<?php echo htmlHeader($this->lang->line('album.form.list.title')); ?>

</head>
<body>

	<?= htmlNavigation("album","list", $this->session); ?>
	
	<div class="container">

		<h2><?= $this->lang->line('album.form.list.title') ?></h2>
			<?php
				$msg = $this->session->flashdata('msg_info');    if($msg != ""){echo formatInfo($msg);} 
				$msg = $this->session->flashdata('msg_confirm'); if($msg != ""){echo formatConfirm($msg);}
				$msg = $this->session->flashdata('msg_warn');    if($msg != ""){echo formatWarn($msg);}
				$msg = $this->session->flashdata('msg_error');   if($msg != ""){echo formatError($msg);}
			?>
		
		<table class="table table-striped table-bordered table-condensed">
			<thead>
				<tr>
		<!-- table header auto-generated : -->
					<th class="sortable"><!-- alblbtit -->
						<a href="<?=base_url()?>index.php/album/listalbums/index/alblbtit/<?= ($orderBy == 'alblbtit'&& $asc == 'asc')?('desc'):('asc') ?>"
						<?php if($orderBy == 'alblbtit'&& $asc == 'asc') {?>
							class=" sortAsc"
						<?php }else if($orderBy == 'alblbtit'&& $asc == 'desc') {?>
							class=" sortDesc"
						<?php }?>
						><?= $this->lang->line('album.form.alblbtit.label') ?></a></th>
					<th class="sortable"><!-- albreext -->
						<a href="<?=base_url()?>index.php/album/listalbums/index/albreext/<?= ($orderBy == 'albreext'&& $asc == 'asc')?('desc'):('asc') ?>"
						<?php if($orderBy == 'albreext'&& $asc == 'asc') {?>
							class=" sortAsc"
						<?php }else if($orderBy == 'albreext'&& $asc == 'desc') {?>
							class=" sortDesc"
						<?php }?>
						><?= $this->lang->line('album.form.albreext.label') ?></a></th>
					<th class="sortable"><!-- albiddes -->
						<a href="<?=base_url()?>index.php/album/listalbums/index/albiddes/<?= ($orderBy == 'albiddes'&& $asc == 'asc')?('desc'):('asc') ?>"
						<?php if($orderBy == 'albiddes'&& $asc == 'asc') {?>
							class=" sortAsc"
						<?php }else if($orderBy == 'albiddes'&& $asc == 'desc') {?>
							class=" sortDesc"
						<?php }?>
						><?= $this->lang->line('album.form.albiddes.label') ?></a></th>
					<th class="sortable"><!-- albidsce -->
						<a href="<?=base_url()?>index.php/album/listalbums/index/albidsce/<?= ($orderBy == 'albidsce'&& $asc == 'asc')?('desc'):('asc') ?>"
						<?php if($orderBy == 'albidsce'&& $asc == 'asc') {?>
							class=" sortAsc"
						<?php }else if($orderBy == 'albidsce'&& $asc == 'desc') {?>
							class=" sortDesc"
						<?php }?>
						><?= $this->lang->line('album.form.albidsce.label') ?></a></th>
					<th class="sortable"><!-- albidgen -->
						<a href="<?=base_url()?>index.php/album/listalbums/index/albidgen/<?= ($orderBy == 'albidgen'&& $asc == 'asc')?('desc'):('asc') ?>"
						<?php if($orderBy == 'albidgen'&& $asc == 'asc') {?>
							class=" sortAsc"
						<?php }else if($orderBy == 'albidgen'&& $asc == 'desc') {?>
							class=" sortDesc"
						<?php }?>
						><?= $this->lang->line('album.form.albidgen.label') ?></a></th>
					<th><?= $this->lang->line('object.tableheader.actions') ?></th>
				</tr>
			</thead>
			<tbody>
<?php
$even = false;
$enum_albidgen = array();
foreach($albums as $album):

?>
	<tr>

				<td valign="top"><?=$album->alblbtit?></td>
				<td valign="top"><?=$album->albreext?></td>
				<td valign="top"><?=($album->albiddes == 0)?(""):($auteurCollection[$album->albiddes]->autlbnom)?>
			</td>
				<td valign="top"><?=($album->albidsce == 0)?(""):($auteurCollection[$album->albidsce]->autlbnom)?>
			</td>
				<td valign="top"><?=($album->albidgen == 0)?(""):($genreCollection[$album->albidgen]->genlbnom)?>
			</td>
					<td><a class="btn" href="<?=base_url()?>index.php/album/editalbum/index/<?=$album->albidalb?>" title="<?= $this->lang->line('form.button.edit') ?>"><i class="icon-pencil"> </i></a>
						<a class="btn" href="#" onclick="if( confirm('<?= $this->lang->line('album.message.askConfirm.deletion')?>')){document.location.href='<?=base_url()?>index.php/album/listalbums/delete/<?=$album->albidalb?>';}" 
						title="<?= $this->lang->line('form.button.delete') ?>"
						><i class="icon-trash"> </i></a></td>
				</tr>
<?php 
$even = !$even; 
endforeach; ?>

			</tbody>
		</table>
	
		<div class="pagination">
			<ul>
			<?php if(isset($pagination)){ echo $pagination->create_links(); } ?>
			</ul>
		</div><!-- .pagination -->
		
		<a href="<?=base_url()?>index.php/album/createalbum/index" class="btn btn-primary"><?= $this->lang->line('album.form.create.title') ?></a>
	</div><!-- .container -->
	
<?php echo bodyFooter(); ?>

<script src="<?= base_url() ?>www/js/views/album/listalbums.js"></script>


</body>
</html>