<?php $item = $this->item ;

switch ( $item->type ) {
	case 'cd' :
	case 'cassette' :
		$length_icon = 'fa fa-clock';
		$length_title = 'Durée';
	default:
		$length_icon = 'fa fa-book';
		$length_title = 'Durée';
		break;
}

$title = $item->title;
if( !empty( $item->key ) && !isset($this->isView)){
	$title = '<a href="'. $this->url(array('key'=>$item->key),'biblio-view',true).'">'.$title.'</a>';
}

$date = null;
if( $item->dateentree){
	$date = new Zend_Date( );
	$date->set($item->dateentree,'YYYYMMdd');
}
?>
	<article class="<?= $item->type ?> row">
		<div class="col-sm-2 ">
			<strong class="ref"><?= $item->lumid ?></strong><br>
			<?php if( Alfred_Hod::isAdmin() && isset($item->relevenceScore)) { ?><strong class="ref"><?= ceil( $item->relevenceScore ) ?></strong><br><?php }  ?>
		</div>
		<div class="col-sm-10 ">
			<h2 class="author"><?= $item->author ?></h2>
			<h3 class="title"><?= $title ?></h3>

			<?php if( !empty($item->length)) : ?>
				<p class="length"><i class="<?= $length_icon ?>" title="<?= $length_title ?>"></i> <?= $item->length ?></p>
			<?php endif; ?>
			<?php if( !empty($item->category)) : ?>
				<p class="category"><i class="fa fa-tag" title="<?= $item->category  ?>"></i> <?= $item->category ?></p>
			<?php endif; ?>
			<?php if( !empty($item->dateentree)) : ?>
				<p class="dateentree"><i class="fa fa-calendar" title="Date d'ajout"></i> Ajouté le : <?= $date->get(Zend_Date::DATE_MEDIUM) ?></p>
			<?php endif; ?>
			<div class="summary"><?= $item->summary ?></div>
			<footer>
				<a href="<?= $this->url(array('id'=>$item->id),'biblio-add',true) ?>" class="btn btn-md btn-primary addItemToCart pull-right"> <i class="fa fa-cart-plus"></i> Ajouter à ma commande</a>
			</footer>
		</div>
	</article>