diff --git a/skolehjem/app/Http/Controllers/EventController.php b/skolehjem/app/Http/Controllers/EventController.php index ad1cdba..e33d73b 100644 --- a/skolehjem/app/Http/Controllers/EventController.php +++ b/skolehjem/app/Http/Controllers/EventController.php @@ -90,7 +90,8 @@ class EventController extends Controller $news->type_id = '3'; $news->content = $event->description; $news->resource_id = $event->resource_id; - $news->save(); + + NewsController::storeAndGet($news); } return redirect()->route('events.index', ['events' => $events]); @@ -189,7 +190,8 @@ class EventController extends Controller ' $event->id ]) .'">Læs mere'. ' $event->id ]) .'">Se deltagere'. ''; - $news->save(); + + NewsController::storeAndGet($news); } return redirect()->route("events.index", ['events' => $events]); diff --git a/skolehjem/app/Http/Controllers/FeedbackController.php b/skolehjem/app/Http/Controllers/FeedbackController.php index 5bd25bc..83c6157 100644 --- a/skolehjem/app/Http/Controllers/FeedbackController.php +++ b/skolehjem/app/Http/Controllers/FeedbackController.php @@ -125,7 +125,7 @@ class FeedbackController extends Controller $feedback = Feedbacks::find($id); $feedback->delete(); - return Response::detect("feedbacks.destroy"); + return redirect()->route("feedbacks.index"); } diff --git a/skolehjem/app/Http/Controllers/GuideController.php b/skolehjem/app/Http/Controllers/GuideController.php index 49692a0..4bbb669 100644 --- a/skolehjem/app/Http/Controllers/GuideController.php +++ b/skolehjem/app/Http/Controllers/GuideController.php @@ -10,8 +10,6 @@ use tidy; class GuideController extends Controller { - - public function __construct() { $this->middleware([ "auth" ]); @@ -63,30 +61,33 @@ class GuideController extends Controller "guide_articles" => "required", ]); - $guide = new Guide($requestGuide); + if($request->file("resource")) { $guide->resource_id = ResourceController::store($request)->id; } + $saved = $guide->save(); - if(!$saved){ + if(!$saved) { return redirect()->route("guides.store"); - }else{ + } else { $guides = Guide::query()->paginate($request->input("limit", 20)); if($request->newsoption == true){ $news = new News(); - $news->name = "Ny Vejledning"; + $news->name = "Ny vejledning"; $news->subname = $guide->name; $news->arrangement_id = $guide->id; $news->type_id = '4'; $news->content = $guide->guide_articles; - $news->resource_id = $guide->resource_id; - $news->save(); + if($guide->resource_id !== null) + $news->resource_id = $guide->resource_id; + + NewsController::storeAndGet($news); } return redirect()->route("guides.index", ['guides' => $guides]); @@ -137,7 +138,7 @@ class GuideController extends Controller if(!$saved){ return redirect()->route("guides.update", [ "guide" => $guide ]); }else{ - $guide = Guide::query()->paginate($request->input("limit", 20)); + $guides = Guide::query()->paginate($request->input("limit", 20)); if($request->newsoption == true){ $news = new News(); @@ -149,10 +150,10 @@ class GuideController extends Controller $news->content = $this->closetags(substr($guidee->guide_articles, 0, 300)). '
$guide]). '" class="sde-blue ">Læs mere'; - $news->save(); + NewsController::storeAndGet($news); } - return redirect()->route("guides.index", ['guides' => $guide]); + return redirect()->route("guides.index", ['guides' => $guides]); } } diff --git a/skolehjem/app/Http/Controllers/MenuPlanController.php b/skolehjem/app/Http/Controllers/MenuPlanController.php index 165eac5..e41614b 100644 --- a/skolehjem/app/Http/Controllers/MenuPlanController.php +++ b/skolehjem/app/Http/Controllers/MenuPlanController.php @@ -79,15 +79,15 @@ class MenuPlanController extends Controller $news->name = "Ny menuplan"; $news->subname = "Uge " . $menuPlan->week; - $news->arrangement_id = $menuPlan->id; - $news->type_id = '2'; $news->content = $menuPlan->menu; + $news->type_id = '2'; + $news->arrangement_id = $menuPlan->id; if($request->file("resource")) { $news->resource_id = ResourceController::store($request)->id; } - $news->save(); + NewsController::storeAndGet($news); } return redirect()->route("menu-plans.index", ['menuPlans' => $menuPlans]); @@ -142,18 +142,15 @@ class MenuPlanController extends Controller $menuPlans = MenuPlan::query()->paginate($request->input("limit", 20)); if($request->newsoption == true){ - $news = [ - "name" => "Opdateret menuplan", - "subname" => "Uge " . $menuplan->week, - "content" => $menuplan->menu - ]; - //Sæt ind i $news array'et + $news = new News(); + $news->name = "Opdateret menuplan"; $news->subname = "Uge " . $menuplan->week; $news->arrangement_id = $menuplan->id; $news->type_id = '2'; $news->content = $menuplan->menu; + NewsController::storeAndGet($news); } diff --git a/skolehjem/app/Http/Controllers/NewsController.php b/skolehjem/app/Http/Controllers/NewsController.php index b12f241..a8b70c1 100644 --- a/skolehjem/app/Http/Controllers/NewsController.php +++ b/skolehjem/app/Http/Controllers/NewsController.php @@ -73,10 +73,8 @@ class NewsController extends Controller * * @return News */ - public static function storeAndGet($request) + public static function storeAndGet(News $news) { - $news = new News($request); - $news->name = ""; $news->save(); Helpers::sendNewsNotification($news, User::all()); @@ -122,9 +120,27 @@ class NewsController extends Controller $news->update($data); + Helpers::sendNewsNotification($news, User::all()); + return redirect()->route("news.index"); } + /** + * Update the specified resource in storage. + * + * @param \Illuminate\Http\Request $request + * @param \App\News $news + * @return RedirectResponse + */ + public static function updateAndGet(News $news) + { + $news->update(); + + Helpers::sendNewsNotification($news, User::all()); + + return $news; + } + /** * Remove the specified resource from storage. * diff --git a/skolehjem/database/migrations/2020_08_11_092000_create_news_type.php b/skolehjem/database/migrations/2020_08_05_092000_create_news_type.php similarity index 100% rename from skolehjem/database/migrations/2020_08_11_092000_create_news_type.php rename to skolehjem/database/migrations/2020_08_05_092000_create_news_type.php diff --git a/skolehjem/public/css/webapp.css b/skolehjem/public/css/webapp.css index 48bd4a0..f9c6a0b 100644 --- a/skolehjem/public/css/webapp.css +++ b/skolehjem/public/css/webapp.css @@ -1,23 +1,19 @@ @charset "UTF-8"; - @font-face { font-family: "Titillium Web"; src: url("/fonts/TitilliumWeb-Regular.ttf"); font-weight: normal; } - @font-face { font-family: "Titillium Web"; src: url("/fonts/TitilliumWeb-SemiBold.ttf"); font-weight: 600; } - @font-face { font-family: "Titillium Web"; src: url("/fonts/TitilliumWeb-Bold.ttf"); font-weight: 700; } - form { max-width: 100%; padding: 0 0.45rem 0 0.45rem; @@ -70,8 +66,7 @@ input[type=file] { display: inline-flex; } -input, -select { +input, select { border: grey solid 2px; border-radius: 4px; background-color: transparent; @@ -289,8 +284,7 @@ span.toggle__text.sde-blue { font-family: "Titillium Web"; } -html, -body { +html, body { width: 100%; margin: 0; padding: 0; @@ -538,7 +532,6 @@ a { * Font Awesome Free 5.13.1 by @fontawesome - https://fontawesome.com * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) */ - .fa, .fas, .far, @@ -618,7 +611,6 @@ a { margin-left: 2.5em; padding-left: 0; } - .fa-ul > li { position: relative; } @@ -652,7 +644,6 @@ a { .fab.fa-pull-left { margin-right: 0.3em; } - .fa.fa-pull-right, .fas.fa-pull-right, .far.fa-pull-right, @@ -675,7 +666,6 @@ a { 0% { transform: rotate(0deg); } - 100% { transform: rotate(360deg); } @@ -685,12 +675,10 @@ a { 0% { transform: rotate(0deg); } - 100% { transform: rotate(360deg); } } - .fa-rotate-90 { -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=1)"; transform: rotate(90deg); @@ -716,8 +704,7 @@ a { transform: scale(1, -1); } -.fa-flip-both, -.fa-flip-horizontal.fa-flip-vertical { +.fa-flip-both, .fa-flip-horizontal.fa-flip-vertical { -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)"; transform: scale(-1, -1); } @@ -763,7 +750,6 @@ a { /* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen readers do not read off random characters that represent icons */ - .fa-500px:before { content: "\F26E"; } @@ -6567,8 +6553,7 @@ readers do not read off random characters that represent icons */ width: 1px; } -.sr-only-focusable:active, -.sr-only-focusable:focus { +.sr-only-focusable:active, .sr-only-focusable:focus { clip: auto; height: auto; margin: 0; @@ -6581,7 +6566,6 @@ readers do not read off random characters that represent icons */ * Font Awesome Free 5.13.1 by @fontawesome - https://fontawesome.com * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) */ - @font-face { font-family: "Font Awesome 5 Free"; font-style: normal; @@ -6590,7 +6574,6 @@ readers do not read off random characters that represent icons */ src: url("/webfonts/fa-solid-900.eot"); src: url("/webfonts/fa-solid-900.eot?#iefix") format("embedded-opentype"), url("/webfonts/fa-solid-900.woff2") format("woff2"), url("/webfonts/fa-solid-900.woff") format("woff"), url("/webfonts/fa-solid-900.ttf") format("truetype"), url("/webfonts/fa-solid-900.svg#fontawesome") format("svg"); } - .fa, .fas { font-family: "Font Awesome 5 Free"; @@ -6629,8 +6612,7 @@ main { margin: 7rem 0 5rem 0; } - header, - #menu { + header, #menu { padding: 1.25rem 1.75rem 0 1.75rem; } @@ -6680,11 +6662,9 @@ main { justify-content: center; } } - .mock-up-link { display: none; } - @media (min-width: 768px) { .mock-up-link { display: block; @@ -6698,7 +6678,6 @@ main { max-width: 414px; overflow-y: auto; } - @media (min-width: 415px) { .main-container-wrapper { box-shadow: 0px 32px 47px rgba(32, 23, 23, 0.09); @@ -6718,17 +6697,14 @@ main { top: -25px; width: 80px; } - .header__btn .icon { display: inline-block; } - .header__btn--left { left: -25px; padding-left: 38px; text-align: left; } - .header__btn--right { padding-right: 32px; right: -25px; @@ -6740,12 +6716,10 @@ main { padding: 16px; margin-bottom: 24px; } - .calendar-container__header { display: flex; justify-content: space-between; } - .calendar-container__btn { background: transparent; border: 0; @@ -6754,7 +6728,6 @@ main { outline: none; color: #E9E8E8; } - .calendar-container__title { color: #222741; font-size: 20px; @@ -6769,7 +6742,6 @@ main { margin-top: 12px; width: 100%; } - .calendar-table__item { border-radius: 50%; color: #424588; @@ -6782,21 +6754,17 @@ main { justify-content: center; cursor: pointer; } - .calendar-table__item:hover > span { color: white; } - .calendar-table__row { display: flex; justify-content: center; } - .calendar-table__header { border-bottom: 2px solid #F2F6F8; margin-bottom: 4px; } - .calendar-table__header .calendar-table__col { display: inline-block; color: #99A4AE; @@ -6808,115 +6776,95 @@ main { width: 40px; height: 18px; } - @media (min-width: 350px) { .calendar-table__header .calendar-table__col { width: 46px; height: 20.7px; } } - @media (min-width: 390px) { .calendar-table__header .calendar-table__col { width: 56px; height: 25.2px; } } - .calendar-table__body .calendar-table__col { width: 40px; height: 40px; border-radius: 50%; } - @media (min-width: 350px) { .calendar-table__body .calendar-table__col { width: 46px; height: 46px; } } - @media (min-width: 390px) { .calendar-table__body .calendar-table__col { width: 56px; height: 56px; } } - @media (min-width: 410px) { .calendar-table__body .calendar-table__col { width: 56px; height: 56px; } } - @media (min-width: 460px) { .calendar-table__body .calendar-table__col { width: 61px; height: 61px; } } - .calendar-table__body .calendar-table__col.selected { background: #00788a; transition: all 0.3s ease-in; outline: none; } - .calendar-table__today .calendar-table__item { border-color: #FEFEFE; background-color: #00788a; box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.1); } - .calendar-table__event .calendar-table__item { background-color: #00788a; border-color: #FEFEFE; box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.1); color: #fff; } - .calendar-table__event--long { overflow-x: hidden; } - .calendar-table__event--long .calendar-table__item { border-radius: 0; } - .calendar-table__event--start .calendar-table__item { border-left: 2px solid #fff; border-radius: 50% 0 0 50%; } - .calendar-table__event--start.calendar-table__col:last-child .calendar-table__item { border-width: 2px; } - .calendar-table__event--end .calendar-table__item { border-right: 2px solid #fff; border-radius: 0 50% 50% 0; } - .calendar-table__event--end.calendar-table__col:first-child .calendar-table__item { border-width: 2px; } - .calendar-table__inactive .calendar-table__item { color: #DCDCE3; cursor: default; } - .calendar-table__inactive .calendar-table__item:hover { background: transparent; box-shadow: none; } - .calendar-table__inactive.calendar-table__event .calendar-table__item { color: #fff; opacity: 0.25; } - .calendar-table__inactive.calendar-table__event .calendar-table__item:hover { background: #00788a; box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.1); @@ -6940,7 +6888,6 @@ main { font-weight: 600; margin-bottom: 16px; } - .events__tag { background: #00788a; border: 2px solid #FEFEFE; @@ -6954,11 +6901,9 @@ main { padding: 5px 2px; text-align: center; } - .events__tag--highlighted { background: #FDCA40; } - .events__item { background: #fff; border-left: 8px solid #00788a; @@ -6970,11 +6915,9 @@ main { align-items: center; margin-bottom: 16px; } - .events__item--left { width: calc(100% - 76px); } - .events__name { font-size: 12px; font-weight: 700; @@ -6982,7 +6925,6 @@ main { display: block; margin-bottom: 6px; } - .events__date { font-size: 12px; color: #9FAAB7; @@ -7034,46 +6976,38 @@ main { bottom: 0; opacity: 0; } - to { bottom: 30px; opacity: 1; } } - @keyframes fadein { from { bottom: 0; opacity: 0; } - to { bottom: 30px; opacity: 1; } } - @-webkit-keyframes fadeout { from { bottom: 30px; opacity: 1; } - to { bottom: 0; opacity: 0; } } - @keyframes fadeout { from { bottom: 30px; opacity: 1; } - to { bottom: 0; opacity: 0; } -} - +} \ No newline at end of file diff --git a/skolehjem/public/css/webappdark.css b/skolehjem/public/css/webappdark.css index 238bd99..44a4e43 100644 --- a/skolehjem/public/css/webappdark.css +++ b/skolehjem/public/css/webappdark.css @@ -1,23 +1,19 @@ @charset "UTF-8"; - @font-face { font-family: "Titillium Web"; src: url("/fonts/TitilliumWeb-Regular.ttf"); font-weight: normal; } - @font-face { font-family: "Titillium Web"; src: url("/fonts/TitilliumWeb-SemiBold.ttf"); font-weight: 600; } - @font-face { font-family: "Titillium Web"; src: url("/fonts/TitilliumWeb-Bold.ttf"); font-weight: 700; } - form { max-width: 100%; padding: 0 0.45rem 0 0.45rem; @@ -70,8 +66,7 @@ input[type=file] { display: inline-flex; } -input, -select { +input, select { border: grey solid 2px; border-radius: 4px; background-color: transparent; @@ -289,8 +284,7 @@ span.toggle__text.sde-blue { font-family: "Titillium Web"; } -html, -body { +html, body { width: 100%; margin: 0; padding: 0; @@ -538,7 +532,6 @@ a { * Font Awesome Free 5.13.1 by @fontawesome - https://fontawesome.com * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) */ - .fa, .fas, .far, @@ -618,7 +611,6 @@ a { margin-left: 2.5em; padding-left: 0; } - .fa-ul > li { position: relative; } @@ -652,7 +644,6 @@ a { .fab.fa-pull-left { margin-right: 0.3em; } - .fa.fa-pull-right, .fas.fa-pull-right, .far.fa-pull-right, @@ -675,7 +666,6 @@ a { 0% { transform: rotate(0deg); } - 100% { transform: rotate(360deg); } @@ -685,12 +675,10 @@ a { 0% { transform: rotate(0deg); } - 100% { transform: rotate(360deg); } } - .fa-rotate-90 { -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=1)"; transform: rotate(90deg); @@ -716,8 +704,7 @@ a { transform: scale(1, -1); } -.fa-flip-both, -.fa-flip-horizontal.fa-flip-vertical { +.fa-flip-both, .fa-flip-horizontal.fa-flip-vertical { -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)"; transform: scale(-1, -1); } @@ -763,7 +750,6 @@ a { /* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen readers do not read off random characters that represent icons */ - .fa-500px:before { content: "\F26E"; } @@ -6567,8 +6553,7 @@ readers do not read off random characters that represent icons */ width: 1px; } -.sr-only-focusable:active, -.sr-only-focusable:focus { +.sr-only-focusable:active, .sr-only-focusable:focus { clip: auto; height: auto; margin: 0; @@ -6581,7 +6566,6 @@ readers do not read off random characters that represent icons */ * Font Awesome Free 5.13.1 by @fontawesome - https://fontawesome.com * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) */ - @font-face { font-family: "Font Awesome 5 Free"; font-style: normal; @@ -6590,7 +6574,6 @@ readers do not read off random characters that represent icons */ src: url("/webfonts/fa-solid-900.eot"); src: url("/webfonts/fa-solid-900.eot?#iefix") format("embedded-opentype"), url("/webfonts/fa-solid-900.woff2") format("woff2"), url("/webfonts/fa-solid-900.woff") format("woff"), url("/webfonts/fa-solid-900.ttf") format("truetype"), url("/webfonts/fa-solid-900.svg#fontawesome") format("svg"); } - .fa, .fas { font-family: "Font Awesome 5 Free"; @@ -6629,8 +6612,7 @@ main { margin: 7rem 0 5rem 0; } - header, - #menu { + header, #menu { padding: 1.25rem 1.75rem 0 1.75rem; } @@ -6680,11 +6662,9 @@ main { justify-content: center; } } - .mock-up-link { display: none; } - @media (min-width: 768px) { .mock-up-link { display: block; @@ -6698,7 +6678,6 @@ main { max-width: 414px; overflow-y: auto; } - @media (min-width: 415px) { .main-container-wrapper { box-shadow: 0px 32px 47px rgba(32, 23, 23, 0.09); @@ -6718,17 +6697,14 @@ main { top: -25px; width: 80px; } - .header__btn .icon { display: inline-block; } - .header__btn--left { left: -25px; padding-left: 38px; text-align: left; } - .header__btn--right { padding-right: 32px; right: -25px; @@ -6740,12 +6716,10 @@ main { padding: 16px; margin-bottom: 24px; } - .calendar-container__header { display: flex; justify-content: space-between; } - .calendar-container__btn { background: transparent; border: 0; @@ -6754,7 +6728,6 @@ main { outline: none; color: #E9E8E8; } - .calendar-container__title { color: #222741; font-size: 20px; @@ -6769,7 +6742,6 @@ main { margin-top: 12px; width: 100%; } - .calendar-table__item { border-radius: 50%; color: #424588; @@ -6782,21 +6754,17 @@ main { justify-content: center; cursor: pointer; } - .calendar-table__item:hover > span { color: white; } - .calendar-table__row { display: flex; justify-content: center; } - .calendar-table__header { border-bottom: 2px solid #F2F6F8; margin-bottom: 4px; } - .calendar-table__header .calendar-table__col { display: inline-block; color: #99A4AE; @@ -6808,115 +6776,95 @@ main { width: 40px; height: 18px; } - @media (min-width: 350px) { .calendar-table__header .calendar-table__col { width: 46px; height: 20.7px; } } - @media (min-width: 390px) { .calendar-table__header .calendar-table__col { width: 56px; height: 25.2px; } } - .calendar-table__body .calendar-table__col { width: 40px; height: 40px; border-radius: 50%; } - @media (min-width: 350px) { .calendar-table__body .calendar-table__col { width: 46px; height: 46px; } } - @media (min-width: 390px) { .calendar-table__body .calendar-table__col { width: 56px; height: 56px; } } - @media (min-width: 410px) { .calendar-table__body .calendar-table__col { width: 56px; height: 56px; } } - @media (min-width: 460px) { .calendar-table__body .calendar-table__col { width: 61px; height: 61px; } } - .calendar-table__body .calendar-table__col.selected { background: #00788a; transition: all 0.3s ease-in; outline: none; } - .calendar-table__today .calendar-table__item { border-color: #FEFEFE; background-color: #00788a; box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.1); } - .calendar-table__event .calendar-table__item { background-color: #00788a; border-color: #FEFEFE; box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.1); color: #fff; } - .calendar-table__event--long { overflow-x: hidden; } - .calendar-table__event--long .calendar-table__item { border-radius: 0; } - .calendar-table__event--start .calendar-table__item { border-left: 2px solid #fff; border-radius: 50% 0 0 50%; } - .calendar-table__event--start.calendar-table__col:last-child .calendar-table__item { border-width: 2px; } - .calendar-table__event--end .calendar-table__item { border-right: 2px solid #fff; border-radius: 0 50% 50% 0; } - .calendar-table__event--end.calendar-table__col:first-child .calendar-table__item { border-width: 2px; } - .calendar-table__inactive .calendar-table__item { color: #DCDCE3; cursor: default; } - .calendar-table__inactive .calendar-table__item:hover { background: transparent; box-shadow: none; } - .calendar-table__inactive.calendar-table__event .calendar-table__item { color: #fff; opacity: 0.25; } - .calendar-table__inactive.calendar-table__event .calendar-table__item:hover { background: #00788a; box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.1); @@ -6940,7 +6888,6 @@ main { font-weight: 600; margin-bottom: 16px; } - .events__tag { background: #00788a; border: 2px solid #FEFEFE; @@ -6954,11 +6901,9 @@ main { padding: 5px 2px; text-align: center; } - .events__tag--highlighted { background: #FDCA40; } - .events__item { background: #fff; border-left: 8px solid #00788a; @@ -6970,11 +6915,9 @@ main { align-items: center; margin-bottom: 16px; } - .events__item--left { width: calc(100% - 76px); } - .events__name { font-size: 12px; font-weight: 700; @@ -6982,7 +6925,6 @@ main { display: block; margin-bottom: 6px; } - .events__date { font-size: 12px; color: #9FAAB7; @@ -7034,51 +6976,42 @@ main { bottom: 0; opacity: 0; } - to { bottom: 30px; opacity: 1; } } - @keyframes fadein { from { bottom: 0; opacity: 0; } - to { bottom: 30px; opacity: 1; } } - @-webkit-keyframes fadeout { from { bottom: 30px; opacity: 1; } - to { bottom: 0; opacity: 0; } } - @keyframes fadeout { from { bottom: 30px; opacity: 1; } - to { bottom: 0; opacity: 0; } } - -html, -body { +html, body { background-color: #666666; } @@ -7094,8 +7027,7 @@ main { color: white; } -input, -select { +input, select { border-color: white; } @@ -7122,5 +7054,4 @@ input::placeholder { .ql-align-center > strong { color: #ffffff; -} - +} \ No newline at end of file diff --git a/skolehjem/resources/views/admin/feedbacks/index.blade.php b/skolehjem/resources/views/admin/feedbacks/index.blade.php index ec85be1..0c0ac4d 100644 --- a/skolehjem/resources/views/admin/feedbacks/index.blade.php +++ b/skolehjem/resources/views/admin/feedbacks/index.blade.php @@ -27,11 +27,19 @@ Feedback Besked Ris el. Ros + Delete @foreach($feedback as $fb) - {{ $fb->message }} - {{ $fb->suggestion_form }} + {{ $fb->message }} + {{ $fb->suggestion_form }} +
$fb ]) }}" class="w-100 nostyle"> + @csrf + @method("delete") + + +
+ @endforeach diff --git a/skolehjem/resources/views/app/events/index.blade.php b/skolehjem/resources/views/app/events/index.blade.php index 944c148..4aab9f8 100644 --- a/skolehjem/resources/views/app/events/index.blade.php +++ b/skolehjem/resources/views/app/events/index.blade.php @@ -36,38 +36,85 @@

{{ __('msg.aktiviteter') }}

@if(!$events->isEmpty()) @foreach($events as $event) -
-
- @if($event->resource_id !== null) -
-

{{ $event->name }}

-

{{__('msg.af')}}: {{ $event->accountable }}

-

{{ \Illuminate\Support\Facades\Date::createFromTimeStamp(strtotime($event->date))->format('d/m/Y \k\l\. H:i') }}

+
+ @if($event->resource_id !== null) +
+

{{ $event->name }}

+

{{__('msg.af')}}: {{ $event->accountable }}

+

{{ \Illuminate\Support\Facades\Date::createFromTimeStamp(strtotime($event->date))->format('d/m/Y \k\l\. H:i') }}

+
+ @else +
+

{{ $event->name }}

+

Af: {{ $event->accountable }}

+

{{ \Illuminate\Support\Facades\Date::createFromTimeStamp(strtotime($event->date))->format('d/m/Y \k\l\. H:i') }}

- @else -
-

{{ $event->name }}

-

Af: {{ $event->accountable }}

-

{{ \Illuminate\Support\Facades\Date::createFromTimeStamp(strtotime($event->date))->format('d/m/Y \k\l\. H:i') }}

-
- @endif -
- {!! \App\Helpers::closetags(substr($event->description, 0, 300) )!!} - - {!! session()->get('error#' . $event->id) !!} - {!! session()->get('signup#' . $event->id) !!} - + @endif +
+ {!! \App\Helpers::closetags(substr($event->description, 0, 300) )!!} + + {!! session()->get('error#' . $event->id) !!} + {!! session()->get('signup#' . $event->id) !!} +
+ @if (count(\App\UserEvent::query()->where('event_id', '=', $event->id)->where('user_id', '=', Auth::user()->id)->get()) > 0) + {{__('msg.afmeld')}} + @else {{-- ^ If you're already participating in the event, then show a ´cancel´ button - v Else show a ´participate´ button --}} + {{__('msg.tilmeld')}} + @endif + $event->id ])}}">{{__('msg.læsmere')}} + $event->id ])}}">{{__('msg.sedeltagere')}}
- +
@endforeach @else

{{__('msg.dereringenaktiviteter')}}!

@endif {{__('msg.setilmeldteaktiviteter')}} +
@endsection +@section("scripts") + +@endsection + diff --git a/skolehjem/resources/views/app/events/yourevents.blade.php b/skolehjem/resources/views/app/events/yourevents.blade.php index f4296b6..bcdd4b5 100644 --- a/skolehjem/resources/views/app/events/yourevents.blade.php +++ b/skolehjem/resources/views/app/events/yourevents.blade.php @@ -57,7 +57,11 @@
{!! \App\Helpers::closetags(substr($userevent->description, 0, 300) )!!}
- {{__('msg.afmeld')}} + @if (count(\App\UserEvent::query()->where('event_id', '=', $userevent->id)->where('user_id', '=', Auth::user()->id)->get()) > 0) + {{__('msg.afmeld')}} + @else {{-- ^ If you're already participating in the event, then show a ´cancel´ button - v Else show a ´participate´ button --}} + {{__('msg.tilmeld')}} + @endif $userevent->id ])}}">{{__('msg.læsmere')}} $userevent->id ])}}">{{__('msg.sedeltagere')}}
@@ -68,6 +72,50 @@ @else

{{__('msg.duharikketilmeldtdignogenaktiviteter')}}!

@endif - {{__('msg.tilbage')}} + {{__('msg.tilbage')}} +
@endsection +@section("scripts") + +@endsection diff --git a/skolehjem/resources/views/app/users/edit.blade.php b/skolehjem/resources/views/app/users/edit.blade.php index 9b723ee..4260367 100644 --- a/skolehjem/resources/views/app/users/edit.blade.php +++ b/skolehjem/resources/views/app/users/edit.blade.php @@ -17,7 +17,7 @@ {{__('msg.telefon')}} Nr.: - {{__('msg.tilbage')}} + {{__('msg.tilbage')}} @endsection diff --git a/skolehjem/resources/views/app/users/editpass.blade.php b/skolehjem/resources/views/app/users/editpass.blade.php index 030d164..5a9514d 100644 --- a/skolehjem/resources/views/app/users/editpass.blade.php +++ b/skolehjem/resources/views/app/users/editpass.blade.php @@ -28,7 +28,7 @@ {!! session()->get('error#notsamepass') !!} {!! session()->get('error#oldpass') !!} - {{__('msg.tilbage')}} + {{__('msg.tilbage')}} diff --git a/skolehjem/resources/views/app/users/editpic.blade.php b/skolehjem/resources/views/app/users/editpic.blade.php index adafbfc..ad1f2b5 100644 --- a/skolehjem/resources/views/app/users/editpic.blade.php +++ b/skolehjem/resources/views/app/users/editpic.blade.php @@ -24,7 +24,7 @@ {{__('msg.profilbillede')}}: - {{__('msg.tilbage')}} + {{__('msg.tilbage')}} @endsection diff --git a/skolehjem/resources/views/app/users/forgot.blade.php b/skolehjem/resources/views/app/users/forgot.blade.php index 34909e0..617cf4d 100644 --- a/skolehjem/resources/views/app/users/forgot.blade.php +++ b/skolehjem/resources/views/app/users/forgot.blade.php @@ -14,7 +14,7 @@ {!! session()->get('errornosuchuser') !!} - Tilbage + Tilbage @endsection