- Bug corrected within definitions which were still tied to the test project.
- Added pagination widget.
This commit is contained in:
1 parent
98d1685172
commit
52e55f2bba
10 files changed
+50
-22
No files matched your search
@@ -1,7 +1,11 @@
|
||||
<div class="message-wrapper">
|
||||
{% foreach array_filter(array_merge($this->contextList, [ $context ?? null ])) as $name => $context %}
|
||||
{% foreach $context->messages ?? [] as $message %}
|
||||
{{= $message->render() }}
|
||||
{% endforeach %}
|
||||
{% endforeach %}
|
||||
</div>
|
||||
{% php $messageList = array_filter(array_merge($this->contextList, [ $context ?? null ])) %}
|
||||
|
||||
{% if $messageList %}
|
||||
<div class="message-wrapper">{% php
|
||||
foreach($messageList as $name => $context) {
|
||||
foreach($context->messages ?? [] as $message) {
|
||||
echo $message->render();
|
||||
}
|
||||
}
|
||||
%}</div>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,14 @@
|
||||
{% arguments string $url, int $page, int $pageCount, int $maxPage = 20 %}
|
||||
|
||||
<nav class="pagination-wrapper">
|
||||
<ul class="pagination">
|
||||
<li class="page-item {{ $page === 1 ? 'active' : '' }}"><a class="page-link" href="{% url.parameters $url, [ 'page' => 1 ] + get() %}">1</a></li>
|
||||
|
||||
{% foreach range(2, $pageCount < $maxPage ? $pageCount : $maxPage) as $pageIndex %}
|
||||
<li class="page-item {{ $page === $pageIndex ? 'active' : '' }}"><a class="page-link" href="{% url.parameters $url, [ 'page' => $pageIndex ] + get() %}">{{ $pageIndex }}</a></li>
|
||||
{% endforeach %}
|
||||
|
||||
<li class="page-item {{ $page === 1 ? 'disabled' : '' }}"><a class="page-link" href="{% url.parameters $url, [ 'page' => $page - 1 ] + get() %}">{% lang "lean.widget.pagination.previous" %}</a></li>
|
||||
<li class="page-item {{ $page === $pageCount ? 'disabled' : '' }}"><a class="page-link" href="{% url.parameters $url, [ 'page' => $page + 1 ] + get() %}">{% lang "lean.widget.pagination.next" %}</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
Reference in new issue
Block a user