]> BookStack Code Mirror - bookstack/blobdiff - resources/views/users/index.blade.php
Finished initial implementation of custom role system
[bookstack] / resources / views / users / index.blade.php
index 6e5d10c5faa6a504bd618e48d04c6b61894d5a34..f0663071472349fc88ad5ea149ec41419ba2a325 100644 (file)
@@ -8,7 +8,7 @@
 
     <div class="container small" ng-non-bindable>
         <h1>Users</h1>
-        @if($currentUser->can('user-create'))
+        @if(userCan('users-manage'))
             <p>
                 <a href="/settings/users/create" class="text-pos"><i class="zmdi zmdi-account-add"></i>Add new user</a>
             </p>
                 <th></th>
                 <th>Name</th>
                 <th>Email</th>
-                <th>User Type</th>
+                <th>User Roles</th>
             </tr>
             @foreach($users as $user)
                 <tr>
                     <td style="line-height: 0;"><img class="avatar med" src="{{$user->getAvatar(40)}}" alt="{{$user->name}}"></td>
                     <td>
-                        @if($currentUser->can('user-update') || $currentUser->id == $user->id)
+                        @if(userCan('users-manage') || $currentUser->id == $user->id)
                             <a href="/settings/users/{{$user->id}}">
                                 @endif
                                 {{ $user->name }}
-                                @if($currentUser->can('user-update') || $currentUser->id == $user->id)
+                                @if(userCan('users-manage') || $currentUser->id == $user->id)
                             </a>
                         @endif
                     </td>
                     <td>
-                        @if($currentUser->can('user-update') || $currentUser->id == $user->id)
+                        @if(userCan('users-manage') || $currentUser->id == $user->id)
                             <a href="/settings/users/{{$user->id}}">
                                 @endif
                                 {{ $user->email }}
-                                @if($currentUser->can('user-update') || $currentUser->id == $user->id)
+                                @if(userCan('users-manage') || $currentUser->id == $user->id)
                             </a>
                         @endif
                     </td>
-                    <td>{{ $user->role->display_name }}</td>
+                    <td>
+                       <small> {{ $user->roles->implode('display_name', ', ') }}</small>
+                    </td>
                 </tr>
             @endforeach
         </table>