mirror of
https://github.com/Karaka-Management/oms-Media.git
synced 2026-02-16 17:28:41 +00:00
add pagination
This commit is contained in:
parent
d45ffcd81a
commit
ca65aca3f3
|
|
@ -17,6 +17,12 @@ use phpOMS\Uri\UriFactory;
|
||||||
|
|
||||||
include __DIR__ . '/../../template-functions.php';
|
include __DIR__ . '/../../template-functions.php';
|
||||||
|
|
||||||
|
$previous = empty($this->media)
|
||||||
|
? '{%}'
|
||||||
|
: '{%}?{?}&mpivot=' . \reset($this->media)->getId() . '&mptype=p';
|
||||||
|
$next = empty($this->media)
|
||||||
|
? '{%}'
|
||||||
|
: '{%}?{?}&mpivot=' . \end($this->media)->getId() . '&mptype=n';
|
||||||
?>
|
?>
|
||||||
<div class="portlet">
|
<div class="portlet">
|
||||||
<div class="portlet-head"><?= $this->getHtml('Media', 'Media'); ?><i class="fa fa-download floatRight download btn"></i></div>
|
<div class="portlet-head"><?= $this->getHtml('Media', 'Media'); ?><i class="fa fa-download floatRight download btn"></i></div>
|
||||||
|
|
@ -45,8 +51,11 @@ include __DIR__ . '/../../template-functions.php';
|
||||||
<td data-label="<?= $this->getHtml('Created'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->createdAt->format('Y-m-d')); ?></a>
|
<td data-label="<?= $this->getHtml('Created'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->createdAt->format('Y-m-d')); ?></a>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
<?php if ($count === 0) : ?>
|
<?php if ($count === 0) : ?>
|
||||||
<tr><td colspan="6" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?>
|
<tr><td colspan="6" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</table>
|
</table>
|
||||||
<div class="portlet-foot"></div>
|
<div class="portlet-foot">
|
||||||
|
<a tabindex="0" class="button" href="<?= UriFactory::build($previous); ?>"><?= $this->getHtml('Previous', '0', '0'); ?></a>
|
||||||
|
<a tabindex="0" class="button" href="<?= UriFactory::build($next); ?>"><?= $this->getHtml('Next', '0', '0'); ?></a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
Loading…
Reference in New Issue
Block a user