Changeset c6b84df for resources/views/dashboard/users/index.blade.php
- Timestamp:
- 10/21/21 23:45:59 (3 years ago)
- Branches:
- develop, master
- Children:
- 4b7e2d3
- Parents:
- 6b95845
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
resources/views/dashboard/users/index.blade.php
r6b95845 rc6b84df 17 17 <ol class="breadcrumb"> 18 18 <li class="breadcrumb-item"> 19 <a href="{{ url(' dashboard.users') }}">Users</a>19 <a href="{{ url('/') }}">Dashboard</a> 20 20 </li> 21 <li class="breadcrumb-item active" aria-current="page">User List</li>21 <li class="breadcrumb-item active" aria-current="page">Users</li> 22 22 </ol> 23 23 </nav> 24 24 <div class="dropdown"> 25 <a href=" {{ route("dashboard.users.create") }}" class="btn btn-primary text-white">25 <a href="javascript:void(0)" data-toggle="modal" data-target="#createModal" class="btn btn-primary text-white"> 26 26 Add user 27 27 </a> 28 <a href="{{ route('dashboard.users.export') }}" class="btn btn-success text-white">Export table</a> 28 29 </div> 29 30 </div> … … 48 49 <th>Role</th> 49 50 <th>Status</th> 50 <th>Last seen</th>51 51 <th>Actions</th> 52 52 </tr> … … 84 84 <td> 85 85 @if(Cache::has('is_online' . $user->id)) 86 <span class="text-success">Online</span>86 <span data-toggle="tooltip" data-placement="bottom" title="{{ $user->last_seen }}" style="cursor: pointer;" class="text-success">Online</span> 87 87 @else 88 <span class="text-secondary">Offline</span>88 <span data-toggle="tooltip" data-placement="bottom" title="{{ $user->last_seen }}" class="text-secondary">Offline</span> 89 89 @endif 90 90 </td> 91 @if($user->last_seen==NULL)92 <td>Never logged in</td>93 @else94 <td>{{ \Carbon\Carbon::parse($user->last_seen)->diffForHumans() }}</td>95 @endif96 91 @if($user->hasRole("Referent") && $user->is_confirmed) 97 92 <td> 98 <a href=" {{ route("dashboard.users.edit", ["id" => $user->id]) }}" class="text-secondary" data-toggle="tooltip" title="Edit">93 <a href="javascript:void(0)" class="text-secondary" data-toggle="modal" data-target="#editModal_{{$user->id}}" title="Edit"> 99 94 <i class="ti-pencil"></i> 100 95 </a> … … 104 99 </td> 105 100 @else 106 <td> Not available</td>101 <td>Admin</td> 107 102 @endif 108 103 </tr> 104 105 <div class="modal fade" id="editModal_{{$user->id}}" tabindex="-1" role="dialog" aria-hidden="true"> 106 <div class="modal-dialog modal-dialog-centered modal-lg" role="document"> 107 <div class="modal-content"> 108 <div class="modal-header"> 109 <h5 class="modal-title" id="exampleModalCenterTitle">Edit user</h5> 110 <button type="button" class="close" data-dismiss="modal" aria-label="Close"> 111 <i class="ti-close"></i> 112 </button> 113 </div> 114 <div class="modal-body"> 115 <form action="{{ route("dashboard.users.edit", ["id" =>$user->id]) }}" method="post" accept-charset="utf-8" enctype='multipart/form-data'> 116 @method("patch") 117 @csrf 118 <div class="row"> 119 <div class="col-md-6"> 120 <div class="form-group"> 121 <label>Name</label> 122 <input type="text" name="name" value="{{ $user->name }}" minlength="2" maxlength="30" pattern="[a-zA-Zа-шА-Ш._\s]+" class="form-control" placeholder="Name" required> 123 </div> 124 </div> 125 <div class="col-md-6"> 126 <div class="form-group"> 127 <label>Surname</label> 128 <input type="text" name="surname" value="{{$user->surname}}" minlength="2" maxlength="30" pattern="[a-zA-Zа-шА-Ш._\s]+" class="form-control" placeholder="Surname" required> 129 </div> 130 </div> 131 </div> 132 <div class="row"> 133 <div class="col-md-6"> 134 <div class="form-group"> 135 <label class="form-label">Username</label> 136 <input type="text" name="username" value="{{ $user->username }}" minlength="5" maxlength="30" class="form-control" placeholder="Username" required> 137 </div> 138 </div> 139 <div class="col-md-6"> 140 <div class="form-group"> 141 <label class="form-label">Role</label> 142 143 <select class="form-control" name="userRole" required> 144 @foreach($roles as $role) 145 <option value="{{ $role->id }}" {{ $user->role_id == $role->id ? "selected" : "" }}>{{ $role->name }}</option> 146 @endforeach 147 </select> 148 </div> 149 </div> 150 </div> 151 <div class="row"> 152 <div class="col-md-6"> 153 <div class="form-group"> 154 <label>Email</label> 155 <input type="email" name="email" value="{{ $user->email }}" maxlength="50" class="form-control" placeholder="E-mail" required> 156 </div> 157 </div> 158 <div class="col-md-6"> 159 <div class="form-group"> 160 <label class="form-label">Phone Number</label> 161 <input type="text" name="phone_number" value="{{ $user->phone_number }}" class="form-control" placeholder="Phone number" autocomplete="off" required> 162 </div> 163 </div> 164 </div> 165 <div class="row"> 166 <div class="col-md-5"> 167 <div class="form-group"> 168 <label>Avatar</label> 169 <input type="file" name="avatar" value="{{ $user->avatar }}" class="form-control" accept="image/*"> 170 </div> 171 </div> 172 <div class="col-md-1"> 173 <div class="form-group"> 174 <label>Current</label> 175 @include('dashboard.partials.avatar') 176 </div> 177 </div> 178 </div> 179 <div class="modal-footer"> 180 <button type="button" class="btn btn-secondary" data-dismiss="modal">Close 181 </button> 182 <button type="submit" class="btn btn-primary">Save changes</button> 183 </div> 184 </form> 185 </div> 186 187 </div> 188 </div> 189 </div> 190 109 191 @endforeach 110 111 112 192 </tbody> 113 193 </table> 194 195 <div class="modal fade" id="createModal" tabindex="-1" role="dialog" aria-hidden="true"> 196 <div class="modal-dialog modal-dialog-centered modal-lg" role="document"> 197 <div class="modal-content"> 198 <div class="modal-header"> 199 <h5 class="modal-title" id="exampleModalCenterTitle">Create user</h5> 200 <button type="button" class="close" data-dismiss="modal" aria-label="Close"> 201 <i class="ti-close"></i> 202 </button> 203 </div> 204 <div class="modal-body"> 205 <form action="{{ route("dashboard.users.store") }}" method="post" accept-charset="utf-8" enctype='multipart/form-data'> 206 @csrf 207 <div class="row"> 208 <div class="col-md-6"> 209 <div class="form-group"> 210 <label>Name</label> 211 <input type="text" name="name" value="{{ old('name') }}" minlength="2" maxlength="25" pattern="[a-zA-Zа-шА-Ш._\s]+" class="form-control" placeholder="Name" required> 212 </div> 213 </div> 214 <div class="col-md-6"> 215 <div class="form-group"> 216 <label>Surname</label> 217 <input type="text" name="surname" value="{{ old('surname') }}" minlength="2" maxlength="25" pattern="[a-zA-Zа-шА-Ш._\s]+" class="form-control" placeholder="Surname" required> 218 </div> 219 </div> 220 </div> 221 <div class="row"> 222 <div class="col-md-6"> 223 <div class="form-group"> 224 <label class="form-label">Username</label> 225 <input type="text" name="username" value="{{ old('username') }}" minlength="5" maxlength="30" class="form-control" placeholder="Username" required> 226 </div> 227 </div> 228 <div class="col-md-6"> 229 <div class="form-group"> 230 <label class="form-label">Role</label> 231 <select class="form-control" name="userRole" required> 232 @foreach ($roles as $role) 233 <option value="{{ $role->id }}" {{ (old("userRole") == $role->id ? "selected" : "" ) }}>{{ $role->name }}</option> 234 @endforeach 235 </select> 236 </div> 237 </div> 238 </div> 239 <div class="row"> 240 <div class="col-md-6"> 241 <div class="form-group"> 242 <label>Email</label> 243 <input type="email" name="email" value="{{ old('email') }}" class="form-control" placeholder="E-mail" required> 244 </div> 245 </div> 246 <div class="col-md-6"> 247 <div class="form-group"> 248 <label class="form-label">Phone Number</label> 249 <input type="text" name="phone_number" value="{{ old('phone_number') }}" class="form-control" placeholder="Phone number" autocomplete="off" required> 250 </div> 251 </div> 252 </div> 253 <div class="row"> 254 <div class="col-md-6"> 255 <div class="form-group"> 256 <label>Avatar</label> 257 <input type="file" name="avatar" value="{{ old('avatar') }}" class="form-control" accept="image/*"> 258 </div> 259 </div> 260 </div> 261 <div class="modal-footer"> 262 <button type="button" class="btn btn-secondary" data-dismiss="modal">Close 263 </button> 264 <button type="submit" class="btn btn-primary">Save changes</button> 265 </div> 266 </form> 267 </div> 268 </div> 269 </div> 270 </div> 271 114 272 </div> 115 273 </div>
Note:
See TracChangeset
for help on using the changeset viewer.