-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
343c67f
commit 8362e6d
Showing
6 changed files
with
95 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
/* | ||
* This file is part of Aplus Framework Pagination Library. | ||
* | ||
* (c) Natan Felles <natanfelles@gmail.com> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
/** | ||
* @var Framework\Pagination\Pager $pager | ||
*/ | ||
$language = $pager->getLanguage(); | ||
?> | ||
<div class="w3-center"> | ||
<div class="w3-bar"> | ||
<?php if ($pager->getPreviousPage()) : ?> | ||
<a rel="prev" href="<?= $pager->getPreviousPageUrl() ?>" class="w3-button"> | ||
<?= $language->render('pagination', 'previous') ?> | ||
</a> | ||
<?php endif ?> | ||
|
||
<?php if ($pager->getNextPage()) : ?> | ||
<a rel="next" href="<?= $pager->getNextPageUrl() ?>" class="w3-button"> | ||
<?= $language->render('pagination', 'next') ?> | ||
</a> | ||
<?php endif ?> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?php | ||
/* | ||
* This file is part of Aplus Framework Pagination Library. | ||
* | ||
* (c) Natan Felles <natanfelles@gmail.com> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
/** | ||
* @var Framework\Pagination\Pager $pager | ||
*/ | ||
$language = $pager->getLanguage(); | ||
?> | ||
<div class="w3-center"> | ||
<div class="w3-bar"> | ||
<?php if ($pager->getCurrentPage() - $pager->getSurround() > 1) : ?> | ||
<a class="w3-button" href="<?= $pager->getFirstPageUrl() ?>"><?= $pager->getLanguage() | ||
->render('pagination', 'first') ?></a> | ||
<?php endif ?> | ||
|
||
<?php if ($pager->getPreviousPage()) : ?> | ||
<a class="w3-button" rel="prev" href="<?= $pager->getPreviousPageUrl() ?>" title="<?= | ||
$language->render('pagination', 'previous') ?>">«</a> | ||
<?php endif ?> | ||
|
||
<?php foreach ($pager->getPreviousPagesUrls() as $p => $url) : ?> | ||
<a href="<?= $url ?>" class="w3-button"><?= $p ?></a> | ||
<?php endforeach ?> | ||
|
||
<a href="<?= $pager->getCurrentPageUrl() ?>" rel="canonical" class="w3-button w3-blue w3-hover-blue"> | ||
<?= $pager->getCurrentPage() ?> | ||
</a> | ||
|
||
<?php foreach ($pager->getNextPagesUrls() as $p => $url) : ?> | ||
<a href="<?= $url ?>" class="w3-button"><?= $p ?></a> | ||
<?php endforeach ?> | ||
|
||
<?php if ($pager->getNextPage() && $pager->getNextPage() < $pager->getLastPage() + 1) : ?> | ||
<a class="w3-button" rel="next" href="<?= $pager->getNextPageUrl() ?>" title="<?= | ||
$language->render('pagination', 'next') ?>">»</a> | ||
<?php endif ?> | ||
|
||
<?php if ($pager->getLastPage() | ||
&& $pager->getCurrentPage() + $pager->getSurround() < $pager->getLastPage() | ||
) : ?> | ||
<a class="w3-button" href="<?= $pager->getLastPageUrl() ?>"><?= $pager->getLanguage() | ||
->render('pagination', 'last') ?></a> | ||
<?php endif ?> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters