Commit 7c7ff3e7 authored by llaffont's avatar llaffont
Browse files

Bib numérique, diaporama: si la vignette est en cache, renvoie l'URL apache directement

parent 254ce79e
......@@ -156,12 +156,20 @@ class ZendAfi_View_Helper_TagSlideshow extends Zend_View_Helper_HtmlElement {
* @return string
*/
protected function _renderMedia($media) {
$content = $this->view->tagImg($this->view->url(array('controller' => 'bib-numerique',
'action' => 'thumbnail',
'width' => $media->getAlbum()->getThumbnailWidth(),
'id' => $media->getId()),
null,
true),
$params = array('width' => (int)$media->getAlbum()->getThumbnailWidth(),
'id' => (int)$media->getId());
if ($media->isThumbnailExistsForParams($params))
$url_media = $media->getThumbnailUrlForParams($params);
else
$url_media = $this->view->url(array('controller' => 'bib-numerique',
'action' => 'thumbnail',
'width' => $media->getAlbum()->getThumbnailWidth(),
'id' => $media->getId()),
null,
true);
$content = $this->view->tagImg($url_media,
array('style' => sprintf('width: %spx',
$this->_preferences['op_largeur_img']),
'title' => htmlspecialchars($media->getTitre()),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment