[0924b6c] | 1 | @extends("layouts.dashboard")
|
---|
| 2 |
|
---|
| 3 | @section("title", "Settings - Dashboard | TechnoBlog")
|
---|
| 4 |
|
---|
| 5 | @section("dashboard_content")
|
---|
| 6 |
|
---|
| 7 | <div class="my-3 my-md-5">
|
---|
| 8 |
|
---|
| 9 | <div class="container">
|
---|
| 10 |
|
---|
| 11 | <div class="row">
|
---|
| 12 |
|
---|
| 13 | <div class="col-sm-12">
|
---|
| 14 |
|
---|
| 15 | <div class="card">
|
---|
| 16 |
|
---|
| 17 | <div class="card-header">
|
---|
| 18 | <h3 class="card-title font-weight-bold">Settings</h3>
|
---|
| 19 | </div>
|
---|
| 20 |
|
---|
| 21 | <div class="card-body">
|
---|
| 22 |
|
---|
| 23 | <div class="row">
|
---|
| 24 | <div class="col-md-4">
|
---|
| 25 | <div class="nav flex-column nav-pills" id="v-pills-tab" role="tablist"
|
---|
| 26 | aria-orientation="vertical">
|
---|
[0c07a90] | 27 | <a class="nav-link active pt-2 pb-2" id="v-pills-home-tab" data-toggle="pill"
|
---|
[0924b6c] | 28 | href="#v-pills-home" role="tab" aria-controls="v-pills-home"
|
---|
[d25ba66] | 29 | aria-selected="true">Profile</a>
|
---|
[0924b6c] | 30 | <a class="nav-link pt-2 pb-2" id="v-pills-profile-tab" data-toggle="pill"
|
---|
| 31 | href="#v-pills-profile" role="tab" aria-controls="v-pills-profile"
|
---|
[d25ba66] | 32 | aria-selected="false">Account</a>
|
---|
| 33 | @if(auth()->user()->hasPermission("access_all_phases"))
|
---|
| 34 | <a class="nav-link pt-2 pb-2" id="v-pills-phases-tab" data-toggle="pill"
|
---|
| 35 | href="#v-pills-phases" role="tab" aria-controls="v-pills-phases"
|
---|
| 36 | aria-selected="false">Phases</a>
|
---|
| 37 | @endif
|
---|
| 38 |
|
---|
| 39 | @if(auth()->user()->hasPermission("access_all_post_securities"))
|
---|
[0c07a90] | 40 | <a class="nav-link pt-2 pb-2" id="v-pills-post-security-tab" data-toggle="pill"
|
---|
[d25ba66] | 41 | href="#v-pills-post-security" role="tab" aria-controls="v-pills-post-security"
|
---|
| 42 | aria-selected="false">Post Security</a>
|
---|
| 43 | @endif
|
---|
[0924b6c] | 44 | </div>
|
---|
| 45 | </div>
|
---|
| 46 |
|
---|
| 47 | <div class="col-md-8">
|
---|
| 48 | <div class="tab-content" id="v-pills-tabContent">
|
---|
[0c07a90] | 49 | <div class="tab-pane fade show active" id="v-pills-home" role="tabpanel"
|
---|
[0924b6c] | 50 | aria-labelledby="v-pills-home-tab">
|
---|
| 51 |
|
---|
| 52 | <form class="actionForm" action="{{ route("dashboard.settings.personal") }}"
|
---|
| 53 | method="post" accept-charset="UTF-8">
|
---|
| 54 |
|
---|
| 55 | @method("patch")
|
---|
| 56 | @csrf
|
---|
| 57 |
|
---|
| 58 | <fieldset class="form-fieldset">
|
---|
| 59 |
|
---|
| 60 | <h4 class="font-weight-normal border-bottom pb-2">Personal
|
---|
| 61 | Information</h4>
|
---|
| 62 |
|
---|
| 63 | <div class="row">
|
---|
| 64 |
|
---|
| 65 | <div class="col-md-4">
|
---|
| 66 | <div class="form-group">
|
---|
| 67 | <label class="form-label">Name</label>
|
---|
| 68 | <input type="text"
|
---|
| 69 | value="{{ old("name", $userProfile->user->name) }}"
|
---|
| 70 | name="name" class="form-control">
|
---|
| 71 | </div>
|
---|
| 72 | </div>
|
---|
| 73 |
|
---|
| 74 | <div class="col-md-4">
|
---|
| 75 | <div class="form-group">
|
---|
| 76 | <label class="form-label">Surname</label>
|
---|
| 77 | <input type="text"
|
---|
| 78 | value="{{ old("surname", $userProfile->user->surname) }}"
|
---|
| 79 | name="surname" class="form-control">
|
---|
| 80 | </div>
|
---|
| 81 | </div>
|
---|
| 82 |
|
---|
| 83 | <div class="col-md-4">
|
---|
| 84 | <div class="form-group">
|
---|
| 85 | <label class="form-label">Mobile Number Country
|
---|
| 86 | Code</label>
|
---|
| 87 | <select class="selectData" id="selectWithContent"
|
---|
| 88 | name="mobile_number_country">
|
---|
| 89 | <option value=""></option>
|
---|
| 90 | @foreach ($countries as $code => $name)
|
---|
| 91 | <option value="{{ $code }}"
|
---|
| 92 | {{ (old("mobile_number_country", $userProfile->user->country_code) == $code) ? "selected" : "" }} data-data='{"image": "/assets/images/flags/{{ strtolower($code) }}.svg"}'>{{ $name }}</option>
|
---|
| 93 | @endforeach
|
---|
| 94 | </select>
|
---|
| 95 | </div>
|
---|
| 96 | </div>
|
---|
| 97 |
|
---|
| 98 | <div class="col-md-4">
|
---|
| 99 | <div class="form-group">
|
---|
| 100 | <label class="form-label">Mobile Number</label>
|
---|
| 101 | <input type="text"
|
---|
| 102 | value="{{ old("mobile_number", $userProfile->user->mobile_number) }}"
|
---|
| 103 | name="mobile_number" class="form-control">
|
---|
| 104 | </div>
|
---|
| 105 | </div>
|
---|
| 106 |
|
---|
| 107 | <div class="col-md-8">
|
---|
| 108 | <div class="form-group">
|
---|
| 109 | <label class="form-label">Short Bio</label>
|
---|
| 110 | <input type="text"
|
---|
| 111 | value="{{ old("short_bio", $userProfile->short_bio) }}"
|
---|
| 112 | name="short_bio" class="form-control"
|
---|
| 113 | autocomplete="off">
|
---|
| 114 | </div>
|
---|
| 115 | </div>
|
---|
| 116 |
|
---|
| 117 | <div class="col-md-8">
|
---|
| 118 | <div class="form-group">
|
---|
| 119 | <label class="form-label">Public Profile Link</label>
|
---|
| 120 | <div class="input-group">
|
---|
| 121 | <span class="input-group-prepend" id="basic-addon3">
|
---|
| 122 | <span class="input-group-text">https://technoblog.com/profile/</span>
|
---|
| 123 | </span>
|
---|
| 124 | <input type="text"
|
---|
| 125 | value="{{ old("profile_link", $userProfile->profile_link) }}"
|
---|
| 126 | name="profile_link" class="form-control"
|
---|
| 127 | autocomplete="off">
|
---|
| 128 | </div>
|
---|
| 129 | </div>
|
---|
| 130 | </div>
|
---|
| 131 |
|
---|
| 132 | <div class="col-md-12">
|
---|
| 133 | <div class="form-group mb-0 float-right">
|
---|
| 134 | <input type="submit" value="Submit"
|
---|
| 135 | class="submitBtn btn btn-primary">
|
---|
| 136 | </div>
|
---|
| 137 | </div>
|
---|
| 138 |
|
---|
| 139 | </div>
|
---|
| 140 |
|
---|
| 141 | </fieldset>
|
---|
| 142 |
|
---|
| 143 | </form>
|
---|
| 144 |
|
---|
| 145 | <form class="actionForm" action="{{ route("dashboard.settings.photos") }}"
|
---|
| 146 | method="post" enctype="multipart/form-data">
|
---|
| 147 |
|
---|
| 148 | @method("patch")
|
---|
| 149 | @csrf
|
---|
| 150 |
|
---|
| 151 | <fieldset class="form-fieldset">
|
---|
| 152 |
|
---|
| 153 | <h4 class="font-weight-normal border-bottom pb-2">Photos</h4>
|
---|
| 154 |
|
---|
| 155 | <div class="row">
|
---|
| 156 |
|
---|
| 157 | <div class="col-md-6">
|
---|
| 158 | <div class="form-group">
|
---|
| 159 | <label class="form-label">Upload Profile Picture</label>
|
---|
| 160 | <div class="custom-file">
|
---|
| 161 | <input type="file" class="custom-file-input"
|
---|
| 162 | name="profile_image">
|
---|
| 163 | <label class="custom-file-label">Choose file</label>
|
---|
| 164 | </div>
|
---|
| 165 | </div>
|
---|
| 166 | </div>
|
---|
| 167 |
|
---|
| 168 | <div class="col-md-6">
|
---|
| 169 | <div class="form-group">
|
---|
| 170 | <label class="form-label">Upload Cover Picture</label>
|
---|
| 171 | <div class="custom-file">
|
---|
| 172 | <input type="file" class="custom-file-input"
|
---|
| 173 | name="cover_image">
|
---|
| 174 | <label class="custom-file-label">Choose file</label>
|
---|
| 175 | </div>
|
---|
| 176 | </div>
|
---|
| 177 | </div>
|
---|
| 178 |
|
---|
| 179 | <div class="col-md-12">
|
---|
| 180 | <div class="form-group mb-0 float-right">
|
---|
| 181 | <input type="submit" value="Submit"
|
---|
| 182 | class="submitBtn btn btn-primary">
|
---|
| 183 | </div>
|
---|
| 184 | </div>
|
---|
| 185 |
|
---|
| 186 | </div>
|
---|
| 187 |
|
---|
| 188 | </fieldset>
|
---|
| 189 |
|
---|
| 190 | </form>
|
---|
| 191 |
|
---|
| 192 | <form class="actionForm" action="{{ route("dashboard.settings.social") }}"
|
---|
| 193 | method="post" accept-charset="UTF-8">
|
---|
| 194 |
|
---|
| 195 | @method("patch")
|
---|
| 196 | @csrf
|
---|
| 197 |
|
---|
| 198 | <fieldset class="form-fieldset">
|
---|
| 199 |
|
---|
| 200 | <h4 class="font-weight-normal border-bottom pb-2">Social Site
|
---|
| 201 | Links</h4>
|
---|
| 202 |
|
---|
| 203 | <div class="row">
|
---|
| 204 |
|
---|
| 205 | <div class="col-md-6">
|
---|
| 206 | <div class="form-group">
|
---|
| 207 | <label class="form-label">Facebook</label>
|
---|
| 208 | <div class="input-group">
|
---|
| 209 | <span class="input-group-prepend" id="basic-addon3">
|
---|
| 210 | <span
|
---|
| 211 | class="input-group-text">https://facebook.com/</span>
|
---|
| 212 | </span>
|
---|
| 213 | <input type="text" class="form-control"
|
---|
| 214 | name="facebook"
|
---|
| 215 | value="{{ old("facebook", $userProfile->facebook_link) }}">
|
---|
| 216 | </div>
|
---|
| 217 | </div>
|
---|
| 218 | </div>
|
---|
| 219 |
|
---|
| 220 | <div class="col-md-6">
|
---|
| 221 | <div class="form-group">
|
---|
| 222 | <label class="form-label">Instagram</label>
|
---|
| 223 | <div class="input-group">
|
---|
| 224 | <span class="input-group-prepend" id="basic-addon3">
|
---|
| 225 | <span class="input-group-text">https://instagram.com/</span>
|
---|
| 226 | </span>
|
---|
| 227 | <input type="text" class="form-control"
|
---|
| 228 | name="instagram"
|
---|
| 229 | value="{{ old("instagram", $userProfile->instagram_link) }}">
|
---|
| 230 | </div>
|
---|
| 231 | </div>
|
---|
| 232 | </div>
|
---|
| 233 |
|
---|
| 234 | <div class="col-md-6 mt-3">
|
---|
| 235 | <div class="form-group">
|
---|
| 236 | <label class="form-label">Twitter</label>
|
---|
| 237 | <div class="input-group">
|
---|
| 238 | <span class="input-group-prepend" id="basic-addon3">
|
---|
| 239 | <span
|
---|
| 240 | class="input-group-text">https://twitter.com/</span>
|
---|
| 241 | </span>
|
---|
| 242 | <input type="text" class="form-control"
|
---|
| 243 | name="twitter"
|
---|
| 244 | value="{{ old("twitter", $userProfile->twitter_link) }}">
|
---|
| 245 | </div>
|
---|
| 246 | </div>
|
---|
| 247 | </div>
|
---|
| 248 |
|
---|
| 249 | <div class="col-md-6 mt-3">
|
---|
| 250 | <div class="form-group">
|
---|
| 251 | <label class="form-label">Youtube</label>
|
---|
| 252 | <div class="input-group">
|
---|
| 253 | <span class="input-group-prepend" id="basic-addon3">
|
---|
| 254 | <span
|
---|
| 255 | class="input-group-text">https://youtube.com/</span>
|
---|
| 256 | </span>
|
---|
| 257 | <input type="text" class="form-control"
|
---|
| 258 | name="youtube"
|
---|
| 259 | value="{{ old("youtube", $userProfile->youtube_link) }}">
|
---|
| 260 | </div>
|
---|
| 261 | </div>
|
---|
| 262 | </div>
|
---|
| 263 |
|
---|
| 264 | <div class="col-md-6 mt-3">
|
---|
| 265 | <div class="form-group">
|
---|
| 266 | <label class="form-label">Skype</label>
|
---|
| 267 | <div class="input-group">
|
---|
| 268 | <span class="input-group-prepend" id="basic-addon3">
|
---|
| 269 | <span class="input-group-text">@</span>
|
---|
| 270 | </span>
|
---|
| 271 | <input type="text" class="form-control" name="skype"
|
---|
| 272 | value="{{ old("skype", $userProfile->skype_link) }}">
|
---|
| 273 | </div>
|
---|
| 274 | </div>
|
---|
| 275 | </div>
|
---|
| 276 |
|
---|
| 277 | <div class="col-md-12">
|
---|
| 278 | <div class="form-group mb-0 float-right">
|
---|
| 279 | <input type="submit" value="Submit"
|
---|
| 280 | class="submitBtn btn btn-primary">
|
---|
| 281 | </div>
|
---|
| 282 | </div>
|
---|
| 283 |
|
---|
| 284 | </div>
|
---|
| 285 |
|
---|
| 286 | </fieldset>
|
---|
| 287 |
|
---|
| 288 | </form>
|
---|
| 289 |
|
---|
| 290 | </div>
|
---|
| 291 |
|
---|
| 292 | <div class="tab-pane fade" id="v-pills-profile" role="tabpanel"
|
---|
| 293 | aria-labelledby="v-pills-profile-tab">
|
---|
| 294 |
|
---|
| 295 | <form class="actionForm" action="{{ route("dashboard.settings.username") }}"
|
---|
| 296 | method="post" accept-charset="UTF-8">
|
---|
| 297 |
|
---|
| 298 | @method("patch")
|
---|
| 299 | @csrf
|
---|
| 300 |
|
---|
| 301 | <fieldset class="form-fieldset">
|
---|
| 302 |
|
---|
| 303 | <h4 class="font-weight-normal border-bottom pb-2">Username</h4>
|
---|
| 304 |
|
---|
| 305 | <h6 class="font-weight-normal text-muted">After changing your
|
---|
| 306 | username you will be logged out automatically.</h6>
|
---|
| 307 |
|
---|
| 308 | <div class="row">
|
---|
| 309 |
|
---|
| 310 |
|
---|
| 311 | <div class="col-md-6">
|
---|
| 312 | <div class="form-group">
|
---|
| 313 | <label class="form-label">Username</label>
|
---|
| 314 | <input type="text"
|
---|
| 315 | value="{{ old("username", $userProfile->user->username) }}"
|
---|
| 316 | name="username" class="form-control">
|
---|
| 317 | </div>
|
---|
| 318 | </div>
|
---|
| 319 |
|
---|
| 320 | <div class="col-md-12">
|
---|
| 321 | <div class="form-group mb-0 float-right">
|
---|
| 322 | <input type="submit" value="Submit"
|
---|
| 323 | class="submitBtn btn btn-primary">
|
---|
| 324 | </div>
|
---|
| 325 | </div>
|
---|
| 326 |
|
---|
| 327 | </div>
|
---|
| 328 |
|
---|
| 329 | </fieldset>
|
---|
| 330 |
|
---|
| 331 | </form>
|
---|
| 332 |
|
---|
| 333 | <form class="actionForm" action="{{ route("dashboard.settings.password") }}"
|
---|
| 334 | method="post" accept-charset="UTF-8">
|
---|
| 335 |
|
---|
| 336 | @method("patch")
|
---|
| 337 | @csrf
|
---|
| 338 |
|
---|
| 339 | <fieldset class="form-fieldset">
|
---|
| 340 |
|
---|
| 341 | <h4 class="font-weight-normal border-bottom pb-2">Password</h4>
|
---|
| 342 |
|
---|
| 343 | <h6 class="font-weight-normal text-muted">After changing your
|
---|
| 344 | password you will be logged out automatically.</h6>
|
---|
| 345 |
|
---|
| 346 | <div class="row">
|
---|
| 347 |
|
---|
| 348 | <div class="col-md-4">
|
---|
| 349 | <div class="form-group">
|
---|
| 350 | <label class="form-label">Current Password <span
|
---|
| 351 | class="form-required">*</span></label>
|
---|
| 352 | <input type="password" class="form-control"
|
---|
| 353 | name="current_password" autocomplete="off"
|
---|
| 354 | required>
|
---|
| 355 | </div>
|
---|
| 356 | </div>
|
---|
| 357 |
|
---|
| 358 | <div class="col-md-4">
|
---|
| 359 | <div class="form-group">
|
---|
| 360 | <label class="form-label">New Password <span
|
---|
| 361 | class="form-required">*</span></label>
|
---|
| 362 | <input type="password" class="form-control"
|
---|
| 363 | name="password" autocomplete="off" required>
|
---|
| 364 | </div>
|
---|
| 365 | </div>
|
---|
| 366 |
|
---|
| 367 | <div class="col-md-4">
|
---|
| 368 | <div class="form-group">
|
---|
| 369 | <label class="form-label">Repeat New Password <span
|
---|
| 370 | class="form-required">*</span></label>
|
---|
| 371 | <input type="password" class="form-control"
|
---|
| 372 | name="password_confirmation" autocomplete="off"
|
---|
| 373 | required>
|
---|
| 374 | </div>
|
---|
| 375 | </div>
|
---|
| 376 |
|
---|
| 377 | <div class="col-md-12">
|
---|
| 378 | <div class="form-group mb-0 float-right">
|
---|
| 379 | <input type="submit" value="Submit"
|
---|
| 380 | class="submitBtn btn btn-primary">
|
---|
| 381 | </div>
|
---|
| 382 | </div>
|
---|
| 383 |
|
---|
| 384 | </div>
|
---|
| 385 |
|
---|
| 386 | </fieldset>
|
---|
| 387 |
|
---|
| 388 | </form>
|
---|
| 389 |
|
---|
| 390 | <form class="actionForm" action="{{ route("dashboard.settings.email") }}"
|
---|
| 391 | method="post" accept-charset="UTF-8">
|
---|
| 392 |
|
---|
| 393 | @method("patch")
|
---|
| 394 | @csrf
|
---|
| 395 |
|
---|
| 396 | <fieldset class="form-fieldset">
|
---|
| 397 |
|
---|
| 398 | <h4 class="font-weight-normal border-bottom pb-2">E-mail</h4>
|
---|
| 399 |
|
---|
| 400 | <h6 class="font-weight-normal text-muted">This is where lost
|
---|
| 401 | password requests will be sent. After changing your e-mail you
|
---|
| 402 | will be logged out automatically.</h6>
|
---|
| 403 |
|
---|
| 404 | <div class="row">
|
---|
| 405 |
|
---|
| 406 | <div class="col-md-4">
|
---|
| 407 | <div class="form-group">
|
---|
| 408 | <label class="form-label">E-mail</label>
|
---|
| 409 | <input type="email"
|
---|
| 410 | value="{{ old("email", $userProfile->user->email) }}"
|
---|
| 411 | name="email" class="form-control">
|
---|
| 412 | </div>
|
---|
| 413 | </div>
|
---|
| 414 |
|
---|
| 415 | <div class="col-md-12">
|
---|
| 416 | <div class="form-group mb-0 float-right">
|
---|
| 417 | <input type="submit" value="Submit"
|
---|
| 418 | class="submitBtn btn btn-primary">
|
---|
| 419 | </div>
|
---|
| 420 | </div>
|
---|
| 421 |
|
---|
| 422 | </div>
|
---|
| 423 |
|
---|
| 424 | </fieldset>
|
---|
| 425 |
|
---|
| 426 | </form>
|
---|
| 427 |
|
---|
| 428 | <fieldset class="form-fieldset border-danger">
|
---|
| 429 | <h4 class="font-weight-normal border-bottom pb-2 text-danger">Danger
|
---|
| 430 | Zone</h4>
|
---|
| 431 | <h5 class="font-weight-normal text-danger">Before you delete your
|
---|
| 432 | account you need to choose any admin or editor to transfer your
|
---|
| 433 | posts. After that all informations related to your account will be
|
---|
| 434 | deleted permanently.</h5>
|
---|
| 435 | <a href="javascript:void(0)" data-from="{{ auth()->user()->id }}"
|
---|
| 436 | class="btn btn-danger transferPostsAndDelete mt-2">Delete account</a>
|
---|
| 437 | </fieldset>
|
---|
| 438 |
|
---|
| 439 | <div class="modal fade deleteUser" id="transferPosts" tabindex="-1"
|
---|
| 440 | role="dialog" aria-hidden="true">
|
---|
| 441 |
|
---|
| 442 | <div class="modal-dialog modal-dialog-centered" role="document">
|
---|
| 443 |
|
---|
| 444 | <div class="modal-content">
|
---|
| 445 |
|
---|
| 446 | <div class="modal-header">
|
---|
| 447 | <h5 class="modal-title" id="exampleModalLabel">Delete
|
---|
| 448 | Account</h5>
|
---|
| 449 | <button type="button" class="close" data-dismiss="modal"
|
---|
| 450 | aria-label="Close"></button>
|
---|
| 451 | </div>
|
---|
| 452 |
|
---|
| 453 | <div class="modal-body">
|
---|
| 454 |
|
---|
| 455 | <form id="transferPosts"
|
---|
| 456 | action="{{ route("dashboard.settings.transfer") }}"
|
---|
| 457 | method="post">
|
---|
| 458 |
|
---|
| 459 | @csrf
|
---|
| 460 |
|
---|
| 461 | @if (auth()->user()->post->count() > 0)
|
---|
| 462 | <div class="form-group">
|
---|
| 463 | <label class="form-label">Transfer your posts to
|
---|
| 464 | any admin or editor</label>
|
---|
| 465 | <select class="selectData"
|
---|
| 466 | id="selectWithContent" name="to">
|
---|
| 467 | @foreach ($adminAndEditors as $user)
|
---|
| 468 | <option value="{{ $user->id }}"
|
---|
| 469 | {{ (old("to") == $user->id) ? "selected" : "" }} data-data='{"image": "/uploads/users/{{ $user->userProfile->profile_photo_link }}"}'>{{ $user->getFullName() }}</option>
|
---|
| 470 | @endforeach
|
---|
| 471 | </select>
|
---|
| 472 | </div>
|
---|
| 473 | @endif
|
---|
| 474 |
|
---|
| 475 | <input type="hidden" name="from" value="">
|
---|
| 476 |
|
---|
| 477 | <div class="form-group">
|
---|
| 478 | <label class="form-label">Confirm Password</label>
|
---|
| 479 | <input type="password" class="form-control"
|
---|
| 480 | name="password" autocomplete="off" required>
|
---|
| 481 | </div>
|
---|
| 482 |
|
---|
| 483 | <div class="modal-footer pb-0">
|
---|
| 484 | <button type="button" class="btn btn-secondary"
|
---|
| 485 | data-dismiss="modal">Close
|
---|
| 486 | </button>
|
---|
| 487 | <input type="submit" class="btn btn-danger"
|
---|
| 488 | value="Delete">
|
---|
| 489 | </div>
|
---|
| 490 |
|
---|
| 491 | </form>
|
---|
| 492 |
|
---|
| 493 | </div>
|
---|
| 494 |
|
---|
| 495 | </div>
|
---|
| 496 |
|
---|
| 497 | </div>
|
---|
| 498 |
|
---|
| 499 | </div>
|
---|
| 500 | </div>
|
---|
[d25ba66] | 501 |
|
---|
| 502 | @if (auth()->user()->hasPermission("access_all_phases"))
|
---|
| 503 | <div class="tab-pane fade" id="v-pills-phases" role="tabpanel"
|
---|
| 504 | aria-labelledby="v-pills-phases-tab">
|
---|
| 505 |
|
---|
| 506 | <fieldset class="form-fieldset">
|
---|
| 507 |
|
---|
| 508 | <h4 class="font-weight-normal border-bottom pb-4">
|
---|
| 509 | Phases
|
---|
| 510 | <span class="triggerPhaseModal float-right mb-2 d-inline-block btn btn-sm btn-primary">Create New</span>
|
---|
| 511 | </h4>
|
---|
| 512 |
|
---|
| 513 | <div class="modal fade phaseModal" tabindex="-1" role="dialog" aria-hidden="true">
|
---|
| 514 |
|
---|
| 515 | <div class="modal-dialog modal-dialog-centered" role="document">
|
---|
| 516 |
|
---|
| 517 | <div class="modal-content">
|
---|
| 518 |
|
---|
| 519 | <div class="modal-header">
|
---|
| 520 | <h5 class="modal-title" id="exampleModalLabel">Create new phase</h5>
|
---|
| 521 | <button type="button" class="close" data-dismiss="modal" aria-label="Close"></button>
|
---|
| 522 | </div>
|
---|
| 523 |
|
---|
| 524 | <div class="modal-body">
|
---|
| 525 |
|
---|
| 526 | <form action="{{ route("dashboard.settings.phase.store") }}"
|
---|
| 527 | method="post">
|
---|
| 528 | @csrf
|
---|
| 529 |
|
---|
| 530 | <input type="hidden" name="phase_id">
|
---|
| 531 |
|
---|
| 532 | <label class="form-label">Name</label>
|
---|
| 533 | <input type="text" class="form-control"
|
---|
| 534 | name="name" autocomplete="off" required>
|
---|
| 535 |
|
---|
| 536 | <label class="form-label mt-2">User role to review</label>
|
---|
| 537 | <select class="selectData" name="reviewer_role_id">
|
---|
| 538 | <option value=""></option>
|
---|
| 539 | @foreach ($userRoles as $userRole)
|
---|
| 540 | <option
|
---|
| 541 | value="{{ $userRole->id }}"
|
---|
| 542 | {{ (old("reviewer_role_id") == $userRole->id) ? "selected" : "" }}
|
---|
| 543 | >
|
---|
| 544 | {{ ucfirst($userRole->name) }}
|
---|
| 545 | </option>
|
---|
| 546 | @endforeach
|
---|
| 547 | </select>
|
---|
| 548 |
|
---|
| 549 | <div class="modal-footer pb-0">
|
---|
| 550 | <button type="button" class="btn btn-secondary"
|
---|
| 551 | data-dismiss="modal">Close
|
---|
| 552 | </button>
|
---|
| 553 | <input type="submit" class="btn btn-primary"
|
---|
| 554 | value="Submit">
|
---|
| 555 | </div>
|
---|
| 556 |
|
---|
| 557 | </form>
|
---|
| 558 |
|
---|
| 559 | </div>
|
---|
| 560 |
|
---|
| 561 | </div>
|
---|
| 562 |
|
---|
| 563 | </div>
|
---|
| 564 |
|
---|
| 565 | </div>
|
---|
| 566 |
|
---|
| 567 | <table id="dttable" class="table table-hover table-outline table-vcenter text-nowrap card-table">
|
---|
| 568 | <thead>
|
---|
| 569 | <tr>
|
---|
| 570 | <th>Name</th>
|
---|
| 571 | <th>Reviewer</th>
|
---|
| 572 | <th>Actions</th>
|
---|
| 573 | </tr>
|
---|
| 574 | </thead>
|
---|
| 575 | <tbody>
|
---|
| 576 | @foreach($phases as $phase)
|
---|
| 577 | <tr>
|
---|
| 578 | <td>{{ $phase->name }}</td>
|
---|
| 579 | <td>{{ ucfirst($phase->reviewer->name) }}</td>
|
---|
| 580 | <td class="text-center">
|
---|
| 581 | <div class="item-action dropdown">
|
---|
| 582 | <a href="javascript:void(0)" data-toggle="dropdown" class="icon" aria-expanded="false"><i class="fe fe-more-vertical"></i></a>
|
---|
| 583 | <div class="dropdown-menu dropdown-menu-right" x-placement="bottom-end" style="position: absolute; transform: translate3d(15px, 20px, 0px); top: 0px; left: 0px; will-change: transform;">
|
---|
| 584 | <a href="javascript:void(0)" data-phase-id="{{ $phase->id }}" data-phase-name="{{ $phase->name }}" data-phase-reviewer="{{ $phase->reviewer->id }}" class="triggerPhaseModal dropdown-item"><i class="dropdown-icon fe fe-edit"></i> Edit</a>
|
---|
| 585 | <a href="javascript:void(0)" class="actionLink dropdown-item" style="cursor: pointer;" data-action="{{ route("dashboard.settings.phase.destroy", ["id" => $phase->id]) }}" data-method="delete"><i class="dropdown-icon fe fe-trash-2 text-danger"></i> Delete </a>
|
---|
| 586 | </div>
|
---|
| 587 | </div>
|
---|
| 588 | </td>
|
---|
| 589 | </tr>
|
---|
| 590 | @endforeach
|
---|
| 591 | </tbody>
|
---|
| 592 | </table>
|
---|
| 593 |
|
---|
| 594 | </fieldset>
|
---|
| 595 | </div>
|
---|
| 596 | @endif
|
---|
| 597 |
|
---|
| 598 | @if(auth()->user()->hasPermission("access_all_post_securities"))
|
---|
[0c07a90] | 599 | <div class="tab-pane fade" id="v-pills-post-security" role="tabpanel"
|
---|
[d25ba66] | 600 | aria-labelledby="v-pills-post-security-tab">
|
---|
| 601 | <fieldset class="form-fieldset">
|
---|
| 602 |
|
---|
| 603 | <h4 class="font-weight-normal border-bottom pb-4">
|
---|
| 604 | Post security
|
---|
| 605 | <span class="triggerPostSecurityModal float-right mb-2 d-inline-block btn btn-sm btn-primary">Create New</span>
|
---|
| 606 | </h4>
|
---|
| 607 |
|
---|
| 608 | <div class="modal fade postSecurityModal" tabindex="-1" role="dialog" aria-hidden="true">
|
---|
| 609 |
|
---|
| 610 | <div class="modal-dialog modal-dialog-centered" role="document">
|
---|
| 611 |
|
---|
| 612 | <div class="modal-content">
|
---|
| 613 |
|
---|
| 614 | <div class="modal-header">
|
---|
| 615 | <h5 class="modal-title" id="exampleModalLabel">Create new post security</h5>
|
---|
| 616 | <button type="button" class="close" data-dismiss="modal" aria-label="Close"></button>
|
---|
| 617 | </div>
|
---|
| 618 |
|
---|
| 619 | <div class="modal-body">
|
---|
| 620 |
|
---|
| 621 | <form class="postSecurityStore"
|
---|
| 622 | action="{{ route("dashboard.settings.post-security.store") }}"
|
---|
| 623 | method="post">
|
---|
| 624 | @csrf
|
---|
| 625 |
|
---|
| 626 | <input type="hidden" name="post_security_id">
|
---|
| 627 |
|
---|
| 628 | <label class="form-label">User role to be reviewed</label>
|
---|
| 629 | <select class="selectData" name="role_id_to_be_reviewed">
|
---|
| 630 | <option value=""></option>
|
---|
| 631 | @foreach ($userRoles as $userRole)
|
---|
| 632 | <option
|
---|
| 633 | value="{{ $userRole->id }}"
|
---|
| 634 | {{ (old("role_id_to_be_reviewed") == $userRole->id) ? "selected" : "" }}
|
---|
| 635 | >
|
---|
| 636 | {{ ucfirst($userRole->name) }}
|
---|
| 637 | </option>
|
---|
| 638 | @endforeach
|
---|
| 639 | </select>
|
---|
| 640 |
|
---|
| 641 | <label class="form-label mt-2">Select phases</label>
|
---|
| 642 | <select class="phasesSelect" multiple>
|
---|
| 643 | <option value=""></option>
|
---|
| 644 | @foreach ($phases as $phase)
|
---|
| 645 | <option
|
---|
| 646 | value="{{ $phase->id }}">
|
---|
| 647 | {{ $phase->name }}
|
---|
| 648 | </option>
|
---|
| 649 | @endforeach
|
---|
| 650 | </select>
|
---|
| 651 | <input type="hidden" name="phase_ids">
|
---|
| 652 |
|
---|
| 653 | <div class="modal-footer pb-0">
|
---|
| 654 | <button type="button" class="btn btn-secondary"
|
---|
| 655 | data-dismiss="modal">Close
|
---|
| 656 | </button>
|
---|
| 657 | <input type="submit" class="btn btn-primary"
|
---|
| 658 | value="Submit">
|
---|
| 659 | </div>
|
---|
| 660 |
|
---|
| 661 | </form>
|
---|
| 662 |
|
---|
| 663 | </div>
|
---|
| 664 |
|
---|
| 665 | </div>
|
---|
| 666 |
|
---|
| 667 | </div>
|
---|
| 668 |
|
---|
| 669 | </div>
|
---|
| 670 |
|
---|
| 671 | <table id="dttable" class="dttable table table-hover table-outline table-vcenter text-nowrap card-table">
|
---|
| 672 | <thead>
|
---|
| 673 | <tr>
|
---|
| 674 | <th>To be reviewed</th>
|
---|
| 675 | <th>Phases</th>
|
---|
| 676 | <th>Actions</th>
|
---|
| 677 | </tr>
|
---|
| 678 | </thead>
|
---|
| 679 | <tbody>
|
---|
| 680 | @foreach($postSecurities as $postSecurity)
|
---|
| 681 | <tr>
|
---|
| 682 | <td>{{ ucfirst($postSecurity->role->name) }}</td>
|
---|
| 683 | <td>{{ $postSecurity->phase_names }}</td>
|
---|
| 684 | <td class="text-center">
|
---|
| 685 | <div class="item-action dropdown">
|
---|
| 686 | <a href="javascript:void(0)" data-toggle="dropdown" class="icon" aria-expanded="false"><i class="fe fe-more-vertical"></i></a>
|
---|
| 687 | <div class="dropdown-menu dropdown-menu-right" x-placement="bottom-end" style="position: absolute; transform: translate3d(15px, 20px, 0px); top: 0px; left: 0px; will-change: transform;">
|
---|
| 688 | <a href="javascript:void(0)" data-post-security-id="{{ $postSecurity->id }}" data-post-security-role="{{ $postSecurity->role->id }}" data-post-security-phase-ids="{{ $postSecurity->phase_ids }}" class="triggerPostSecurityModal dropdown-item"><i class="dropdown-icon fe fe-edit"></i> Edit</a>
|
---|
| 689 | <a href="javascript:void(0)" class="actionLink dropdown-item" style="cursor: pointer;" data-action="{{ route("dashboard.settings.post-security.destroy", ["id" => $phase->id]) }}" data-method="delete"><i class="dropdown-icon fe fe-trash-2 text-danger"></i> Delete </a>
|
---|
| 690 | </div>
|
---|
| 691 | </div>
|
---|
| 692 | </td>
|
---|
| 693 | </tr>
|
---|
| 694 | @endforeach
|
---|
| 695 | </tbody>
|
---|
| 696 | </table>
|
---|
| 697 |
|
---|
| 698 | </fieldset>
|
---|
| 699 | </div>
|
---|
| 700 | @endif
|
---|
[0924b6c] | 701 | </div>
|
---|
| 702 | </div>
|
---|
| 703 | </div>
|
---|
| 704 |
|
---|
| 705 | </div>
|
---|
| 706 |
|
---|
| 707 | </div>
|
---|
| 708 |
|
---|
| 709 | </div>
|
---|
| 710 |
|
---|
| 711 | </div>
|
---|
| 712 |
|
---|
| 713 | </div>
|
---|
| 714 |
|
---|
| 715 | </div>
|
---|
| 716 |
|
---|
| 717 | @endsection
|
---|