diff --git a/VERSIONS_HOTLINE/53329 b/VERSIONS_HOTLINE/53329 new file mode 100644 index 0000000000000000000000000000000000000000..aee125460f31a488e88faa0c593edb2e42f96570 --- /dev/null +++ b/VERSIONS_HOTLINE/53329 @@ -0,0 +1 @@ + - ticket #53329 : recherche: le bouton "affiner" dans les facettes reprend correctement l'expression de recherche \ No newline at end of file diff --git a/library/ZendAfi/View/Helper/Facettes.php b/library/ZendAfi/View/Helper/Facettes.php index aeaff3261bff0bb69dd0d7386dc21588ee13dcc5..7d2ab5ef99ef41806e697689c835a79a1044504b 100644 --- a/library/ZendAfi/View/Helper/Facettes.php +++ b/library/ZendAfi/View/Helper/Facettes.php @@ -81,7 +81,9 @@ class ZendAfi_View_Helper_Facettes extends ZendAfi_View_Helper_BaseHelper { $button = $this->view->tag('button', $this->_('Affiner'), $attribs); - return $this->_tag('form', $button . $this->_tag('ul', $html) . $button, ['method' => 'POST']); + return $this->_tag('form', + $button . $this->_tag('ul', $html) . $button, + ['method' => 'POST', 'action' => $this->view->url($url)]); } diff --git a/tests/application/modules/opac/controllers/RechercheControllerTest.php b/tests/application/modules/opac/controllers/RechercheControllerTest.php index d42a1f45c57a4631fbd0ce6af86892514a81f26a..8d0327cc4e3dddc2af9ee23fb624e40d67802931 100644 --- a/tests/application/modules/opac/controllers/RechercheControllerTest.php +++ b/tests/application/modules/opac/controllers/RechercheControllerTest.php @@ -3330,9 +3330,6 @@ class RechercheControlleSiteInResultAndModeThumbnailTest extends RechercheContro class RechercheControllerMultiFacettesTest extends RechercheControllerNoticeTestCase { protected $_default_storm_to_volatile = true; - public function setUp() { - parent::setUp(); - } /** @test */ public function postShouldRedirectToMultifacetsT1T4() { @@ -3343,6 +3340,23 @@ class RechercheControllerMultiFacettesTest extends RechercheControllerNoticeTest } + /** @test */ + public function multifacetsFormShouldContainsExpressionRechercheParamOnSearchResult() { + Class_Profil::getCurrentProfil() + ->setCfgModules(['recherche' => ['resultatsimple' => ['facettes_codes'=>'MFSABZLYHTHEMHTES1V', + 'facettes_actif' => 1]]]) + ->assertSave(); + + $this->mock_sql + ->whenCalled('fetchAll') + ->answers([ [$this->notice->getId(), $this->notice->getFacettes()] ]); + + $this->postDispatch('/recherche/simple', + ['expressionRecherche' => 'pomme']); + $this->assertXPath('//div[@class="facette"]/form[@method="POST"][@action="/recherche/simple/expressionRecherche/pomme"]'); + } + + /** @test */ public function activeFacetsShouldBeT1OrT4() { $this->dispatch('/recherche/simple/expressionRecherche/pomme/tri/*/multifacets/T1-T4');