-
Notifications
You must be signed in to change notification settings - Fork 3
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
Praesidiarius
committed
Feb 11, 2020
1 parent
94de45e
commit 19fa8c9
Showing
10 changed files
with
109 additions
and
40 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
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
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 |
---|---|---|
@@ -1,15 +1,47 @@ | ||
<?php | ||
use Application\Controller\CoreEntityController; | ||
|
||
/** | ||
* Print Pagination Control | ||
*/ | ||
echo $this->paginationControl( | ||
$iItemsPerPage = (CoreEntityController::$oSession->oUser->getSetting($this->sRoute.'-index-items-per-page')) | ||
? CoreEntityController::$oSession->oUser->getSetting($this->sRoute.'-index-items-per-page') : 10; | ||
?> | ||
<div class="row"> | ||
<div class="col-md-1"> | ||
<select class="form-control plc-index-list-itemsperpage"> | ||
<option<?=($iItemsPerPage == 10) ? ' selected="selected"' : ''?>>10</option> | ||
<option<?=($iItemsPerPage == 25) ? ' selected="selected"' : ''?>>25</option> | ||
<option<?=($iItemsPerPage == 50) ? ' selected="selected"' : ''?>>50</option> | ||
<option<?=($iItemsPerPage == 100) ? ' selected="selected"' : ''?>>100</option> | ||
<option<?=($iItemsPerPage == 250) ? ' selected="selected"' : ''?>>250</option> | ||
</select> | ||
</div> | ||
<div class="col-md-3"> | ||
<?php | ||
|
||
/** | ||
* Print Pagination Control | ||
*/ | ||
echo $this->paginationControl( | ||
// The paginator object: | ||
$this->aItems, | ||
// The scrolling style: | ||
'sliding', | ||
// The partial to use to render the control: | ||
'partial/paginator', | ||
// The route to link to when a user clicks a control link: | ||
['route' => $this->sRoute] | ||
); | ||
$this->aItems, | ||
// The scrolling style: | ||
'sliding', | ||
// The partial to use to render the control: | ||
'partial/paginator', | ||
// The route to link to when a user clicks a control link: | ||
['route' => $this->sRoute] | ||
); | ||
|
||
?> | ||
</div> | ||
</div> | ||
<script> | ||
$(function() { | ||
$('.plc-index-list-itemsperpage').on('change',function() { | ||
var iNewVal = $(this).val(); | ||
var oData = {setting_name:'<?=$this->sRoute?>-index-items-per-page',setting_value:iNewVal}; | ||
$.post('/user/updatesetting',oData,function() { | ||
// act in backgrond | ||
}); | ||
}); | ||
}) | ||
</script> |