Update admin views

This commit is contained in:
Daniel Supernault 2019-06-18 19:14:46 -06:00
parent fc12f1eba5
commit e33dd43dc2
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7
4 changed files with 45 additions and 6 deletions

View file

@ -17,7 +17,8 @@
</div>
<hr>
<table class="table table-responsive">
<div class="table-responsive">
<table class="table">
<thead class="bg-light">
<tr>
<th scope="col">#</th>
@ -45,4 +46,5 @@
@endforeach
</tbody>
</table>
</div>
@endsection

View file

@ -11,10 +11,10 @@
<div class="col-md-4">
<div class="card" style="min-height:125px">
<div class="card-body">
<p class="small text-uppercase font-weight-bold text-muted">Alerts</p>
<p class="h2 mb-0">0</p>
<p class="small text-uppercase font-weight-bold text-muted">New Messages</p>
<p class="h2 mb-0">{{$data['contact']['count']}}</p>
</div>
<canvas width="100" height="10" class="sparkline mb-1" data-chart_values="[0,0]"></canvas>
<canvas width="100" height="10" class="sparkline mb-1" data-chart_values="{{$data['contact']['graph']}}"></canvas>
</div>
</div>

View file

@ -0,0 +1,36 @@
@extends('admin.partial.template-full')
@section('section')
<div class="title">
<h3 class="font-weight-bold d-inline-block">Messages</h3>
</div>
<hr>
<div class="table-responsive">
<table class="table">
<thead class="bg-light">
<tr>
<th scope="col">#</th>
<th scope="col">User</th>
<th scope="col">Message</th>
<th scope="col">Created</th>
</tr>
</thead>
<tbody>
@foreach($messages as $msg)
<tr>
<td>
<a href="/i/admin/messages/show/{{$msg->id}}" class="btn btn-sm btn-outline-primary">
{{$msg->id}}
</a>
</td>
<td class="font-weight-bold"><a href="{{$msg->user->url()}}">{{$msg->user->username}}</a></td>
<td class="font-weight-bold">{{str_limit($msg->message, 40)}}</td>
<td class="font-weight-bold">{{$msg->created_at->diffForHumans()}}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
{{$messages->links()}}
@endsection

View file

@ -8,8 +8,8 @@
<li class="nav-item mx-2 {{request()->is('*admin/dashboard')?'active':''}}">
<a class="nav-link" href="{{route('admin.home')}}">Dashboard</a>
</li>
<li class="nav-item mx-2 {{request()->is('*apps*')?'active':''}}">
<a class="nav-link font-weight-lighter text-muted" href="{{route('admin.apps')}}">Apps</a>
<li class="nav-item mx-2 {{request()->is('*messages*')?'active':''}}">
<a class="nav-link font-weight-lighter text-muted" href="{{route('admin.messages')}}">Messages</a>
</li>
<li class="nav-item mx-2 {{request()->is('*hashtags*')?'active':''}}">
<a class="nav-link font-weight-lighter text-muted" href="{{route('admin.hashtags')}}">Hashtags</a>
@ -37,6 +37,7 @@
More
</a>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">
<a class="dropdown-item font-weight-bold {{request()->is('*apps*')?'active':''}}" href="{{route('admin.apps')}}">Apps</a>
<a class="dropdown-item font-weight-bold {{request()->is('*discover*')?'active':''}}" href="{{route('admin.discover')}}">Discover</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item font-weight-bold" href="/horizon">Horizon</a>