1
0
Fork 0
pixelfed/resources/views/admin/statuses/home.blade.php

55 lines
1.5 KiB
PHP
Raw Normal View History

2018-05-20 21:50:11 +00:00
@extends('admin.partial.template')
@section('section')
<div class="title">
<h3 class="font-weight-bold">Statuses</h3>
</div>
<hr>
<table class="table">
<thead class="thead-dark">
<tr>
<th scope="col">#</th>
<th scope="col">Username</th>
2018-05-30 02:49:25 +00:00
<th scope="col">Likes</th>
2018-05-20 21:50:11 +00:00
<th scope="col">Storage</th>
<th scope="col">Created</th>
</tr>
</thead>
<tbody>
@foreach($statuses as $status)
<tr>
<th scope="row">
<a href="/statuses/show/{{$status->id}}">
{{$status->id}}
</a>
</th>
2018-05-30 02:49:25 +00:00
<td class="font-weight-bold">{{$status->profile->username}}</td>
<td class="font-weight-bold">{{$status->likes()->count()}}</td>
2018-05-20 21:50:11 +00:00
@if(!$status->media_path)
2018-05-30 02:49:25 +00:00
<td class="font-weight-bold">0</td>
2018-05-20 21:50:11 +00:00
@else
<td><div class="human-size" data-bytes="{{$status->firstMedia()->size}}">{{$status->firstMedia()->size}}</div></td>
@endif
2018-05-30 02:49:25 +00:00
<td class="font-weight-bold">{{$status->created_at->diffForHumans(null, true, true, true)}}</td>
2018-05-20 21:50:11 +00:00
</tr>
@endforeach
</tbody>
</table>
2018-05-30 02:49:25 +00:00
<div class="d-flex justify-content-center mt-5 small">
2018-05-20 21:50:11 +00:00
{{$statuses->links()}}
</div>
@endsection
@push('scripts')
<script type="text/javascript">
$(document).ready(function() {
$('.human-size').each(function(d,a) {
let el = $(a);
let size = el.data('bytes');
el.text(filesize(size, {round: 0}));
});
});
</script>
@endpush