diff --git a/skolehjem/app/Http/Controllers/ContactController.php b/skolehjem/app/Http/Controllers/ContactController.php index 4b00410..63eea17 100644 --- a/skolehjem/app/Http/Controllers/ContactController.php +++ b/skolehjem/app/Http/Controllers/ContactController.php @@ -3,6 +3,8 @@ namespace App\Http\Controllers; use Illuminate\Http\Request; +use Illuminate\Http\Response; +use App\Contact; class ContactController extends Controller { @@ -11,9 +13,12 @@ class ContactController extends Controller * * @return \Illuminate\Http\Response */ - public function index() + public function index(Request $request) { - // + + $contact = Contact::query()->paginate($request->input("limit", 20)); + + return Response::detect("contact.index", [ "contact" => $contact]); } /** diff --git a/skolehjem/public/images/icons/user-hvid.svg b/skolehjem/public/images/icons/user-hvid.svg new file mode 100644 index 0000000..12fae85 --- /dev/null +++ b/skolehjem/public/images/icons/user-hvid.svg @@ -0,0 +1 @@ + diff --git a/skolehjem/public/images/icons/user.svg b/skolehjem/public/images/icons/user.svg new file mode 100644 index 0000000..042ffb1 --- /dev/null +++ b/skolehjem/public/images/icons/user.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/skolehjem/resources/js/navmenu/menu.js b/skolehjem/resources/js/navmenu/menu.js index 7f47606..f73942f 100644 --- a/skolehjem/resources/js/navmenu/menu.js +++ b/skolehjem/resources/js/navmenu/menu.js @@ -1,32 +1,3 @@ -// function toggleMenu() { -// var buttonElement = document.getElementById('menuIcon'); -// -// var htmlElement = document.getElementsByTagName('html')[0]; -// var logoElement = document.getElementById('sdeLogo'); -// var mainElement = document.getElementsByTagName('main')[0]; -// -// var menu = document.getElementById('menu'); -// -// if(buttonElement.alt === '-') -// { -// htmlElement.style.backgroundColor = 'rgb(0, 120, 138)'; -// logoElement.src = '/images/logos/Logo-hvid.svg'; -// menu.classList.remove('d-none'); -// mainElement.classList.add('d-none'); -// -// buttonElement.alt = 'X'; -// } -// else -// { -// htmlElement.style.backgroundColor = 'rgb(255, 255, 255)'; -// logoElement.src = '/images/logos/Logo-normal.svg'; -// menu.classList.add('d-none'); -// mainElement.classList.remove('d-none'); -// -// buttonElement.alt = '-'; -// } -// } - function toggleMenu(menu) { let menuElement = document.getElementById(menu); let logoElement = document.getElementById("sdeLogo"); diff --git a/skolehjem/resources/views/admin/users/create.blade.php b/skolehjem/resources/views/admin/users/create.blade.php index d5d02ed..427d2cd 100644 --- a/skolehjem/resources/views/admin/users/create.blade.php +++ b/skolehjem/resources/views/admin/users/create.blade.php @@ -14,17 +14,17 @@
@endsection diff --git a/skolehjem/resources/views/app/layout/base.blade.php b/skolehjem/resources/views/app/layout/base.blade.php index ae60fb1..18a4713 100644 --- a/skolehjem/resources/views/app/layout/base.blade.php +++ b/skolehjem/resources/views/app/layout/base.blade.php @@ -45,6 +45,10 @@ Vagttelefon + + + Konto + @yield("content") diff --git a/skolehjem/resources/views/app/root/index.blade.php b/skolehjem/resources/views/app/root/index.blade.php index a2a2422..df2b1fe 100644 --- a/skolehjem/resources/views/app/root/index.blade.php +++ b/skolehjem/resources/views/app/root/index.blade.php @@ -21,10 +21,10 @@ {{--@extends("app.washing-reservations.index")--}} {{--Menuplan--}} -{{--@extends("app.menuplans.index")--}} +{{----}}@extends("app.menuplans.index") {{--Contact--}} -{{----}}@extends("app.contact.index") +{{--@extends("app.contact.index")--}} {{----}} {{------Admin Panel diff --git a/skolehjem/resources/views/app/users/index.blade.php b/skolehjem/resources/views/app/users/index.blade.php index 60543b6..033a81e 100644 --- a/skolehjem/resources/views/app/users/index.blade.php +++ b/skolehjem/resources/views/app/users/index.blade.php @@ -1,21 +1,23 @@ @extends('app.layout.base') @section('content') - - + @endsection diff --git a/skolehjem/routes/web.php b/skolehjem/routes/web.php index d910ba1..3077ad9 100644 --- a/skolehjem/routes/web.php +++ b/skolehjem/routes/web.php @@ -27,6 +27,8 @@ Route::get("/logout", "UserController@logout")->name("users.logout"); Route::get("phones", "PhoneController@index")->name("phones.index"); + +Route::resource("contacts", "ContactController"); Route::resource("menu-plans", "MenuPlanController"); Route::resource("users", "UserController"); Route::resource("events", "EventController");