Merge branch 'master' of github.com:dignajar/bludit
This commit is contained in:
commit
a6bf83acdd
|
@ -58,6 +58,40 @@ class Paginator {
|
|||
return $url.'?page='.self::get('prevPage');
|
||||
}
|
||||
|
||||
public static function urlLastPage()
|
||||
{
|
||||
global $Url;
|
||||
|
||||
$domain = trim(DOMAIN_BASE,'/');
|
||||
$filter = trim($Url->activeFilter(), '/');
|
||||
|
||||
if(empty($filter)) {
|
||||
$url = $domain.'/'.$Url->slug();
|
||||
}
|
||||
else {
|
||||
$url = $domain.'/'.$filter.'/'.$Url->slug();
|
||||
}
|
||||
|
||||
return $url.'?page='.self::get('numberOfPages');
|
||||
}
|
||||
|
||||
public static function urlFirstPage()
|
||||
{
|
||||
global $Url;
|
||||
|
||||
$domain = trim(DOMAIN_BASE,'/');
|
||||
$filter = trim($Url->activeFilter(), '/');
|
||||
|
||||
if(empty($filter)) {
|
||||
$url = $domain.'/'.$Url->slug();
|
||||
}
|
||||
else {
|
||||
$url = $domain.'/'.$filter.'/'.$Url->slug();
|
||||
}
|
||||
|
||||
return $url.'?page=0';
|
||||
}
|
||||
|
||||
public static function html($textPrevPage=false, $textNextPage=false, $showPageNumber=false)
|
||||
{
|
||||
global $Language;
|
||||
|
|
|
@ -51,6 +51,8 @@
|
|||
"themes": "Themes",
|
||||
"prev-page": "Prev page",
|
||||
"next-page": "Next page",
|
||||
"first-page": "First page",
|
||||
"last-page": "Last page",
|
||||
"configure-plugin": "Configure plugin",
|
||||
"confirm-delete-this-action-cannot-be-undone": "Confirm delete, this action cannot be undone.",
|
||||
"site-title": "Site title",
|
||||
|
|
|
@ -2271,13 +2271,50 @@
|
|||
content: '\f053';
|
||||
}
|
||||
|
||||
ul.actions.pagination .last {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
ul.actions.pagination .last:after {
|
||||
content: "";
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
font-family: FontAwesome;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
text-transform: none !important;
|
||||
}
|
||||
|
||||
ul.actions.pagination .last:after {
|
||||
content: '\f050';
|
||||
}
|
||||
ul.actions.pagination .first {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
ul.actions.pagination .first:before {
|
||||
content: "";
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
font-family: FontAwesome;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
text-transform: none !important;
|
||||
}
|
||||
|
||||
ul.actions.pagination .first:before {
|
||||
content: '\f049';
|
||||
}
|
||||
|
||||
|
||||
@media screen and (max-width: 1280px) {
|
||||
|
||||
ul.actions.pagination {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
ul.actions.pagination .next, ul.actions.pagination .previous {
|
||||
ul.actions.pagination .next, ul.actions.pagination .previous,
|
||||
ul.actions.pagination .last, ul.actions.pagination .first {
|
||||
min-width: 20em;
|
||||
}
|
||||
|
||||
|
@ -2285,7 +2322,8 @@
|
|||
|
||||
@media screen and (max-width: 736px) {
|
||||
|
||||
ul.actions.pagination .next, ul.actions.pagination .previous {
|
||||
ul.actions.pagination .next, ul.actions.pagination .previous,
|
||||
ul.actions.pagination .last, ul.actions.pagination .first {
|
||||
min-width: 18em;
|
||||
}
|
||||
|
||||
|
|
|
@ -73,11 +73,13 @@
|
|||
<ul class="actions pagination">
|
||||
<?php
|
||||
if( Paginator::get('showNewer') ) {
|
||||
echo '<li><a href="'.Paginator::urlFirstPage().'" class="button big first">'.$Language->get('First page').'</a></li>';
|
||||
echo '<li><a href="'.Paginator::urlPrevPage().'" class="button big previous">'.$Language->get('Prev page').'</a></li>';
|
||||
}
|
||||
|
||||
if( Paginator::get('showOlder') ) {
|
||||
echo '<li><a href="'.Paginator::urlNextPage().'" class="button big next">'.$Language->get('Next page').'</a></li>';
|
||||
echo '<li><a href="'.Paginator::urlLastPage().'" class="button big last">'.$Language->get('Last page').'</a></li>';
|
||||
}
|
||||
?>
|
||||
</ul>
|
Loading…
Reference in New Issue