]> BookStack Code Mirror - bookstack/blob - resources/views/users/index.blade.php
Finished migrated from icon-font to SVG
[bookstack] / resources / views / users / index.blade.php
1 @extends('simple-layout')
2
3 @section('toolbar')
4     @include('settings/navbar', ['selected' => 'users'])
5 @stop
6
7 @section('body')
8     <div class="container small" ng-non-bindable>
9         <p>&nbsp;</p>
10         <div class="card">
11             <h3>@icon('users') {{ trans('settings.users') }}</h3>
12             <div class="body">
13                 <div class="container">
14                     <div class="row">
15                         <div class="col-sm-4">
16                             <form method="get" action="{{ baseUrl("/settings/users") }}">
17                                 @foreach(collect($listDetails)->except('search') as $name => $val)
18                                     <input type="hidden" name="{{ $name }}" value="{{ $val }}">
19                                 @endforeach
20                                 <input type="text" name="search" placeholder="{{ trans('settings.users_search') }}" @if($listDetails['search']) value="{{$listDetails['search']}}" @endif>
21                             </form>
22                         </div>
23                         <div class="col-sm-8 text-right">
24                             @if(userCan('users-manage'))
25                                 <a href="{{ baseUrl("/settings/users/create") }}" style="margin-top: 0;" class="pos button">{{ trans('settings.users_add_new') }}</a>
26                             @endif
27                         </div>
28                     </div>
29                 </div>
30
31                 <table class="table">
32                     <tr>
33                         <th></th>
34                         <th><a href="{{ sortUrl('/settings/users', $listDetails, ['sort' => 'name']) }}">{{ trans('auth.name') }}</a></th>
35                         <th><a href="{{ sortUrl('/settings/users', $listDetails, ['sort' => 'email']) }}">{{ trans('auth.email') }}</a></th>
36                         <th>{{ trans('settings.role_user_roles') }}</th>
37                     </tr>
38                     @foreach($users as $user)
39                         <tr>
40                             <td style="line-height: 0;"><img class="avatar med" src="{{ $user->getAvatar(40)}}" alt="{{ $user->name }}"></td>
41                             <td>
42                                 @if(userCan('users-manage') || $currentUser->id == $user->id)
43                                     <a href="{{ baseUrl("/settings/users/{$user->id}") }}">
44                                         @endif
45                                         {{ $user->name }}
46                                         @if(userCan('users-manage') || $currentUser->id == $user->id)
47                                     </a>
48                                 @endif
49                             </td>
50                             <td>
51                                 @if(userCan('users-manage') || $currentUser->id == $user->id)
52                                     <a href="{{ baseUrl("/settings/users/{$user->id}") }}">
53                                         @endif
54                                         {{ $user->email }}
55                                         @if(userCan('users-manage') || $currentUser->id == $user->id)
56                                     </a>
57                                 @endif
58                             </td>
59                             <td>
60                                 @foreach($user->roles as $index => $role)
61                                     <small><a href="{{ baseUrl("/settings/roles/{$role->id}") }}">{{$role->display_name}}</a>@if($index !== count($user->roles) -1),@endif</small>
62                                 @endforeach
63                             </td>
64                         </tr>
65                     @endforeach
66                 </table>
67
68                 <div>
69                     {{ $users->links() }}
70                 </div>
71
72             </div>
73         </div>
74
75     </div>
76
77 @stop