From 245d451733d2d66413714fc3c1b674ce7e790863 Mon Sep 17 00:00:00 2001 From: llaffont <llaffont@afi-sa.fr> Date: Tue, 1 Mar 2016 13:51:25 +0100 Subject: [PATCH] hotline #33899 : reset url page parameter on rebound link in search results --- VERSIONS_HOTLINE/33899 | 1 + library/ZendAfi/View/Helper/Notice/LienRebondAuteur.php | 5 +++-- .../modules/opac/controllers/RechercheControllerTest.php | 6 ++++++ 3 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 VERSIONS_HOTLINE/33899 diff --git a/VERSIONS_HOTLINE/33899 b/VERSIONS_HOTLINE/33899 new file mode 100644 index 00000000000..17db84e6fcc --- /dev/null +++ b/VERSIONS_HOTLINE/33899 @@ -0,0 +1 @@ + - ticket #33899 : Correction du renvoie sur auteur à partir de la 2eme page d'une liste de résultats en mode mur \ No newline at end of file diff --git a/library/ZendAfi/View/Helper/Notice/LienRebondAuteur.php b/library/ZendAfi/View/Helper/Notice/LienRebondAuteur.php index 1897ead7f18..494f6132ddf 100644 --- a/library/ZendAfi/View/Helper/Notice/LienRebondAuteur.php +++ b/library/ZendAfi/View/Helper/Notice/LienRebondAuteur.php @@ -16,13 +16,14 @@ * * You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE * along with BOKEH; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ class ZendAfi_View_Helper_Notice_LienRebondAuteur extends Zend_View_Helper_HtmlElement { public function notice_LienRebondAuteur($notice) { return $this->view->url(['controller' => 'recherche', 'action' => 'simple', - 'code_rebond' => $notice->getCodeFacette('A')]); + 'code_rebond' => $notice->getCodeFacette('A'), + 'page' => null]); } } diff --git a/tests/application/modules/opac/controllers/RechercheControllerTest.php b/tests/application/modules/opac/controllers/RechercheControllerTest.php index d217f1be291..f302a16e72b 100644 --- a/tests/application/modules/opac/controllers/RechercheControllerTest.php +++ b/tests/application/modules/opac/controllers/RechercheControllerTest.php @@ -1409,6 +1409,12 @@ class RechercheControllerSimpleActionWithListeFormatMurTest extends RechercheCon } + /** @test */ + public function urlForAuthorInRecordReboundShouldNotContainsPage() { + $this->assertXPath('//span[@class="notice_auteur"]//a[contains(@href,"code_rebond/A")][not(contains(@href, "page/2"))]'); + } + + /** @test */ public function criteresRechercheShouldContainsBibAnnecy() { $this->assertXPathContentContains('//div[@class="criteres_recherche"]//div[2]', 'Bibliothèque: Annecy'); -- GitLab