-
Notifications
You must be signed in to change notification settings - Fork 2
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
Showing
9 changed files
with
1,154 additions
and
46 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 |
---|---|---|
@@ -1,5 +1,11 @@ | ||
<ul class="list-group list-group-flush"> | ||
<?php foreach ($subscribers as $sub): ?> | ||
<li class="list-group-item"><?php echo $sub['name']; ?> - <?php echo $sub['email']; ?></li> | ||
<?php endforeach; ?> | ||
</ul> | ||
|
||
<table class="table table-striped"> | ||
<tbody> | ||
<?php foreach ($subscribers as $sub) : ?> | ||
<tr> | ||
<td><?php echo $sub['name']; ?></td> | ||
<td><?php echo $sub['email']; ?></td> | ||
</tr> | ||
<?php endforeach; ?> | ||
</tbody> | ||
</table> |
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,110 @@ | ||
<nav aria-label="Page navigation example"> | ||
<ul class="pagination"> | ||
<li class="page-item"><a class="page-link" href="#">Previous</a></li> | ||
<li class="page-item"><a class="page-link" href="#">1</a></li> | ||
<li class="page-item"><a class="page-link" href="#">2</a></li> | ||
<li class="page-item"><a class="page-link" href="#">3</a></li> | ||
<li class="page-item"><a class="page-link" href="#">Next</a></li> | ||
</ul> | ||
</nav> | ||
|
||
<nav aria-label="Page navigation example"> | ||
<span class="paginationCounter"> | ||
<?php | ||
// pagination information "Page {:page} of {:pages}, Viewing {:start}-{:end} of {:count}" | ||
print _txt('in.pagination.format'); | ||
?> | ||
</span> | ||
<?php if ($this->paginator->hasPage(2)) : ?> | ||
<ul class="pagination"> | ||
|
||
<li class="page-item"> | ||
<?php | ||
// Shows the first link <a class="page-link" href="#">1</a> | ||
print $this->Paginator->first(_txt('op.first')); | ||
?> | ||
</li> | ||
<li class="page-item"> | ||
<?php | ||
// Shows the previous link | ||
print $this->Paginator->prev( | ||
_txt('op.previous'), | ||
null, | ||
null, | ||
array('class' => 'disabled') | ||
); | ||
?> | ||
</li> | ||
<li class="page-item"> | ||
<?php | ||
// Shows the page numbers | ||
print $this->Paginator->numbers(); | ||
?> | ||
</li> | ||
<li class="page-item"> | ||
<?php | ||
// Shows the next link | ||
print $this->Paginator->next( | ||
_txt('op.next'), | ||
null, | ||
null, | ||
array('class' => 'disabled') | ||
); | ||
?> | ||
</li> | ||
<li class="page-item"> | ||
<?php | ||
// Shows the last link | ||
print $this->Paginator->last(_txt('op.last')); | ||
?> | ||
</li> | ||
</ul> | ||
<?php endif; ?> | ||
|
||
<?php if ($this->paginator->hasPage(2)) : ?> | ||
<?php | ||
// show the Goto page form if there is more than 1 page | ||
?> | ||
<form id="goto-page" class="pagination-form" method="get" onsubmit="gotoPage(this.pageNum.value, | ||
<?php print $this->Paginator->counter('{:pages}'); ?>, | ||
'<?php print _txt('er.pagenum.nan'); ?>', | ||
'<?php print _txt('er.pagenum.exceeded', array($this->Paginator->counter('{:pages}'))); ?>'); | ||
return false;"> | ||
<label for="pageNum"><?php print _txt('fd.page.goto'); ?></label> | ||
<input type="text" size="3" name="pageNum" id="pageNum" /> | ||
<input type="submit" value="<?php print _txt('op.go'); ?>" /> | ||
</form> | ||
<?php endif; ?> | ||
|
||
<?php | ||
// Provide a form for setting the page limit. | ||
// Default is 25 records, current maximum is 100. | ||
// For now we will simply hard-code the options from 25 - 100. | ||
?> | ||
<script type="text/javascript"> | ||
var recordCount = '<?php print $this->Paginator->params()['count']; ?>'; | ||
var currentPage = '<?php print $this->Paginator->params()['page']; ?>'; | ||
var currentLimit = '<?php print $this->Paginator->params()['limit']; ?>'; | ||
var currentPath = '<?php print filter_var($this->request->here, FILTER_SANITIZE_SPECIAL_CHARS); ?>'; | ||
var currentAction = '<?php print filter_var($this->request->action, FILTER_SANITIZE_SPECIAL_CHARS); ?>'; | ||
</script> | ||
<form id="limit-page" class="pagination-form" method="get" onsubmit="limitPage(this.pageLimit.value,recordCount,currentPage,currentPath,currentAction); return false;"> | ||
<label for="pageLimit"><?php print _txt('fd.page.limit.display'); ?></label> | ||
<select name="pageLimit" id="pageLimit"> | ||
<option value="25">25</option> | ||
<option value="50">50</option> | ||
<option value="75">75</option> | ||
<option value="100">100</option> | ||
</select> | ||
<?php print _txt('fd.page.limit.records'); ?> | ||
<input type="submit" value="<?php print _txt('op.go'); ?>" /> | ||
<script type="text/javascript"> | ||
$(function() { | ||
// Check if the currentLimit holds an appropriate value on first load, and set the select option | ||
if (currentLimit != '' && (currentLimit == '50' || currentLimit == '75' || currentLimit == '100')) { | ||
$("#pageLimit").val(currentLimit); | ||
} | ||
}); | ||
</script> | ||
</form> | ||
</nav> |
Oops, something went wrong.