1
0
mirror of https://github.com/flarum/core.git synced 2025-07-31 13:40:20 +02:00

Restructure views

- Use Laravel's view namespacing rather than the full file path
- Organise views into directories
This commit is contained in:
Toby Zerner
2017-11-29 12:49:09 +10:30
parent 7796580210
commit 479e44dd04
10 changed files with 6 additions and 6 deletions

View File

@@ -0,0 +1,29 @@
<?php
$discussion = $document->data;
$postsCount = count($discussion->relationships->posts->data);
?>
<div class="container">
<h2>{{ $discussion->attributes->title }}</h2>
<div>
@foreach ($posts as $post)
<div>
<?php $user = $getResource($post->relationships->user->data); ?>
<h3>{{ $user ? $user->attributes->username : $translator->trans('core.lib.username.deleted_text') }}</h3>
<div class="Post-body">
{!! $post->attributes->contentHtml !!}
</div>
</div>
<hr>
@endforeach
</div>
@if ($page > 1)
<a href="{{ $url(['page' => $page - 1]) }}">&laquo; {{ $translator->trans('core.views.discussion.previous_page_button') }}</a>
@endif
@if ($page < $postsCount / 20)
<a href="{{ $url(['page' => $page + 1]) }}">{{ $translator->trans('core.views.discussion.next_page_button') }} &raquo;</a>
@endif
</div>