framework/views/discussion.blade.php
Toby Zerner fc7db914db Translate basic HTML views
app('view') call to set translator is temporary. See #189
2015-10-21 11:36:49 +10:30

30 lines
959 B
PHP

<?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.deleted_user_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.basic.previous_page_button') }}</a>
@endif
@if ($page < $postsCount / 20)
<a href="{{ $url(['page' => $page + 1]) }}">{{ $translator->trans('core.basic.next_page_button') }} &raquo;</a>
@endif
</div>