1
0
Fork 0
forked from mirror/pixelfed
pixelfed/resources/views/admin/users/home.blade.php

52 lines
1.3 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">Users</h3>
</div>
<hr>
<table class="table">
<thead class="thead-dark">
<tr>
2018-06-01 19:42:30 +00:00
<th scope="col">Username</th>
2018-05-20 21:50:11 +00:00
<th scope="col">Statuses</th>
<th scope="col">Storage</th>
<th scope="col">Role</th>
<th scope="col">Created</th>
</tr>
</thead>
<tbody>
@foreach($users as $user)
<tr>
<th scope="row">
2018-06-01 19:42:30 +00:00
<a href="{{$user->url()}}">
{{$user->username}}
2018-05-20 21:50:11 +00:00
</a>
</th>
<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>
<td>{{$user->created_at->diffForHumans(null, true, true)}}</td>
</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
{{$users->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