Commit 269345ff authored by Laurent's avatar Laurent
Browse files

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

parent 0a79c14d
- 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'));
......
Markdown is supported
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