2020-05-29 13:41:58 +02:00
|
|
|
<?php
|
|
|
|
$options = array(
|
|
|
|
'update' => '#table-container-' . h($tableRandomValue),
|
|
|
|
'evalScripts' => true
|
|
|
|
);
|
|
|
|
if (!empty($paginationOptions)) {
|
|
|
|
$options = array_merge($options, $paginationOptions);
|
|
|
|
}
|
|
|
|
$onClick = sprintf(
|
|
|
|
'onClick="executePagination(%s, %s);"',
|
|
|
|
"'" . h($tableRandomValue) . "'",
|
|
|
|
"'{{url}}'"
|
|
|
|
|
|
|
|
);
|
|
|
|
$this->Paginator->setTemplates(
|
|
|
|
[
|
|
|
|
'nextActive' => '<li class="page-item"><a class="page-link" href="#" ' . $onClick . '>{{text}}</a></li>',
|
|
|
|
'nextDisabled' => '<li class="page-item disabled"><a class="page-link" href="#" tabindex="-1">{{text}}</a></li>',
|
|
|
|
'prevActive' => '<li class="page-item"><a class="page-link" href="#" ' . $onClick . '>{{text}}</a></li>',
|
|
|
|
'prevDisabled' => '<li class="page-item disabled"><a class="page-link" href="#" tabindex="-1">{{text}}</a></li>',
|
|
|
|
'counterRange' => '{{start}} - {{end}} of {{count}}',
|
|
|
|
'counterPages' => '{{page}} of {{pages}}',
|
|
|
|
'first' => '<li class="first"><a href="#" ' . $onClick . '>{{text}}</a></li>',
|
|
|
|
'last' => '<li class="last"><a href="#" ' . $onClick . '>{{text}}</a></li>',
|
|
|
|
'number' => '<li class="page-item"><a class="page-link" href="#" ' . $onClick . '>{{text}}</a></li>',
|
2020-11-20 11:16:15 +01:00
|
|
|
'current' => '<li class="page-item active"><a href="" class="page-link">{{text}}</a></li>',
|
2021-03-04 09:00:16 +01:00
|
|
|
'ellipsis' => '<li class="page-item disabled"><a href="" class="page-link"><span class="ellipsis">…</span></a></li>',
|
2022-01-21 09:09:05 +01:00
|
|
|
'sort' => '<a href="#" ' . $onClick . ' class="d-inline-flex align-items-center">{{text}}</a>',
|
|
|
|
'sortAsc' => '<a href="#" ' . $onClick . ' class="d-inline-flex align-items-center">{{text}} <i class="fas fa-sort-up ms-1"></i></a>',
|
|
|
|
'sortDesc' => '<a href="#" ' . $onClick . ' class="d-inline-flex align-items-center">{{text}} <i class="fas fa-sort-down ms-1"></i></a>',
|
|
|
|
'sortAscLocked' => '<a class="asc locked" href="#" ' . $onClick . ' class="d-inline-flex align-items-center">{{text}}</a>',
|
|
|
|
'sortDescLocked' => '<a class="desc locked" href="#" ' . $onClick . ' class="d-inline-flex align-items-center");">{{text}}</a>'
|
2020-05-29 13:41:58 +02:00
|
|
|
]
|
|
|
|
);
|
|
|
|
echo $this->Paginator->options($options);
|
|
|
|
?>
|