diff --git a/library/ZendAfi/View/Helper/Abonne/RetourFiche.php b/library/ZendAfi/View/Helper/Abonne/RetourFiche.php index 6d9b3a43c994863b5583e2389e3d5b879e0118f2..46c5cb116d022a1a8c9588c06a24752c734d016c 100644 --- a/library/ZendAfi/View/Helper/Abonne/RetourFiche.php +++ b/library/ZendAfi/View/Helper/Abonne/RetourFiche.php @@ -22,7 +22,7 @@ class ZendAfi_View_Helper_Abonne_RetourFiche extends ZendAfi_View_Helper_Abonne_ public function abonne_retourFiche() { return '<div style="margin-top:5px"> <a href="'.$this->view->url(['controller' => 'abonne', 'action' => 'fiche'], null, true).'">' - .$this->view->_('Retour à la fiche utilisateur').'</a> + .$this->view->_('Retour à mon compte').'</a> </div>'; } } diff --git a/public/opac/js/calendrier.js b/public/opac/js/calendrier.js index c5fc20a230402c0b643ad3965e03350cbe17c94c..e748f64089a67431408e67841f6d678b6e63b9ae 100644 --- a/public/opac/js/calendrier.js +++ b/public/opac/js/calendrier.js @@ -1,8 +1,14 @@ var ajaxify_calendars = function () { - var month_link = $("a.calendar_title_month_clickable:first-child, a.calendar_title_month_clickable:last-child, .calendar .month_list a"); + var month_link = $("a.calendar_title_month_clickable:first-child, a.calendar_title_month_clickable:last-child, .calendar .month_list a:not(.no_event)"); month_link.click(function(event) { var url = $(this).attr('href'); + + if(!url) { + event.preventDefault(); + return false; + } + if (url == '#') url = $(this).jqmData('href'); @@ -11,7 +17,12 @@ var ajaxify_calendars = function () { event.preventDefault(); }); - $('.calendar').bind('swiperight', + var month_no_event = $('.calendar .month_list a.no_event'); + month_no_event.click(function(event) { + event.preventDefault(); + }); + + $('.calendar').bind('swiperight', function () { $("a.calendar_title_month_clickable:first-child").click(); }); @@ -33,6 +44,7 @@ var ajaxify_calendars = function () { $('.auto_resize').removeClass('auto_resize'); if (undefined != window.calendrierAfterLoad) calendrierAfterLoad(); + }; $(ajaxify_calendars); diff --git a/tests/application/modules/opac/controllers/AbonneControllerPretsTest.php b/tests/application/modules/opac/controllers/AbonneControllerPretsTest.php index d46eccbf2e9af89671ab49a49665a4d1cbd66d97..f7df2434016dca6c6c6ae0dd4e476ac63160cc79 100644 --- a/tests/application/modules/opac/controllers/AbonneControllerPretsTest.php +++ b/tests/application/modules/opac/controllers/AbonneControllerPretsTest.php @@ -159,7 +159,14 @@ class AbonneControllerPretsExportTwoPretsTest extends AbonneControllerPretsListT class AbonneControllerPretsListTwoPretsTest extends AbonneControllerPretsListTwoPretsTestCase { public function setUp() { parent::setUp(); - $this->dispatch('/opac/abonne/prets'); + $this->dispatch('/opac/abonne/prets', true); + } + + + /** @test */ + public function returnToMyHomeShouldBePresent() { + $this->assertXPathContentContains('//a[contains(@href, "/abonne/fiche")]', + utf8_encode('Retour à mon compte')); }