1
0
mirror of https://github.com/flarum/core.git synced 2025-07-19 15:51:16 +02:00

Add pagination link for previous page

This commit is contained in:
Franz Liedke
2018-01-10 20:35:07 +01:00
parent a331f750cf
commit 973c629719

View File

@@ -16,6 +16,10 @@ $url = app('Flarum\Http\UrlGenerator');
@endforeach @endforeach
</ul> </ul>
@if (isset($document->links->prev))
<a href="{{ $url->to('forum')->route('index') }}?page={{ $page - 1 }}">&laquo; {{ $translator->trans('core.views.index.previous_page_button') }}</a>
@endif
@if (isset($document->links->next)) @if (isset($document->links->next))
<a href="{{ $url->to('forum')->route('index') }}?page={{ $page + 1 }}">{{ $translator->trans('core.views.index.next_page_button') }} &raquo;</a> <a href="{{ $url->to('forum')->route('index') }}?page={{ $page + 1 }}">{{ $translator->trans('core.views.index.next_page_button') }} &raquo;</a>
@endif @endif