From 87830632ce00c24b33727e3e253348569c5889b3 Mon Sep 17 00:00:00 2001 From: TorstenS Date: Tue, 22 Sep 2020 15:40:12 +0200 Subject: [PATCH] Working on member edit --- .../app/Http/Controllers/UserController.php | 23 ++- motorradig2/motorradig/config/app.php | 2 +- motorradig2/motorradig/public/css/app.css | 174 +++++++++--------- .../resources/sass/custom_bootstrap.scss | 2 +- .../resources/views/layouts/app.blade.php | 2 +- .../views/{ => users}/become_member.blade.php | 0 .../edit.blade.php} | 21 ++- .../index.blade.php} | 8 +- .../resources/views/users/show.blade.php | 43 +++++ motorradig2/motorradig/routes/web.php | 8 +- 10 files changed, 173 insertions(+), 110 deletions(-) rename motorradig2/motorradig/resources/views/{ => users}/become_member.blade.php (100%) rename motorradig2/motorradig/resources/views/{member_show.blade.php => users/edit.blade.php} (73%) rename motorradig2/motorradig/resources/views/{memberlist.blade.php => users/index.blade.php} (75%) create mode 100644 motorradig2/motorradig/resources/views/users/show.blade.php diff --git a/motorradig2/motorradig/app/Http/Controllers/UserController.php b/motorradig2/motorradig/app/Http/Controllers/UserController.php index a3d91c4..57002de 100644 --- a/motorradig2/motorradig/app/Http/Controllers/UserController.php +++ b/motorradig2/motorradig/app/Http/Controllers/UserController.php @@ -4,6 +4,7 @@ namespace App\Http\Controllers; use App\User; use Illuminate\Http\Request; +use Log; class UserController extends Controller { @@ -15,7 +16,7 @@ class UserController extends Controller public function index() { $users=User::all(); - return view('memberlist', compact('users')); + return view('users.index')->with('users',$users); } /** @@ -45,10 +46,16 @@ class UserController extends Controller * @param \App\User $user * @return \Illuminate\Http\Response */ - public function show($user_id) + public function show($id) { - $user=User::find($user_id); - return view('member_show',compact('user')); + //Log("show user id=".$id); + error_log("(show)=>".$id); + + $user=User::find($id); + + + return view('users.show')->with('user',$user); + } /** @@ -57,9 +64,13 @@ class UserController extends Controller * @param \App\User $user * @return \Illuminate\Http\Response */ - public function edit(User $user) + public function edit($id) { - // + error_log("Edit:".$id); + $user=User::find($id); + + error_log($user); + return view('users.edit')->with('user',$user); } /** diff --git a/motorradig2/motorradig/config/app.php b/motorradig2/motorradig/config/app.php index 8409e00..6309bdc 100644 --- a/motorradig2/motorradig/config/app.php +++ b/motorradig2/motorradig/config/app.php @@ -67,7 +67,7 @@ return [ | */ - 'timezone' => 'UTC', + 'timezone' => 'Europe/Berlin', /* |-------------------------------------------------------------------------- diff --git a/motorradig2/motorradig/public/css/app.css b/motorradig2/motorradig/public/css/app.css index 8b11e88..b83d39f 100644 --- a/motorradig2/motorradig/public/css/app.css +++ b/motorradig2/motorradig/public/css/app.css @@ -4597,7 +4597,7 @@ readers do not read off random characters that represent icons */ --white: #fff; --gray: #6c757d; --gray-dark: #343a40; - --primary: #3490dc; + --primary: #343a40; --secondary: #6c757d; --success: #38c172; --info: #6cb2eb; @@ -4746,13 +4746,13 @@ sup { } a { - color: #3490dc; + color: #343a40; text-decoration: none; background-color: transparent; } a:hover { - color: #1d68a7; + color: #121416; text-decoration: underline; } @@ -6404,23 +6404,23 @@ pre code { .table-primary, .table-primary > th, .table-primary > td { - background-color: #c6e0f5; + background-color: #c6c8ca; } .table-primary th, .table-primary td, .table-primary thead th, .table-primary tbody + tbody { - border-color: #95c5ed; + border-color: #95999c; } .table-hover .table-primary:hover { - background-color: #b0d4f1; + background-color: #b9bbbe; } .table-hover .table-primary:hover > td, .table-hover .table-primary:hover > th { - background-color: #b0d4f1; + background-color: #b9bbbe; } .table-secondary, @@ -6726,9 +6726,9 @@ pre code { .form-control:focus { color: #495057; background-color: #fff; - border-color: #a1cbef; + border-color: #6d7a86; outline: 0; - box-shadow: 0 0 0 0.2rem rgba(52, 144, 220, 0.25); + box-shadow: 0 0 0 0.2rem rgba(52, 58, 64, 0.25); } .form-control::-moz-placeholder { @@ -7230,7 +7230,7 @@ textarea.form-control.is-invalid { .btn:focus, .btn.focus { outline: 0; - box-shadow: 0 0 0 0.2rem rgba(52, 144, 220, 0.25); + box-shadow: 0 0 0 0.2rem rgba(52, 58, 64, 0.25); } .btn.disabled, @@ -7249,43 +7249,43 @@ fieldset:disabled a.btn { .btn-primary { color: #fff; - background-color: #3490dc; - border-color: #3490dc; + background-color: #343a40; + border-color: #343a40; } .btn-primary:hover { color: #fff; - background-color: #227dc7; - border-color: #2176bd; + background-color: #23272b; + border-color: #1d2124; } .btn-primary:focus, .btn-primary.focus { color: #fff; - background-color: #227dc7; - border-color: #2176bd; - box-shadow: 0 0 0 0.2rem rgba(82, 161, 225, 0.5); + background-color: #23272b; + border-color: #1d2124; + box-shadow: 0 0 0 0.2rem rgba(82, 88, 93, 0.5); } .btn-primary.disabled, .btn-primary:disabled { color: #fff; - background-color: #3490dc; - border-color: #3490dc; + background-color: #343a40; + border-color: #343a40; } .btn-primary:not(:disabled):not(.disabled):active, .btn-primary:not(:disabled):not(.disabled).active, .show > .btn-primary.dropdown-toggle { color: #fff; - background-color: #2176bd; - border-color: #1f6fb2; + background-color: #1d2124; + border-color: #171a1d; } .btn-primary:not(:disabled):not(.disabled):active:focus, .btn-primary:not(:disabled):not(.disabled).active:focus, .show > .btn-primary.dropdown-toggle:focus { - box-shadow: 0 0 0 0.2rem rgba(82, 161, 225, 0.5); + box-shadow: 0 0 0 0.2rem rgba(82, 88, 93, 0.5); } .btn-secondary { @@ -7576,24 +7576,24 @@ fieldset:disabled a.btn { } .btn-outline-primary { - color: #3490dc; - border-color: #3490dc; + color: #343a40; + border-color: #343a40; } .btn-outline-primary:hover { color: #fff; - background-color: #3490dc; - border-color: #3490dc; + background-color: #343a40; + border-color: #343a40; } .btn-outline-primary:focus, .btn-outline-primary.focus { - box-shadow: 0 0 0 0.2rem rgba(52, 144, 220, 0.5); + box-shadow: 0 0 0 0.2rem rgba(52, 58, 64, 0.5); } .btn-outline-primary.disabled, .btn-outline-primary:disabled { - color: #3490dc; + color: #343a40; background-color: transparent; } @@ -7601,14 +7601,14 @@ fieldset:disabled a.btn { .btn-outline-primary:not(:disabled):not(.disabled).active, .show > .btn-outline-primary.dropdown-toggle { color: #fff; - background-color: #3490dc; - border-color: #3490dc; + background-color: #343a40; + border-color: #343a40; } .btn-outline-primary:not(:disabled):not(.disabled):active:focus, .btn-outline-primary:not(:disabled):not(.disabled).active:focus, .show > .btn-outline-primary.dropdown-toggle:focus { - box-shadow: 0 0 0 0.2rem rgba(52, 144, 220, 0.5); + box-shadow: 0 0 0 0.2rem rgba(52, 58, 64, 0.5); } .btn-outline-secondary { @@ -7865,12 +7865,12 @@ fieldset:disabled a.btn { .btn-link { font-weight: 400; - color: #3490dc; + color: #343a40; text-decoration: none; } .btn-link:hover { - color: #1d68a7; + color: #121416; text-decoration: underline; } @@ -8176,7 +8176,7 @@ input[type=button].btn-block { .dropdown-item:active { color: #fff; text-decoration: none; - background-color: #3490dc; + background-color: #343a40; } .dropdown-item.disabled, @@ -8539,22 +8539,22 @@ input[type=button].btn-block { .custom-control-input:checked ~ .custom-control-label::before { color: #fff; - border-color: #3490dc; - background-color: #3490dc; + border-color: #343a40; + background-color: #343a40; } .custom-control-input:focus ~ .custom-control-label::before { - box-shadow: 0 0 0 0.2rem rgba(52, 144, 220, 0.25); + box-shadow: 0 0 0 0.2rem rgba(52, 58, 64, 0.25); } .custom-control-input:focus:not(:checked) ~ .custom-control-label::before { - border-color: #a1cbef; + border-color: #6d7a86; } .custom-control-input:not(:disabled):active ~ .custom-control-label::before { color: #fff; - background-color: #cce3f6; - border-color: #cce3f6; + background-color: #88939e; + border-color: #88939e; } .custom-control-input[disabled] ~ .custom-control-label, @@ -8606,8 +8606,8 @@ input[type=button].btn-block { } .custom-checkbox .custom-control-input:indeterminate ~ .custom-control-label::before { - border-color: #3490dc; - background-color: #3490dc; + border-color: #343a40; + background-color: #343a40; } .custom-checkbox .custom-control-input:indeterminate ~ .custom-control-label::after { @@ -8615,11 +8615,11 @@ input[type=button].btn-block { } .custom-checkbox .custom-control-input:disabled:checked ~ .custom-control-label::before { - background-color: rgba(52, 144, 220, 0.5); + background-color: rgba(52, 58, 64, 0.5); } .custom-checkbox .custom-control-input:disabled:indeterminate ~ .custom-control-label::before { - background-color: rgba(52, 144, 220, 0.5); + background-color: rgba(52, 58, 64, 0.5); } .custom-radio .custom-control-label::before { @@ -8631,7 +8631,7 @@ input[type=button].btn-block { } .custom-radio .custom-control-input:disabled:checked ~ .custom-control-label::before { - background-color: rgba(52, 144, 220, 0.5); + background-color: rgba(52, 58, 64, 0.5); } .custom-switch { @@ -8667,7 +8667,7 @@ input[type=button].btn-block { } .custom-switch .custom-control-input:disabled:checked ~ .custom-control-label::before { - background-color: rgba(52, 144, 220, 0.5); + background-color: rgba(52, 58, 64, 0.5); } .custom-select { @@ -8689,9 +8689,9 @@ input[type=button].btn-block { } .custom-select:focus { - border-color: #a1cbef; + border-color: #6d7a86; outline: 0; - box-shadow: 0 0 0 0.2rem rgba(52, 144, 220, 0.25); + box-shadow: 0 0 0 0.2rem rgba(52, 58, 64, 0.25); } .custom-select:focus::-ms-value { @@ -8754,8 +8754,8 @@ input[type=button].btn-block { } .custom-file-input:focus ~ .custom-file-label { - border-color: #a1cbef; - box-shadow: 0 0 0 0.2rem rgba(52, 144, 220, 0.25); + border-color: #6d7a86; + box-shadow: 0 0 0 0.2rem rgba(52, 58, 64, 0.25); } .custom-file-input[disabled] ~ .custom-file-label, @@ -8819,15 +8819,15 @@ input[type=button].btn-block { } .custom-range:focus::-webkit-slider-thumb { - box-shadow: 0 0 0 1px #f8fafc, 0 0 0 0.2rem rgba(52, 144, 220, 0.25); + box-shadow: 0 0 0 1px #f8fafc, 0 0 0 0.2rem rgba(52, 58, 64, 0.25); } .custom-range:focus::-moz-range-thumb { - box-shadow: 0 0 0 1px #f8fafc, 0 0 0 0.2rem rgba(52, 144, 220, 0.25); + box-shadow: 0 0 0 1px #f8fafc, 0 0 0 0.2rem rgba(52, 58, 64, 0.25); } .custom-range:focus::-ms-thumb { - box-shadow: 0 0 0 1px #f8fafc, 0 0 0 0.2rem rgba(52, 144, 220, 0.25); + box-shadow: 0 0 0 1px #f8fafc, 0 0 0 0.2rem rgba(52, 58, 64, 0.25); } .custom-range::-moz-focus-outer { @@ -8838,7 +8838,7 @@ input[type=button].btn-block { width: 1rem; height: 1rem; margin-top: -0.25rem; - background-color: #3490dc; + background-color: #343a40; border: 0; border-radius: 1rem; -webkit-transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; @@ -8855,7 +8855,7 @@ input[type=button].btn-block { } .custom-range::-webkit-slider-thumb:active { - background-color: #cce3f6; + background-color: #88939e; } .custom-range::-webkit-slider-runnable-track { @@ -8871,7 +8871,7 @@ input[type=button].btn-block { .custom-range::-moz-range-thumb { width: 1rem; height: 1rem; - background-color: #3490dc; + background-color: #343a40; border: 0; border-radius: 1rem; -moz-transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; @@ -8888,7 +8888,7 @@ input[type=button].btn-block { } .custom-range::-moz-range-thumb:active { - background-color: #cce3f6; + background-color: #88939e; } .custom-range::-moz-range-track { @@ -8907,7 +8907,7 @@ input[type=button].btn-block { margin-top: 0; margin-right: 0.2rem; margin-left: 0.2rem; - background-color: #3490dc; + background-color: #343a40; border: 0; border-radius: 1rem; -ms-transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; @@ -8923,7 +8923,7 @@ input[type=button].btn-block { } .custom-range::-ms-thumb:active { - background-color: #cce3f6; + background-color: #88939e; } .custom-range::-ms-track { @@ -9050,7 +9050,7 @@ input[type=button].btn-block { .nav-pills .nav-link.active, .nav-pills .show > .nav-link { color: #fff; - background-color: #3490dc; + background-color: #343a40; } .nav-fill > .nav-link, @@ -9805,14 +9805,14 @@ input[type=button].btn-block { padding: 0.5rem 0.75rem; margin-left: -1px; line-height: 1.25; - color: #3490dc; + color: #343a40; background-color: #fff; border: 1px solid #dee2e6; } .page-link:hover { z-index: 2; - color: #1d68a7; + color: #121416; text-decoration: none; background-color: #e9ecef; border-color: #dee2e6; @@ -9821,7 +9821,7 @@ input[type=button].btn-block { .page-link:focus { z-index: 3; outline: 0; - box-shadow: 0 0 0 0.2rem rgba(52, 144, 220, 0.25); + box-shadow: 0 0 0 0.2rem rgba(52, 58, 64, 0.25); } .page-item:first-child .page-link { @@ -9838,8 +9838,8 @@ input[type=button].btn-block { .page-item.active .page-link { z-index: 3; color: #fff; - background-color: #3490dc; - border-color: #3490dc; + background-color: #343a40; + border-color: #343a40; } .page-item.disabled .page-link { @@ -9923,19 +9923,19 @@ a.badge:focus { .badge-primary { color: #fff; - background-color: #3490dc; + background-color: #343a40; } a.badge-primary:hover, a.badge-primary:focus { color: #fff; - background-color: #2176bd; + background-color: #1d2124; } a.badge-primary:focus, a.badge-primary.focus { outline: 0; - box-shadow: 0 0 0 0.2rem rgba(52, 144, 220, 0.5); + box-shadow: 0 0 0 0.2rem rgba(52, 58, 64, 0.5); } .badge-secondary { @@ -10105,17 +10105,17 @@ a.badge-dark.focus { } .alert-primary { - color: #1b4b72; - background-color: #d6e9f8; - border-color: #c6e0f5; + color: #1b1e21; + background-color: #d6d8d9; + border-color: #c6c8ca; } .alert-primary hr { - border-top-color: #b0d4f1; + border-top-color: #b9bbbe; } .alert-primary .alert-link { - color: #113049; + color: #040505; } .alert-secondary { @@ -10254,7 +10254,7 @@ a.badge-dark.focus { color: #fff; text-align: center; white-space: nowrap; - background-color: #3490dc; + background-color: #343a40; transition: width 0.6s ease; } @@ -10345,8 +10345,8 @@ a.badge-dark.focus { .list-group-item.active { z-index: 2; color: #fff; - background-color: #3490dc; - border-color: #3490dc; + background-color: #343a40; + border-color: #343a40; } .list-group-item + .list-group-item { @@ -10519,20 +10519,20 @@ a.badge-dark.focus { } .list-group-item-primary { - color: #1b4b72; - background-color: #c6e0f5; + color: #1b1e21; + background-color: #c6c8ca; } .list-group-item-primary.list-group-item-action:hover, .list-group-item-primary.list-group-item-action:focus { - color: #1b4b72; - background-color: #b0d4f1; + color: #1b1e21; + background-color: #b9bbbe; } .list-group-item-primary.list-group-item-action.active { color: #fff; - background-color: #1b4b72; - border-color: #1b4b72; + background-color: #1b1e21; + border-color: #1b1e21; } .list-group-item-secondary { @@ -11533,14 +11533,14 @@ a.close.disabled { } .bg-primary { - background-color: #3490dc !important; + background-color: #343a40 !important; } a.bg-primary:hover, a.bg-primary:focus, button.bg-primary:hover, button.bg-primary:focus { - background-color: #2176bd !important; + background-color: #1d2124 !important; } .bg-secondary { @@ -11669,7 +11669,7 @@ button.bg-dark:focus { } .border-primary { - border-color: #3490dc !important; + border-color: #343a40 !important; } .border-secondary { @@ -15267,12 +15267,12 @@ button.bg-dark:focus { } .text-primary { - color: #3490dc !important; + color: #343a40 !important; } a.text-primary:hover, a.text-primary:focus { - color: #1d68a7 !important; + color: #121416 !important; } .text-secondary { diff --git a/motorradig2/motorradig/resources/sass/custom_bootstrap.scss b/motorradig2/motorradig/resources/sass/custom_bootstrap.scss index 9526370..f3572cf 100644 --- a/motorradig2/motorradig/resources/sass/custom_bootstrap.scss +++ b/motorradig2/motorradig/resources/sass/custom_bootstrap.scss @@ -1,4 +1,4 @@ $theme-colors: ( - /*"primary": #000, */ + "primary": #343a40, "danger": #ff4136 ); diff --git a/motorradig2/motorradig/resources/views/layouts/app.blade.php b/motorradig2/motorradig/resources/views/layouts/app.blade.php index 66fb7ae..3f63587 100644 --- a/motorradig2/motorradig/resources/views/layouts/app.blade.php +++ b/motorradig2/motorradig/resources/views/layouts/app.blade.php @@ -51,7 +51,7 @@ @auth @if(Auth::user()->role !='GUEST')