RVRNEXT-22 use pagination template
This commit is contained in:
parent
c0bfa5b334
commit
bf415a2a46
@ -13,20 +13,13 @@
|
|||||||
<p class="marginTop"><a href="<?= Container::$routeCollection->getRoute('community.transactions.new')->generateLink(['communitySlug' => $community->getSlug(), 'event' => isset($event) ? $event->getSlug() : null]) ?>">New transaction</a></p>
|
<p class="marginTop"><a href="<?= Container::$routeCollection->getRoute('community.transactions.new')->generateLink(['communitySlug' => $community->getSlug(), 'event' => isset($event) ? $event->getSlug() : null]) ?>">New transaction</a></p>
|
||||||
|
|
||||||
<?php if ($numberOfTransactions > 0): ?>
|
<?php if ($numberOfTransactions > 0): ?>
|
||||||
|
<?php
|
||||||
|
$paginationRouteId = 'community.transactions';
|
||||||
|
$paginationRouteParams = ['communitySlug' => $community->getSlug()];
|
||||||
|
?>
|
||||||
|
|
||||||
<?php if ($pages > 1): ?>
|
<?php if ($pages > 1): ?>
|
||||||
<p class="paginateContainer marginTop">
|
@include(templates/pagination)
|
||||||
<a href="<?= Container::$routeCollection->getRoute('community.transactions')->generateLink(['communitySlug' => $community->getSlug(), 'page' => 0]) ?>">«</a>
|
|
||||||
<a href="<?= Container::$routeCollection->getRoute('community.transactions')->generateLink(['communitySlug' => $community->getSlug(), 'page' => max(0, $currentPage - 1)]) ?>">‹</a>
|
|
||||||
<?php for ($i = 0; $i < $pages; $i++): ?>
|
|
||||||
<?php if ($currentPage == $i): ?>
|
|
||||||
<span class="selected"><?= $i + 1 ?></span>
|
|
||||||
<?php else: ?>
|
|
||||||
<a href="<?= Container::$routeCollection->getRoute('community.transactions')->generateLink(['communitySlug' => $community->getSlug(), 'page' => $i]) ?>"><?= $i + 1 ?></a>
|
|
||||||
<?php endif; ?>
|
|
||||||
<?php endfor; ?>
|
|
||||||
<a href="<?= Container::$routeCollection->getRoute('community.transactions')->generateLink(['communitySlug' => $community->getSlug(), 'page' => min($pages - 1, $currentPage + 1)]) ?>">›</a>
|
|
||||||
<a href="<?= Container::$routeCollection->getRoute('community.transactions')->generateLink(['communitySlug' => $community->getSlug(), 'page' => $pages - 1]) ?>">»</a>
|
|
||||||
</p>
|
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php foreach ($transactions as $transaction): ?>
|
<?php foreach ($transactions as $transaction): ?>
|
||||||
@ -51,19 +44,7 @@
|
|||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
|
|
||||||
<?php if ($pages > 1): ?>
|
<?php if ($pages > 1): ?>
|
||||||
<p class="paginateContainer marginTop">
|
@include(templates/pagination)
|
||||||
<a href="<?= Container::$routeCollection->getRoute('community.transactions')->generateLink(['communitySlug' => $community->getSlug(), 'page' => 0]) ?>">«</a>
|
|
||||||
<a href="<?= Container::$routeCollection->getRoute('community.transactions')->generateLink(['communitySlug' => $community->getSlug(), 'page' => max(0, $currentPage - 1)]) ?>">‹</a>
|
|
||||||
<?php for ($i = 0; $i < $pages; $i++): ?>
|
|
||||||
<?php if ($currentPage == $i): ?>
|
|
||||||
<span class="selected"><?= $i + 1 ?></span>
|
|
||||||
<?php else: ?>
|
|
||||||
<a href="<?= Container::$routeCollection->getRoute('community.transactions')->generateLink(['communitySlug' => $community->getSlug(), 'page' => $i]) ?>"><?= $i + 1 ?></a>
|
|
||||||
<?php endif; ?>
|
|
||||||
<?php endfor; ?>
|
|
||||||
<a href="<?= Container::$routeCollection->getRoute('community.transactions')->generateLink(['communitySlug' => $community->getSlug(), 'page' => min($pages - 1, $currentPage + 1)]) ?>">›</a>
|
|
||||||
<a href="<?= Container::$routeCollection->getRoute('community.transactions')->generateLink(['communitySlug' => $community->getSlug(), 'page' => $pages - 1]) ?>">»</a>
|
|
||||||
</p>
|
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<p class="marginTop"><a href="<?= Container::$routeCollection->getRoute('community.transactions.new')->generateLink(['communitySlug' => $community->getSlug(), 'event' => isset($event) ? $event->getSlug() : null]) ?>">New transaction</a></p>
|
<p class="marginTop"><a href="<?= Container::$routeCollection->getRoute('community.transactions.new')->generateLink(['communitySlug' => $community->getSlug(), 'event' => isset($event) ? $event->getSlug() : null]) ?>">New transaction</a></p>
|
||||||
|
@ -9,20 +9,13 @@
|
|||||||
<p class="marginTop"><a href="<?= Container::$routeCollection->getRoute('community.events.new')->generateLink(['communitySlug' => $community->getSlug()]) ?>">New event</a></p>
|
<p class="marginTop"><a href="<?= Container::$routeCollection->getRoute('community.events.new')->generateLink(['communitySlug' => $community->getSlug()]) ?>">New event</a></p>
|
||||||
|
|
||||||
<?php if ($numberOfEvents > 0): ?>
|
<?php if ($numberOfEvents > 0): ?>
|
||||||
|
<?php
|
||||||
|
$paginationRouteId = 'community.events';
|
||||||
|
$paginationRouteParams = ['communitySlug' => $community->getSlug()];
|
||||||
|
?>
|
||||||
|
|
||||||
<?php if ($pages > 1): ?>
|
<?php if ($pages > 1): ?>
|
||||||
<p class="paginateContainer marginTop">
|
@include(templates/pagination)
|
||||||
<a href="<?= Container::$routeCollection->getRoute('community.events')->generateLink(['communitySlug' => $community->getSlug(), 'page' => 0]) ?>">«</a>
|
|
||||||
<a href="<?= Container::$routeCollection->getRoute('community.events')->generateLink(['communitySlug' => $community->getSlug(), 'page' => max(0, $currentPage - 1)]) ?>">‹</a>
|
|
||||||
<?php for ($i = 0; $i < $pages; $i++): ?>
|
|
||||||
<?php if ($currentPage == $i): ?>
|
|
||||||
<span class="selected"><?= $i + 1 ?></span>
|
|
||||||
<?php else: ?>
|
|
||||||
<a href="<?= Container::$routeCollection->getRoute('community.events')->generateLink(['communitySlug' => $community->getSlug(), 'page' => $i]) ?>"><?= $i + 1 ?></a>
|
|
||||||
<?php endif; ?>
|
|
||||||
<?php endfor; ?>
|
|
||||||
<a href="<?= Container::$routeCollection->getRoute('community.events')->generateLink(['communitySlug' => $community->getSlug(), 'page' => min($pages - 1, $currentPage + 1)]) ?>">›</a>
|
|
||||||
<a href="<?= Container::$routeCollection->getRoute('community.events')->generateLink(['communitySlug' => $community->getSlug(), 'page' => $pages - 1]) ?>">»</a>
|
|
||||||
</p>
|
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php foreach ($events as $event): ?>
|
<?php foreach ($events as $event): ?>
|
||||||
@ -36,19 +29,7 @@
|
|||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
|
|
||||||
<?php if ($pages > 1): ?>
|
<?php if ($pages > 1): ?>
|
||||||
<p class="paginateContainer marginTop">
|
@include(templates/pagination)
|
||||||
<a href="<?= Container::$routeCollection->getRoute('community.events')->generateLink(['communitySlug' => $community->getSlug(), 'page' => 0]) ?>">«</a>
|
|
||||||
<a href="<?= Container::$routeCollection->getRoute('community.events')->generateLink(['communitySlug' => $community->getSlug(), 'page' => max(0, $currentPage - 1)]) ?>">‹</a>
|
|
||||||
<?php for ($i = 0; $i < $pages; $i++): ?>
|
|
||||||
<?php if ($currentPage == $i): ?>
|
|
||||||
<span class="selected"><?= $i + 1 ?></span>
|
|
||||||
<?php else: ?>
|
|
||||||
<a href="<?= Container::$routeCollection->getRoute('community.events')->generateLink(['communitySlug' => $community->getSlug(), 'page' => $i]) ?>"><?= $i + 1 ?></a>
|
|
||||||
<?php endif; ?>
|
|
||||||
<?php endfor; ?>
|
|
||||||
<a href="<?= Container::$routeCollection->getRoute('community.events')->generateLink(['communitySlug' => $community->getSlug(), 'page' => min($pages - 1, $currentPage + 1)]) ?>">›</a>
|
|
||||||
<a href="<?= Container::$routeCollection->getRoute('community.events')->generateLink(['communitySlug' => $community->getSlug(), 'page' => $pages - 1]) ?>">»</a>
|
|
||||||
</p>
|
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<p class="marginTop"><a href="<?= Container::$routeCollection->getRoute('community.events.new')->generateLink(['communitySlug' => $community->getSlug()]) ?>">New event</a></p>
|
<p class="marginTop"><a href="<?= Container::$routeCollection->getRoute('community.events.new')->generateLink(['communitySlug' => $community->getSlug()]) ?>">New event</a></p>
|
||||||
|
Loading…
Reference in New Issue
Block a user