PivottablePagination view script: show axis type (x/y) in titles

refs #8110
This commit is contained in:
Alexander Klimov 2014-12-19 17:15:14 +01:00
parent ebc539bc37
commit ff1cda94ef

View File

@ -6,7 +6,7 @@ if ($xAxisPaginator->count() <= 1 && $yAxisPaginator->count() <= 1) {
return; // Display this pagination only if there are multiple pages return; // Display this pagination only if there are multiple pages
} }
$fromTo = t('%s: %d to %d of %d'); $fromTo = t('%s: %d to %d of %d (on the %s-axis)');
$xAxisPages = $xAxisPaginator->getPages('all'); $xAxisPages = $xAxisPaginator->getPages('all');
$yAxisPages = $yAxisPaginator->getPages('all'); $yAxisPages = $yAxisPaginator->getPages('all');
@ -28,13 +28,15 @@ $yAxisPages = $yAxisPaginator->getPages('all');
t('Hosts'), t('Hosts'),
($yAxisPage - 1) * $yAxisPages->itemCountPerPage + 1, ($yAxisPage - 1) * $yAxisPages->itemCountPerPage + 1,
$yAxisPage === $yAxisPages->last ? $yAxisPages->totalItemCount : $yAxisPage * $yAxisPages->itemCountPerPage, $yAxisPage === $yAxisPages->last ? $yAxisPages->totalItemCount : $yAxisPage * $yAxisPages->itemCountPerPage,
$yAxisPages->totalItemCount $yAxisPages->totalItemCount,
'y'
) . '; ' . sprintf( ) . '; ' . sprintf(
$fromTo, $fromTo,
t('Services'), t('Services'),
($xAxisPage - 1) * $xAxisPages->itemCountPerPage + 1, ($xAxisPage - 1) * $xAxisPages->itemCountPerPage + 1,
$xAxisPage === $xAxisPages->last ? $xAxisPages->totalItemCount : $xAxisPage * $xAxisPages->itemCountPerPage, $xAxisPage === $xAxisPages->last ? $xAxisPages->totalItemCount : $xAxisPage * $xAxisPages->itemCountPerPage,
$xAxisPages->totalItemCount $xAxisPages->totalItemCount,
'x'
); ?>"></a> ); ?>"></a>
<?php endif ?> <?php endif ?>
</td> </td>