Update admin dashboard views

This commit is contained in:
Daniel Supernault 2018-05-29 20:49:25 -06:00
parent ff32f51ee5
commit 9767bec660
2 changed files with 7 additions and 11 deletions

View file

@ -12,7 +12,7 @@
<tr>
<th scope="col">#</th>
<th scope="col">Username</th>
<th scope="col">Caption</th>
<th scope="col">Likes</th>
<th scope="col">Storage</th>
<th scope="col">Created</th>
</tr>
@ -25,19 +25,19 @@
{{$status->id}}
</a>
</th>
<td>{{$status->profile->username}}</td>
<td>{{str_limit($status->caption, 30)}}</td>
<td class="font-weight-bold">{{$status->profile->username}}</td>
<td class="font-weight-bold">{{$status->likes()->count()}}</td>
@if(!$status->media_path)
<td>0</td>
<td class="font-weight-bold">0</td>
@else
<td><div class="human-size" data-bytes="{{$status->firstMedia()->size}}">{{$status->firstMedia()->size}}</div></td>
@endif
<td>{{$status->created_at->diffForHumans()}}</td>
<td class="font-weight-bold">{{$status->created_at->diffForHumans(null, true, true, true)}}</td>
</tr>
@endforeach
</tbody>
</table>
<div class="d-flex justify-content-center mt-5">
<div class="d-flex justify-content-center mt-5 small">
{{$statuses->links()}}
</div>
@endsection

View file

@ -11,8 +11,6 @@
<thead class="thead-dark">
<tr>
<th scope="col">#</th>
<th scope="col">Username</th>
<th scope="col">Email</th>
<th scope="col">Statuses</th>
<th scope="col">Storage</th>
<th scope="col">Role</th>
@ -27,8 +25,6 @@
{{$user->id}}
</a>
</th>
<td>{{$user->username}}</td>
<td>{{$user->email}}</td>
<td>{{$user->profile->statuses->count()}}</td>
<td><p class="human-size" data-bytes="{{App\Media::whereUserId($user->id)->sum('size')}}"></p></td>
<td>{!!$user->is_admin ? '<span class="text-danger">admin</span>' : 'member'!!}</td>
@ -37,7 +33,7 @@
@endforeach
</tbody>
</table>
<div class="d-flex justify-content-center mt-5">
<div class="d-flex justify-content-center mt-5 small">
{{$users->links()}}
</div>
@endsection