/** * Overrides theme_pager(). */ function bootstrap_psdpt_pager_link($variables) { $text = $variables['text']; $page_new = $variables['page_new']; $element = $variables['element']; $parameters = $variables['parameters']; $attributes = $variables['attributes']; $page = isset($_GET['page']) ? $_GET['page'] : ''; if ($new_page = implode(',', pager_load_array($page_new[$element], $element, explode(',', $page)))) { $parameters['page'] = $new_page; } $query = array(); if (count($parameters)) { $query = drupal_get_query_parameters($parameters, array()); } if ($query_pager = pager_get_query_parameters()) { $query = array_merge($query, $query_pager); } // Set each pager link title if (!isset($attributes['title'])) { static $titles = NULL; if (!isset($titles)) { $titles = array(t('« first') => t('Go to first page'), t('‹ previous') => t('Go to previous page'), t('next ›') => t('Go to next page'), t('last »') => t('Go to last page')); } if (isset($titles[$text])) { $attributes['title'] = $titles[$text]; } elseif (is_numeric($text)) { $attributes['title'] = t('Go to page @number', array('@number' => $text)); } } // @todo l() cannot be used here, since it adds an 'active' class based on the // path only (which is always the current path for pager links). Apparently, // none of the pager links is active at any time - but it should still be // possible to use l() here. // @see http://drupal.org/node/1410574 $attributes['href'] = url($_GET['q'], array('query' => $query)); $text = filter_xss($text, array('span', 'em', 'strong')); return '<a' . drupal_attributes($attributes) . '>' . $text . '</a>'; }
function macragecn_pager_link($variables) { $text = $variables['text']; $page_new = $variables['page_new']; $element = $variables['element']; $parameters = $variables['parameters']; $attributes = $variables['attributes']; $page = isset($_GET['page']) ? $_GET['page'] : ''; if ($new_page = implode(',', pager_load_array($page_new[$element], $element, explode(',', $page)))) { $parameters['page'] = $new_page; } $query = array(); if (count($parameters)) { $query = drupal_get_query_parameters($parameters, array()); } if ($query_pager = pager_get_query_parameters()) { $query = array_merge($query, $query_pager); } // Set each pager link title if (!isset($attributes['title'])) { static $titles = NULL; if (!isset($titles)) { $titles = array(t('« 第一 页') => t('前往首 页'), t('‹ 上一页') => t('前往上一 页'), t('下一页 ›') => t('前往下一页'), t('最后一 页 »') => t('前往尾 页')); } if (isset($titles[$text])) { $attributes['title'] = $titles[$text]; } elseif (is_numeric($text)) { $attributes['title'] = t('前往第@number页', array('@number' => $text)); } } // @todo l() cannot be used here, since it adds an 'active' class based on the // path only (which is always the current path for pager links). Apparently, // none of the pager links is active at any time - but it should still be // possible to use l() here. // @see http://drupal.org/node/1410574 $attributes['href'] = url($_GET['q'], array('query' => $query)); return '<a' . drupal_attributes($attributes) . '>' . check_plain($text) . '</a>'; }
/** * Returns HTML for the "last page" link in query pager. */ function agency_whitesite_pager_last__responsive($variables) { $text = $variables['text']; $element = $variables['element']; $parameters = $variables['parameters']; global $pager_page_array, $pager_total; $output = ''; $output = theme('pager_link__responsive', array('text' => $text, 'page_new' => pager_load_array($pager_total[$element] - 1, $element, $pager_page_array), 'element' => $element, 'parameters' => $parameters)); return $output; }
/** * Return an array suitable for theme_links() rather than marked up HTML link. */ function tao_pager_link($text, $page_new, $element, $parameters = array(), $attributes = array()) { $page = isset($_GET['page']) ? $_GET['page'] : ''; if ($new_page = implode(',', pager_load_array($page_new[$element], $element, explode(',', $page)))) { $parameters['page'] = $new_page; } $query = array(); if (count($parameters)) { $query[] = drupal_query_string_encode($parameters, array()); } $querystring = pager_get_querystring(); if ($querystring != '') { $query[] = $querystring; } // Set each pager link title if (!isset($attributes['title'])) { static $titles = NULL; if (!isset($titles)) { $titles = array(t('« first') => t('Go to first page'), t('‹ previous') => t('Go to previous page'), t('next ›') => t('Go to next page'), t('last »') => t('Go to last page')); } if (isset($titles[$text])) { $attributes['title'] = $titles[$text]; } else { if (is_numeric($text)) { $attributes['title'] = t('Go to page @number', array('@number' => $text)); } } } return array('title' => $text, 'href' => $_GET['q'], 'attributes' => $attributes, 'query' => count($query) ? implode('&', $query) : NULL); }
function alim_pager_link($text, $page_new, $element, $parameters = array(), $attributes = array()) { //if(arg(0) == 'alimsearch' || arg(0) == 'search' ) changed //if(arg(0) == 'alimsearch' || (arg(0) == 'search' && arg(1) == 'node' && arg(2) != '' )) if(arg(0) == 'single' && arg(1) == 'view' ) $attributes['class'] = 'popups'; $page = isset($_GET['page']) ? $_GET['page'] : ''; if ($new_page = implode(',', pager_load_array($page_new[$element], $element, explode(',', $page)))) { $parameters['page'] = $new_page; } $query = array(); if (count($parameters)) { $query[] = drupal_query_string_encode($parameters, array()); } $querystring = pager_get_querystring(); if ($querystring != '') { $query[] = $querystring; } // Set each pager link title if (!isset($attributes['title'])) { static $titles = NULL; if (!isset($titles)) { $titles = array( t('« first') => t('Go to first page'), t('‹ previous') => t('Go to previous page'), t('next ›') => t('Go to next page'), t('last »') => t('Go to last page'), ); } if (isset($titles[$text])) { $attributes['title'] = $titles[$text]; } else if (is_numeric($text)) { $attributes['title'] = t('Go to page @number', array('@number' => $text)); } } return l($text, $_GET['q'], array('attributes' => $attributes, 'query' => count($query) ? implode('&', $query) : NULL)); }
function stability_pager_link($variables) { $text = $variables['text']; $page_new = $variables['page_new']; $element = $variables['element']; $parameters = $variables['parameters']; $attributes = $variables['attributes']; $page = isset($_GET['page']) ? $_GET['page'] : ''; if ($new_page = implode(',', pager_load_array($page_new[$element], $element, explode(',', $page)))) { $parameters['page'] = $new_page; } $query = array(); if (count($parameters)) { $query = drupal_get_query_parameters($parameters, array()); } if ($query_pager = pager_get_query_parameters()) { $query = array_merge($query, $query_pager); } // Set each pager link title if (!isset($attributes['title'])) { static $titles = NULL; if (!isset($titles)) { $titles = array(t('« first') => t('Go to first page'), t('‹ previous') => t('Go to previous page'), t('next ›') => t('Go to next page'), t('last »') => t('Go to last page')); } if (isset($titles[$text])) { $attributes['title'] = $titles[$text]; } elseif (is_numeric($text)) { $attributes['title'] = t('Go to page @number', array('@number' => $text)); } } $replace_titles = array(t('‹ previous') => '«', t('next ›') => '»'); $text = isset($replace_titles[$text]) ? $replace_titles[$text] : $text; if (!theme_get_setting('pager') || theme_get_setting('pager') == 1) { $attributes['class'] = array('btn', 'btn-sm', 'btn-default'); } $attributes['href'] = url($_GET['q'], array('query' => $query)); return '<a' . drupal_attributes($attributes) . '>' . check_plain($text) . '</a>'; }
function progressive_sub_pager_link($variables) { $text = $variables['text']; $page_new = $variables['page_new']; $element = $variables['element']; $parameters = $variables['parameters']; $attributes = $variables['attributes']; $page = isset($_GET['page']) ? $_GET['page'] : ''; if ($new_page = implode(',', pager_load_array($page_new[$element], $element, explode(',', $page)))) { $parameters['page'] = $new_page; } $query = array(); if (count($parameters)) { $query = drupal_get_query_parameters($parameters, array()); } if ($query_pager = pager_get_query_parameters()) { $query = array_merge($query, $query_pager); } // Set each pager link title if (!isset($attributes['title'])) { static $titles = NULL; if (!isset($titles)) { $titles = array(t('«') => t('Go to first page'), t('‹') => t('Go to previous page'), t('›') => t('Go to next page'), t('»') => t('Go to last page')); } if (isset($titles[$text])) { $attributes['title'] = $titles[$text]; } elseif (is_numeric($text)) { $attributes['title'] = t('Go to page @number', array('@number' => $text)); } } $replace_titles = array(t('« first') => '<i class="fa fa-angle-double-left"></i>', t('‹ previous') => '<i class="fa fa-angle-left"></i>', t('next ›') => '<i class="fa fa-angle-right"></i>', t('last »') => '<i class="fa fa-angle-double-right"></i>'); $text = isset($replace_titles[$text]) ? $replace_titles[$text] : check_plain($text); $attributes['href'] = url($_GET['q'], array('query' => $query)); return '<a' . drupal_attributes($attributes) . '>' . $text . '</a>'; }
/** * Return an array suitable for theme_links() rather than marked up HTML link. */ function tao_pager_link($vars) { $text = $vars['text']; $page_new = $vars['page_new']; $element = $vars['element']; $parameters = $vars['parameters']; $attributes = $vars['attributes']; $page = isset($_GET['page']) ? $_GET['page'] : ''; if ($new_page = implode(',', pager_load_array($page_new[$element], $element, explode(',', $page)))) { $parameters['page'] = $new_page; } $query = array(); if (count($parameters)) { $query = drupal_get_query_parameters($parameters, array()); } if ($query_pager = pager_get_query_parameters()) { $query = array_merge($query, $query_pager); } // Set each pager link title if (!isset($attributes['title'])) { static $titles = NULL; if (!isset($titles)) { $titles = array( t('« first') => t('Go to first page'), t('‹ previous') => t('Go to previous page'), t('next ›') => t('Go to next page'), t('last »') => t('Go to last page'), ); } if (isset($titles[$text])) { $attributes['title'] = $titles[$text]; } else if (is_numeric($text)) { $attributes['title'] = t('Go to page @number', array('@number' => $text)); } } return array( 'title' => $text, 'href' => $_GET['q'], 'attributes' => $attributes, 'query' => count($query) ? $query : NULL, ); }
/** * Implements theme_pager_last(). */ function europa_pager_last($variables) { $text = $variables['text']; $element = $variables['element']; $parameters = $variables['parameters']; $attributes = isset($variables['attributes']) ? $variables['attributes'] : array(); global $pager_page_array, $pager_total; $output = ''; // If we are anywhere but the last page. if ($pager_page_array[$element] < $pager_total[$element] - 1) { $output = theme('pager_link', array('text' => $text, 'page_new' => pager_load_array($pager_total[$element] - 1, $element, $pager_page_array), 'element' => $element, 'parameters' => $parameters, 'attributes' => $attributes)); } return $output; }
function spanjestrijders_pager_last($variables) { $text = $variables['text']; $element = $variables['element']; $parameters = $variables['parameters']; global $pager_page_array, $pager_total; $output = ''; // If we are anywhere but the last page if ($pager_page_array[$element] < $pager_total[$element] - 1) { $output = theme('pager_link', array('text' => $text, 'page_new' => pager_load_array($pager_total[$element] - 1, $element, $pager_page_array), 'element' => $element, 'parameters' => $parameters)); } else { $output = theme('image', array('path' => path_to_theme() . '/images/last-nolink.png', 'alt' => t('Last'))); } return $output; }
/** * Format pager link. */ function busy_pager_link($variables) { $text = $variables['text']; $page_new = $variables['page_new']; $element = $variables['element']; $parameters = $variables['parameters']; $wrap_title = isset($parameters['wrap']) ? $parameters['wrap'] : FALSE; $attributes = $variables['attributes']; unset($parameters['wrap']); $page = isset($_GET['page']) ? $_GET['page'] : ''; if ($new_page = implode(',', pager_load_array($page_new[$element], $element, explode(',', $page)))) { $parameters['page'] = $new_page; } $query = array(); if (count($parameters)) { $query = drupal_get_query_parameters($parameters, array()); } if ($query_pager = pager_get_query_parameters()) { $query = array_merge($query, $query_pager); } // Set each pager link title if (!isset($attributes['title'])) { static $titles = NULL; if (!isset($titles)) { $titles = array(t('« first') => t('Go to first page'), t('‹ previous') => t('Go to previous page'), t('next ›') => t('Go to next page'), t('last »') => t('Go to last page')); } if (isset($titles[$text])) { $attributes['title'] = $titles[$text]; } elseif (is_numeric($text)) { $attributes['title'] = t('Go to page @number', array('@number' => $text)); } } if ($wrap_title) { $text = '<span>' . $text . '</span>'; } return l($text, $_GET['q'], array('attributes' => $attributes, 'query' => $query, 'html' => $wrap_title)); }