framework/views/frontend/content/index.blade.php

26 lines
1003 B
PHP
Raw Normal View History

2018-01-11 03:36:50 +08:00
@inject('url', 'Flarum\Http\UrlGenerator')
<div class="container">
<h2>{{ $translator->trans('core.views.index.all_discussions_heading') }}</h2>
<ul>
@foreach ($apiDocument->data as $discussion)
<li>
2017-06-26 05:33:02 +08:00
<a href="{{ $url->to('forum')->route('discussion', [
'id' => $discussion->id . (trim($discussion->attributes->slug) ? '-' . $discussion->attributes->slug : '')
]) }}">
{{ $discussion->attributes->title }}
</a>
</li>
@endforeach
</ul>
@if (isset($apiDocument->links->prev))
2018-01-11 03:35:07 +08:00
<a href="{{ $url->to('forum')->route('index') }}?page={{ $page - 1 }}">&laquo; {{ $translator->trans('core.views.index.previous_page_button') }}</a>
@endif
@if (isset($apiDocument->links->next))
<a href="{{ $url->to('forum')->route('index') }}?page={{ $page + 1 }}">{{ $translator->trans('core.views.index.next_page_button') }} &raquo;</a>
@endif
</div>