translate('%s: Show %s %u to %u out of %u', 'pagination.joystick'); $flipUrl = clone $baseUrl; if ($flipUrl->getParam('flipped')) { $flipUrl->remove('flipped'); } else { $flipUrl->setParam('flipped'); } if ($flipUrl->hasParam('page')) { $flipUrl->setParam('page', implode(',', array_reverse(explode(',', $flipUrl->getParam('page'))))); } if ($flipUrl->hasParam('limit')) { $flipUrl->setParam('limit', implode(',', array_reverse(explode(',', $flipUrl->getParam('limit'))))); } $yAxisItemCountPerPage = $yAxisPaginator->getLimit(); $yAxisTotalItem = $yAxisPaginator->count(); $totalYAxisPages = ceil($yAxisTotalItem / $yAxisItemCountPerPage); $currentYAxisPage = round($yAxisPaginator->getOffset() / $yAxisItemCountPerPage) + 1; $prevYAxisPage = $currentYAxisPage > 1 ? $currentYAxisPage - 1 : null; $nextYAxisPage = $currentYAxisPage < $totalYAxisPages ? $currentYAxisPage + 1 : null; $xAxisItemCountPerPage = $xAxisPaginator->getLimit(); $xAxisTotalItem = $xAxisPaginator->count(); $totalXAxisPages = ceil($xAxisTotalItem / $xAxisItemCountPerPage); $currentXAxisPage = round($xAxisPaginator->getOffset() / $xAxisItemCountPerPage) + 1; $prevXAxisPage = $currentXAxisPage > 1 ? $currentXAxisPage - 1 : null; $nextXAxisPage = $currentXAxisPage < $totalXAxisPages ? $currentXAxisPage + 1 : null; ?>
= $this->qlink( '', $baseUrl, array( 'page' => $currentXAxisPage . ',' . $prevYAxisPage ), array( 'icon' => 'up-open', 'data-base-target' => '_self', 'title' => sprintf( $showText, $this->translate('Y-Axis', 'pagination.joystick'), $this->translate('hosts', 'pagination.joystick'), ($prevYAxisPage - 1) * $xAxisItemCountPerPage + 1, $prevYAxisPage * $xAxisItemCountPerPage, $yAxisTotalItem ) ) ); ?> = $this->icon('up-open'); ?> | |||
= $this->qlink( '', $baseUrl, array( 'page' => $prevXAxisPage . ',' . $currentYAxisPage ), array( 'icon' => 'left-open', 'data-base-target' => '_self', 'title' => sprintf( $showText, $this->translate('X-Axis', 'pagination.joystick'), $this->translate('services', 'pagination.joystick'), ($prevXAxisPage - 1) * $xAxisItemCountPerPage + 1, $prevXAxisPage * $xAxisItemCountPerPage, $xAxisTotalItem ) ) ); ?> = $this->icon('left-open'); ?> | flippable): ?>= $this->qlink( '', $flipUrl, null, array( 'icon' => 'arrows-cw', 'data-base-target' => '_self', 'title' => $this->translate('Flip grid axes') ) ) ?> | = $this->qlink( '', $baseUrl, array( 'page' => $nextXAxisPage . ',' . $currentYAxisPage ), array( 'icon' => 'right-open', 'data-base-target' => '_self', 'title' => sprintf( $showText, $this->translate('X-Axis', 'pagination.joystick'), $this->translate('services', 'pagination.joystick'), $currentXAxisPage * $xAxisItemCountPerPage + 1, $nextXAxisPage === $totalXAxisPages ? $xAxisItemCountPerPage : $nextXAxisPage * $xAxisItemCountPerPage, $xAxisTotalItem ) ), false ); ?> = $this->icon('right-open'); ?> | |
= $this->qlink( '', $baseUrl, array( 'page' => $currentXAxisPage . ',' . $nextYAxisPage ), array( 'icon' => 'down-open', 'data-base-target' => '_self', 'title' => sprintf( $showText, $this->translate('Y-Axis', 'pagination.joystick'), $this->translate('hosts', 'pagination.joystick'), $currentYAxisPage * $yAxisItemCountPerPage + 1, $nextYAxisPage === $totalYAxisPages ? $yAxisItemCountPerPage : $nextYAxisPage * $yAxisItemCountPerPage, $yAxisTotalItem ) ) ); ?> = $this->icon('down-open'); ?> |