diff --git a/library/ZendAfi/View/Helper/ListeNotices.php b/library/ZendAfi/View/Helper/ListeNotices.php index 1d1ba32b37a475a1dd680f859817c026c1587b60..94c4b9e1c7ddb86a3613975842aa96a724d89c78 100644 --- a/library/ZendAfi/View/Helper/ListeNotices.php +++ b/library/ZendAfi/View/Helper/ListeNotices.php @@ -56,11 +56,6 @@ class ZendAfi_View_Helper_ListeNotices extends ZendAfi_View_Helper_BaseHelper { return ($html.'</div>'); } - public function getUrlNotice($notice){ - return $this->view->urlNotice($notice); - } - - public function displayList($html,$notices,$preferences) { // Liste en fonction du format @@ -104,7 +99,7 @@ class ZendAfi_View_Helper_ListeNotices extends ZendAfi_View_Helper_BaseHelper { if($champ=="J") $html.= sprintf('<td class="%s"><a href="%s">%s</a></td>', $style_css, - $this->getUrlNotice($notice), + $this->view->urlNotice($notice), $notice->getTitrePrincipal()); else if($champ=="A") { $html.= sprintf('<td class="%s"><a href="%s">%s</a></td>', @@ -188,27 +183,24 @@ class ZendAfi_View_Helper_ListeNotices extends ZendAfi_View_Helper_BaseHelper { //------------------------------------------------------------------------------------------------------ // Format 3 : VIGNETTE //------------------------------------------------------------------------------------------------------ - public function listeVignettes($data, $champs){ + public function listeVignettes($data, $champs, $preferences){ $read_speaker_helper = new ZendAfi_View_Helper_ReadSpeaker(); //liste container $html='<div class="liste_vignettes">'; - $lig=0; + foreach($data as $notice){ // calcul url en fonction du type de doc $type_doc = $notice->getTypeDoc(); - $url_notice = $this->getUrlNotice($notice); - - $html.= $this->vignetteHtml($notice, $type_doc, $champs, $read_speaker_helper); - $lig++; + $html.= $this->vignetteHtml($notice, $type_doc, $champs, $read_speaker_helper, $preferences); } return $html.='</div>'; } - public function vignetteHtml($notice, $type_doc,$champs, $read_speaker_helper){ + public function vignetteHtml($notice, $type_doc,$champs, $read_speaker_helper, $preferences){ $this->loadScript(); - $url_notice = $this->getUrlNotice($notice); + $url_notice = $this->view->urlNotice($notice, $preferences); $read_speaker_tag = $read_speaker_helper->readSpeaker('recherche', 'readnotice', ['id' => $notice->getIdNotice()]); @@ -218,7 +210,7 @@ class ZendAfi_View_Helper_ListeNotices extends ZendAfi_View_Helper_BaseHelper { //lien reserver $html.='<div class="vignette_lien_reserver">'.$this->view->notice_LienReserver($notice).'</div>'; - $html.='<div class="vignette_titre ">' + $html.='<div class="vignette_titre">' .'<a href="'.$url_notice.'">'.$notice->getTitreEtSousTitre().'</a> '.$read_speaker_tag .'</div>'; @@ -227,10 +219,10 @@ class ZendAfi_View_Helper_ListeNotices extends ZendAfi_View_Helper_BaseHelper { $html.= '<div class="vignette_support">'.$this->view->iconeSupport($type_doc).'<div>'.Class_Codification::getInstance()->getLibelleFacette("T".$type_doc).'</div></div>'; //image container - $html.='<div class="vignette_img ">'.$this->view->notice_Vignette($notice).'</div>'; + $html.='<div class="vignette_img">'.$this->view->notice_Vignette($notice, $preferences).'</div>'; - $html.='<div class="vignette_info ">'; + $html.='<div class="vignette_info">'; $html.= $this->view->notice_Entete($notice, ['entete' => str_replace('T', '', $champs)]); diff --git a/library/ZendAfi/View/Helper/UrlNotice.php b/library/ZendAfi/View/Helper/UrlNotice.php index 07f39425e82e7aaf588e36dd731be98d5e317665..695e20ff3ad14382cabaf10b5e4a71149b8f9c40 100644 --- a/library/ZendAfi/View/Helper/UrlNotice.php +++ b/library/ZendAfi/View/Helper/UrlNotice.php @@ -73,7 +73,8 @@ class ZendAfi_View_Helper_UrlNotice extends Zend_View_Helper_HtmlElement { array_intersect_key(array_filter($preferences), ['retour_panier' => '', 'id_panier' => 0, - 'id_catalogue' => 0])); + 'id_catalogue' => 0, + 'tri' => ''])); } return $this->view->url($options);