1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-28 17:02:04 +03:00

Added latest activity into users list view

This commit is contained in:
Dan Brown
2020-11-20 20:10:18 +00:00
parent bd6a1a66d1
commit c0680d5717
4 changed files with 31 additions and 6 deletions

View File

@ -157,6 +157,7 @@ return [
'user_profile' => 'User Profile',
'users_add_new' => 'Add New User',
'users_search' => 'Search Users',
'users_latest_activity' => 'Latest Activity',
'users_details' => 'User Details',
'users_details_desc' => 'Set a display name and an email address for this user. The email address will be used for logging into the application.',
'users_details_desc_no_email' => 'Set a display name for this user so others can recognise them.',

View File

@ -27,7 +27,6 @@
</div>
</div>
{{--TODO - Add last login--}}
<table class="table">
<tr>
<th></th>
@ -37,6 +36,9 @@
<a href="{{ sortUrl('/settings/users', $listDetails, ['sort' => 'email']) }}">{{ trans('auth.email') }}</a>
</th>
<th>{{ trans('settings.role_user_roles') }}</th>
<th class="text-right">
<a href="{{ sortUrl('/settings/users', $listDetails, ['sort' => 'latest_activity']) }}">{{ trans('settings.users_latest_activity') }}</a>
</th>
</tr>
@foreach($users as $user)
<tr>
@ -55,6 +57,11 @@
<small><a href="{{ url("/settings/roles/{$role->id}") }}">{{$role->display_name}}</a>@if($index !== count($user->roles) -1),@endif</small>
@endforeach
</td>
<td class="text-right text-muted">
@if($user->latestActivity)
<small title="{{ $user->latestActivity->created_at->format('Y-m-d H:i:s') }}">{{ $user->latestActivity->created_at->diffForHumans() }}</small>
@endif
</td>
</tr>
@endforeach
</table>