Changeset e651d0d for resources/views/dashboard/users
- Timestamp:
- 10/27/21 00:05:50 (3 years ago)
- Branches:
- develop, master
- Children:
- 7614db3
- Parents:
- ac3f217
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
resources/views/dashboard/users/index.blade.php
rac3f217 re651d0d 39 39 <div class="card-body"> 40 40 <div class="table-responsive"> 41 <table id="user-list" class="table table-lg">41 <table id="user-list" class="table"> 42 42 <thead> 43 43 <tr> … … 113 113 <td></td> 114 114 @endif 115 </tr> 116 117 <div class="modal fade" id="editModal_{{$user->id}}" tabindex="-1" role="dialog" aria-hidden="true"> 118 <div class="modal-dialog modal-dialog-centered modal-lg" role="document"> 119 <div class="modal-content"> 120 <div class="modal-header"> 121 <h5 class="modal-title" id="exampleModalCenterTitle">Edit user</h5> 122 <button type="button" class="close" data-dismiss="modal" aria-label="Close"> 123 <i class="ti-close"></i> 124 </button> 115 116 <div class="modal fade" id="editModal_{{$user->id}}" tabindex="-1" role="dialog" aria-hidden="true"> 117 <div class="modal-dialog modal-dialog-centered modal-lg" role="document"> 118 <div class="modal-content"> 119 <div class="modal-header"> 120 <h5 class="modal-title" id="exampleModalCenterTitle">Edit user</h5> 121 <button type="button" class="close" data-dismiss="modal" aria-label="Close"> 122 <i class="ti-close"></i> 123 </button> 124 </div> 125 <div class="modal-body"> 126 <form action="{{ route("dashboard.users.edit", ["id" =>$user->id]) }}" method="post" accept-charset="utf-8" enctype='multipart/form-data'> 127 @method("patch") 128 @csrf 129 <div class="row"> 130 <div class="col-md-6"> 131 <div class="form-group"> 132 <label>Name</label> 133 <input type="text" name="name" value="{{ $user->name }}" minlength="2" maxlength="30" pattern="[a-zA-Zа-шА-Ш._\s]+" class="form-control" placeholder="Name" required> 134 </div> 135 </div> 136 <div class="col-md-6"> 137 <div class="form-group"> 138 <label>Surname</label> 139 <input type="text" name="surname" value="{{$user->surname}}" minlength="2" maxlength="30" pattern="[a-zA-Zа-шА-Ш._\s]+" class="form-control" placeholder="Surname" required> 140 </div> 141 </div> 142 </div> 143 <div class="row"> 144 <div class="col-md-6"> 145 <div class="form-group"> 146 <label class="form-label">Username</label> 147 <input type="text" name="username" value="{{ $user->username }}" minlength="5" maxlength="30" class="form-control" placeholder="Username" required> 148 </div> 149 </div> 150 <div class="col-md-6"> 151 <div class="form-group"> 152 <label class="form-label">Role</label> 153 154 <select class="form-control" name="userRole" required> 155 @foreach($roles as $role) 156 <option value="{{ $role->id }}" {{ $user->role_id == $role->id ? "selected" : "" }}>{{ $role->name }}</option> 157 @endforeach 158 </select> 159 </div> 160 </div> 161 </div> 162 <div class="row"> 163 <div class="col-md-6"> 164 <div class="form-group"> 165 <label>Email</label> 166 <input type="email" name="email" value="{{ $user->email }}" maxlength="50" class="form-control" placeholder="E-mail" required> 167 </div> 168 </div> 169 <div class="col-md-6"> 170 <div class="form-group"> 171 <label class="form-label">Phone Number</label> 172 <input type="text" name="phone_number" value="{{ $user->phone_number }}" class="form-control" placeholder="Phone number" autocomplete="off" required> 173 </div> 174 </div> 175 </div> 176 <div class="row"> 177 <div class="col-md-5"> 178 <div class="form-group"> 179 <label>Avatar</label> 180 <input type="file" name="avatar" value="{{ $user->avatar }}" class="form-control" accept="image/*"> 181 </div> 182 </div> 183 <div class="col-md-1"> 184 <div class="form-group"> 185 <label>Current</label> 186 <figure class="avatar avatar-sm mr-2"> 187 @if($user->avatar==NULL) 188 <img src="{{ url('assets/media/images/user.png') }}" class="rounded-circle" alt="avatar"> 189 @else 190 <img src="{{url('uploads/users/' . $user->avatar)}}" class="rounded-circle" alt="avatar"> 191 @endif 192 </figure> 193 </div> 194 </div> 195 </div> 196 <div class="modal-footer"> 197 <button type="button" class="btn btn-secondary" data-dismiss="modal">Close 198 </button> 199 <button type="submit" class="btn btn-primary">Save changes</button> 200 </div> 201 </form> 202 </div> 203 125 204 </div> 126 <div class="modal-body">127 <form action="{{ route("dashboard.users.edit", ["id" =>$user->id]) }}" method="post" accept-charset="utf-8" enctype='multipart/form-data'>128 @method("patch")129 @csrf130 <div class="row">131 <div class="col-md-6">132 <div class="form-group">133 <label>Name</label>134 <input type="text" name="name" value="{{ $user->name }}" minlength="2" maxlength="30" pattern="[a-zA-Zа-шА-Ш._\s]+" class="form-control" placeholder="Name" required>135 </div>136 </div>137 <div class="col-md-6">138 <div class="form-group">139 <label>Surname</label>140 <input type="text" name="surname" value="{{$user->surname}}" minlength="2" maxlength="30" pattern="[a-zA-Zа-шА-Ш._\s]+" class="form-control" placeholder="Surname" required>141 </div>142 </div>143 </div>144 <div class="row">145 <div class="col-md-6">146 <div class="form-group">147 <label class="form-label">Username</label>148 <input type="text" name="username" value="{{ $user->username }}" minlength="5" maxlength="30" class="form-control" placeholder="Username" required>149 </div>150 </div>151 <div class="col-md-6">152 <div class="form-group">153 <label class="form-label">Role</label>154 155 <select class="form-control" name="userRole" required>156 @foreach($roles as $role)157 <option value="{{ $role->id }}" {{ $user->role_id == $role->id ? "selected" : "" }}>{{ $role->name }}</option>158 @endforeach159 </select>160 </div>161 </div>162 </div>163 <div class="row">164 <div class="col-md-6">165 <div class="form-group">166 <label>Email</label>167 <input type="email" name="email" value="{{ $user->email }}" maxlength="50" class="form-control" placeholder="E-mail" required>168 </div>169 </div>170 <div class="col-md-6">171 <div class="form-group">172 <label class="form-label">Phone Number</label>173 <input type="text" name="phone_number" value="{{ $user->phone_number }}" class="form-control" placeholder="Phone number" autocomplete="off" required>174 </div>175 </div>176 </div>177 <div class="row">178 <div class="col-md-5">179 <div class="form-group">180 <label>Avatar</label>181 <input type="file" name="avatar" value="{{ $user->avatar }}" class="form-control" accept="image/*">182 </div>183 </div>184 <div class="col-md-1">185 <div class="form-group">186 <label>Current</label>187 <figure class="avatar avatar-sm mr-2">188 @if($user->avatar==NULL)189 <img src="{{ url('assets/media/images/user.png') }}" class="rounded-circle" alt="avatar">190 @else191 <img src="{{url('uploads/users/' . $user->avatar)}}" class="rounded-circle" alt="avatar">192 @endif193 </figure>194 </div>195 </div>196 </div>197 <div class="modal-footer">198 <button type="button" class="btn btn-secondary" data-dismiss="modal">Close199 </button>200 <button type="submit" class="btn btn-primary">Save changes</button>201 </div>202 </form>203 </div>204 205 205 </div> 206 206 </div> 207 </div> 208 209 <div class="modal fade" id="deleteModal_{{$user->id}}" tabindex="-1" role="dialog" aria-hidden="true"> 210 <div class="modal-dialog modal-dialog-centered" role="document"> 211 <div class="modal-content"> 212 <div class="modal-header"> 213 <h5 class="modal-title" id="exampleModalCenterTitle">Delete confirmation</h5> 214 <button type="button" class="close" data-dismiss="modal" aria-label="Close"> 215 <i class="ti-close"></i> 216 </button> 207 208 <div class="modal fade" id="deleteModal_{{$user->id}}" tabindex="-1" role="dialog" aria-hidden="true"> 209 <div class="modal-dialog modal-dialog-centered" role="document"> 210 <div class="modal-content"> 211 <div class="modal-header"> 212 <h5 class="modal-title" id="exampleModalCenterTitle">Delete confirmation</h5> 213 <button type="button" class="close" data-dismiss="modal" aria-label="Close"> 214 <i class="ti-close"></i> 215 </button> 216 </div> 217 <div class="modal-body"> 218 <form action="{{ route("dashboard.users.destroy", $user->id) }}" method="POST"> 219 @csrf 220 @method('DELETE') 221 <p>Are you sure you want to delete user {{$user->username}} ?</p> 222 <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> 223 <div class="modal-footer"> 224 <button type="button" class="btn btn-secondary" data-dismiss="modal">Close 225 </button> 226 <button type="submit" class="btn btn-primary">Save changes</button> 227 </div> 228 </form> 229 </div> 230 217 231 </div> 218 <div class="modal-body">219 <form action="{{ route("dashboard.users.destroy", $user->id) }}" method="POST">220 @csrf221 @method('DELETE')222 <p>Are you sure you want to delete user {{$user->username}} ?</p>223 <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>224 <div class="modal-footer">225 <button type="button" class="btn btn-secondary" data-dismiss="modal">Close226 </button>227 <button type="submit" class="btn btn-primary">Save changes</button>228 </div>229 </form>230 </div>231 232 232 </div> 233 233 </div> 234 </div> 234 </tr> 235 236 235 237 @endforeach 236 238 </tbody>
Note:
See TracChangeset
for help on using the changeset viewer.