Skip to content
Snippets Groups Projects
Commit 6cbde108 authored by Sebastien ANDRE's avatar Sebastien ANDRE
Browse files

hotline : #195943 : un novelty widget add novelty yes facet in search

parent cb269551
Branches
Tags
1 merge request!5041[RTKO] hotline : #195943 : un novelty widget add novelty yes facet in search
Pipeline #38338 passed with stage
in 34 minutes and 34 seconds
- correctif #195943 : Magasin de thèmes : Kiosque nouveauté de la fiche bibliothèque : les nouveautés de la bibliothèquede s'affiche maintenant correctement lorsqu'on utilise le lien voir toutes les nouveautés.
\ No newline at end of file
......@@ -66,11 +66,16 @@ class Intonation_Library_Widget_Carousel_LibraryNovelties_View
}
protected function _getLinkToAllAsSearchParams() : array {
protected function _getLinkToAllAsSearchParams(): array
{
$params = parent::_getLinkToAllAsSearchParams();
return $this->_settings->getAutoSelection()
? array_merge(parent::_getLinkToAllAsSearchParams(),
['bib_select' => $this->_extractLibraryIdFromSettings()])
: parent::_getLinkToAllAsSearchParams();
? array_merge($params,
['multifacets' => Class_CodifThesaurus::recordNoveltyFor(true)->asFacet()
. Class_Codification::SEPARATOR_FACET
. Class_Bib::CODE_FACETTE . $this->_extractLibraryIdFromSettings()])
: $params;
}
......
......@@ -454,7 +454,7 @@ class TemplatesLibraryNoveltiesTabWidgetShowFooterTest
/** @test */
public function linkToAllShouldBeRechercheSimple() {
$this->assertXPathContentContains('//div//a[@href="/recherche/simple/tri/date_creation+desc%2C+alpha_titre+asc/titre/Nouveaut%C3%A9s+de+la+biblioth%C3%A8que/bib_select/1"]',
$this->assertXPathContentContains('//div//a[@href="/recherche/simple/tri/date_creation+desc%2C+alpha_titre+asc/titre/Nouveaut%C3%A9s+de+la+biblioth%C3%A8que/multifacets/HNRNR0001-B1"]',
'En lire plus');
}
......
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