Skip to content
Snippets Groups Projects
prets.phtml 2.17 KiB
Newer Older
<?php $this->openBoite('Prêts en cours');?>
<div class="abonneTitre"><?php echo $this->fiche['nom_aff'];?></div>
<?php
// messages
foreach (['message', 'error'] as $type)
	if (isset($this->fiche[$type]) && $this->fiche[$type]) 
		echo '<p class="error">' . $this->fiche[$type] . '</p>';
?>
llaffont's avatar
llaffont committed

<?php if (isset($this->fiche['fiche'])
					&& ($emprunts = $this->fiche['fiche']->getEmprunts())
					&& !empty($emprunts)) {
llaffont's avatar
llaffont committed
<table width="100%" class="tablesorter">
  <thead>
llaffont's avatar
llaffont committed
	<tr>
		<th style="text-align:left; white-space:nowrap"><?php echo $this->_('n°'); ?></th>
		<th style="text-align:left"><?php echo $this->_('Titre'); ?></th>
		<th style="text-align:left"><?php echo $this->_('Auteur'); ?></th>
		<th style="text-align:left"><?php echo $this->_('Bibliothèque'); ?></th>
		<th style="text-align:center"><?php echo $this->_('Retour prévu'); ?></th>
  	<th style="text-align:center"><?php echo $this->_('Informations'); ?></th>
llaffont's avatar
llaffont committed
	</tr>
llaffont's avatar
llaffont committed
	</thead>
	<tbody>
		<?php
    $num = 1;
    if (isset($this->fiche['fiche'])) {
				foreach ($this->fiche["fiche"]->getEmprunts() as $emprunt) {
					$class_retard = $emprunt->enRetard() ? 'class="pret_en_retard"' : '';?>
		<tr <?php echo $class_retard;?>>
			<td width="15px" align="center"><b><?php echo $num++;?></b></td>
			<td>
				<?php 
				echo $this->tagAnchor(
					$this->url(['controller' => 'recherche', 
											'action' => 'viewnotice', 
											'id' => $emprunt->getNoticeOPACId(),
                      'retour_abonne' => 'prets']), 
					$emprunt->getTitre());
				?></td>
			<td><?php echo $emprunt->getAuteur();?></td>
			<td><?php echo $emprunt->getBibliotheque();?></td>
			<td class="date_retour">
				<?php echo $emprunt->getDateRetour() . ' ';?>
				<?php 
				if ($emprunt->isRenewable())
					echo $this->tagAnchor($this->url(['action' => 'prolongerPret',
																						'id_pret' => $emprunt->getId()]),
																$this->_('Prolonger'));?>
			</td>
			<td><?php echo $emprunt->getType();?></td>
		</tr>
		<?php }
		} ?>
llaffont's avatar
llaffont committed
  </tbody>
llaffont's avatar
llaffont committed
</table>

<?php $this->closeBoite(); ?>
<?php echo $this->abonne_RetourFiche(); ?>
llaffont's avatar
llaffont committed
<br/>
<br/>