]> BookStack Code Mirror - bookstack/blob - resources/views/users/index.blade.php
Make building of search results work for multi-byte encoded characters
[bookstack] / resources / views / users / index.blade.php
1 @extends('layouts.simple')
2
3 @section('body')
4     <div class="container small">
5
6         <div class="py-m">
7             @include('settings.parts.navbar', ['selected' => 'users'])
8         </div>
9
10         <main class="card content-wrap">
11
12             <div class="flex-container-row wrap justify-space-between items-center">
13                 <h1 class="list-heading">{{ trans('settings.users') }}</h1>
14
15                 <div>
16                     <div class="block inline mr-xs">
17                         <form method="get" action="{{ url("/settings/users") }}">
18                             @foreach(collect($listDetails)->except('search') as $name => $val)
19                                 <input type="hidden" name="{{ $name }}" value="{{ $val }}">
20                             @endforeach
21                             <input type="text" name="search" placeholder="{{ trans('settings.users_search') }}" @if($listDetails['search']) value="{{$listDetails['search']}}" @endif>
22                         </form>
23                     </div>
24                     <a href="{{ url("/settings/users/create") }}" class="outline button mt-none">{{ trans('settings.users_add_new') }}</a>
25                 </div>
26             </div>
27
28             <table class="table">
29                 <tr>
30                     <th></th>
31                     <th>
32                         <a href="{{ sortUrl('/settings/users', $listDetails, ['sort' => 'name']) }}">{{ trans('auth.name') }}</a>
33                         /
34                         <a href="{{ sortUrl('/settings/users', $listDetails, ['sort' => 'email']) }}">{{ trans('auth.email') }}</a>
35                     </th>
36                     <th>{{ trans('settings.role_user_roles') }}</th>
37                     <th class="text-right">
38                         <a href="{{ sortUrl('/settings/users', $listDetails, ['sort' => 'last_activity_at']) }}">{{ trans('settings.users_latest_activity') }}</a>
39                     </th>
40                 </tr>
41                 @foreach($users as $user)
42                     <tr>
43                         <td class="text-center" style="line-height: 0;"><img class="avatar med" src="{{ $user->getAvatar(40)}}" alt="{{ $user->name }}"></td>
44                         <td>
45                             <a href="{{ url("/settings/users/{$user->id}") }}">
46                                 {{ $user->name }}
47                                 <br>
48                                 <span class="text-muted">{{ $user->email }}</span>
49                                 @if($user->mfa_values_count > 0)
50                                     <span title="MFA Configured" class="text-pos">@icon('lock')</span>
51                                 @endif
52                             </a>
53                         </td>
54                         <td>
55                             @foreach($user->roles as $index => $role)
56                                 <small><a href="{{ url("/settings/roles/{$role->id}") }}">{{$role->display_name}}</a>@if($index !== count($user->roles) -1),@endif</small>
57                             @endforeach
58                         </td>
59                         <td class="text-right text-muted">
60                             @if($user->last_activity_at)
61                                 <small title="{{ $user->last_activity_at->format('Y-m-d H:i:s') }}">{{ $user->last_activity_at->diffForHumans() }}</small>
62                             @endif
63                         </td>
64                     </tr>
65                 @endforeach
66             </table>
67
68             <div>
69                 {{ $users->links() }}
70             </div>
71         </main>
72
73     </div>
74
75 @stop