add latest news item as widget to dashboard #52

This commit is contained in:
Nabeel Shahzad
2018-01-10 16:02:33 -06:00
parent 2f33c7b6aa
commit 2ccaaddfcd
4 changed files with 48 additions and 11 deletions

View File

@@ -0,0 +1,20 @@
<div class="nav nav-tabs" role="tablist" style="background: #067ec1; color: #FFF;">
News
</div>
<div class="card border-blue-bottom">
<div class="card-block" style="min-height: 0px">
@if($news->count() === 0)
<div class="text-center text-muted" style="padding: 30px;">
no news items
</div>
@endif
@foreach($news as $item)
<h4 style="margin-top: 0px;">{!! $item->subject !!}</h4>
<p class="category">{!! $item->user->name !!}
- {!! show_datetime($item->created_at) !!}</p>
{!! $item->body !!}
@endforeach
</div>
</div>