Skip to content
Snippets Groups Projects
Commit d8b5c4e4 authored by Laurent's avatar Laurent
Browse files

Merge branch 'hotline#66892_probleme_affichage_page_suivante_sur_version_mobile' into 'stable'

hotline #66892 mobile: fix "next page"  on search result

See merge request !2451
parents 0a79c14d 269345ff
Branches
Tags
2 merge requests!2464Master,!2451hotline #66892 mobile: fix "next page" on search result
Pipeline #3220 passed with stage
in 27 minutes and 3 seconds
- ticket #66892 : affichage mobile, résultat de recherche: correction de la navigation paginée qui pouvait générer une page vide
\ No newline at end of file
......@@ -16,16 +16,10 @@
*
* 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
*/
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// OPAC3 - Recherche
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class ZendAfi_View_Helper_Telephone_Pager extends ZendAfi_View_Helper_BaseHelper {
//---------------------------------------------------------------------
// Main routine
//---------------------------------------------------------------------
class ZendAfi_View_Helper_Telephone_Pager extends ZendAfi_View_Helper_BaseHelper {
public function pager($nombre,$nb_par_page,$page)
{
if(!$nombre) return;
......@@ -36,16 +30,15 @@ class ZendAfi_View_Helper_Telephone_Pager extends ZendAfi_View_Helper_BaseHelper
if($nombre % $nb_par_page) $nb_pages++;
if($nb_pages == 1) return;
// Pager
$html='<div class="ui-bar" data-theme="c" data-role="footer" data-id="pager" data-position="fixed">';
$html.='<div data-role="controlgroup" data-type="horizontal">';
$html.=sprintf('<a href="%s" data-role="button" data-icon="arrow-l" %s>%s</a>',
$html.=sprintf('<a href="%s" data-role="button" data-icon="arrow-l" data-ajax="false" %s>%s</a>',
$this->view->url(['page'=>$page-1]),
$page > 1 ? '' : 'class="ui-disabled"',
$this->translate()->_('Page précédente'));
$html.=sprintf('<a href="%s" data-role="button" data-icon="arrow-r" data-iconpos="right" %s>%s</a>',
$html.=sprintf('<a href="%s" data-role="button" data-icon="arrow-r" data-ajax="false" data-iconpos="right" %s>%s</a>',
$this->view->url(['page'=>$page+1]),
($page != $nb_pages) ? '' : 'class="ui-disabled"',
$this->translate()->_('Page suivante'));
......
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