Changeset 0a1fb54 for resources/views/dashboard/users/index.blade.php
- Timestamp:
- 11/23/21 22:01:52 (3 years ago)
- Branches:
- master
- Children:
- dbc5976
- Parents:
- 4d73966
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
resources/views/dashboard/users/index.blade.php
r4d73966 r0a1fb54 45 45 <th>Name</th> 46 46 <th>Created by</th> 47 <th>Created at</th>48 47 <th>Updated at</th> 49 48 <th>Status</th> … … 81 80 <div class="font-weight-light p-1">{{$user->phone_number}}</div> 82 81 </td> 83 <td>{{ $user->getCreatedByName() }}</td> 84 <td>{{ date('d.m.Y - H:i', strtotime($user->created_at)) }}</td> 82 <td>{{ $user->getCreatedByUsername() }} 83 <div class="font-weight-light p-1">{{$user->getCreatedByName()}}</div> 84 <div class="font-weight-light p-1">{{ date('d.m.Y - H:i', strtotime($user->created_at)) }}</div> 85 </td> 86 85 87 @if($user->updated_at==NULL) 86 88 <td>/</td> … … 88 90 <td>{{ date('d.m.Y - H:i', strtotime($user->updated_at)) }}</td> 89 91 @endif 92 90 93 <td> 91 94 @if(Cache::has('is_online' . $user->id)) … … 99 102 @endif 100 103 </td> 101 @if(auth()->user()->hasPermission('manage_all_users') )104 @if(auth()->user()->hasPermission('manage_all_users') && auth()->user()->id != $user->id) 102 105 @if($user->hasRole("Referent") || $user->hasRole("Viewer") && $user->is_confirmed) 103 106 <td> … … 105 108 <i class="ti-pencil"></i> 106 109 </a> 110 @if ($user->is_active) 111 <a href="javascript:void(0)" data-toggle="modal" data-target="#blockModal_{{$user->id}}" class="text-warning ml-2" title="Block"> 112 <i class="ti-lock"></i> 113 </a> 114 @else 115 <a href="javascript:void(0)" data-toggle="modal" data-target="#unBlockModal_{{$user->id}}" class="text-warning ml-2" title="Unblock"> 116 <i class="ti-unlock"></i> 117 </a> 118 @endif 107 119 <a href="javascript:void(0)" class="text-danger ml-2" data-toggle="modal" data-target="#deleteModal_{{$user->id}}" title="Delete"> 108 120 <i class="ti-trash"></i> 109 121 </a> 122 110 123 </td> 111 124 @else … … 186 199 <div class="col-md-1"> 187 200 <div class="form-group"> 188 <label> Current</label>201 <label></label> 189 202 <figure class="avatar avatar-sm mr-2"> 190 203 @if($user->avatar==NULL) … … 223 236 @method('DELETE') 224 237 <p>Are you sure you want to delete user {{$user->username}} ?</p> 238 <p>Number of folders created: <a href="{{ route("dashboard.folders.index", ['id' => $user->id]) }}" class="text-linkedin">{{\App\Models\Folder::where('user_id', $user->id)->count()}}</a></p> 239 <div class="modal-footer"> 240 <button type="button" class="btn btn-secondary" data-dismiss="modal">Close 241 </button> 242 <button type="submit" class="btn btn-primary">Save changes</button> 243 </div> 244 </form> 245 </div> 246 247 </div> 248 </div> 249 </div> 250 251 <div class="modal fade" id="blockModal_{{$user->id}}" tabindex="-1" role="dialog" aria-hidden="true"> 252 <div class="modal-dialog modal-dialog-centered" role="document"> 253 <div class="modal-content"> 254 <div class="modal-header"> 255 <h5 class="modal-title" id="exampleModalCenterTitle">Block confirmation</h5> 256 <button type="button" class="close" data-dismiss="modal" aria-label="Close"> 257 <i class="ti-close"></i> 258 </button> 259 </div> 260 <div class="modal-body"> 261 <form action="{{ route("dashboard.users.block", $user->id) }}" method="POST"> 262 @csrf 263 @method('patch') 264 <p>Are you sure you want to block user {{$user->username}} ?</p> 265 <p>Number of folders created: <a href="{{ route("dashboard.folders.index", ['id' => $user->id]) }}" class="text-linkedin">{{\App\Models\Folder::where('user_id', $user->id)->count()}}</a></p> 266 <div class="modal-footer"> 267 <button type="button" class="btn btn-secondary" data-dismiss="modal">Close 268 </button> 269 <button type="submit" class="btn btn-primary">Save changes</button> 270 </div> 271 </form> 272 </div> 273 274 </div> 275 </div> 276 </div> 277 278 279 <div class="modal fade" id="unBlockModal_{{$user->id}}" tabindex="-1" role="dialog" aria-hidden="true"> 280 <div class="modal-dialog modal-dialog-centered" role="document"> 281 <div class="modal-content"> 282 <div class="modal-header"> 283 <h5 class="modal-title" id="exampleModalCenterTitle">Unblock confirmation</h5> 284 <button type="button" class="close" data-dismiss="modal" aria-label="Close"> 285 <i class="ti-close"></i> 286 </button> 287 </div> 288 <div class="modal-body"> 289 <form action="{{ route("dashboard.users.unblock", $user->id) }}" method="POST"> 290 @csrf 291 @method('patch') 292 <p>Are you sure you want to block user {{$user->username}} ?</p> 225 293 <p>Number of folders created: <a href="{{ route("dashboard.folders.index", ['id' => $user->id]) }}" class="text-linkedin">{{\App\Models\Folder::where('user_id', $user->id)->count()}}</a></p> 226 294 <div class="modal-footer">
Note:
See TracChangeset
for help on using the changeset viewer.