Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
7120b85784
|
@ -0,0 +1,12 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class Contact extends Model
|
||||||
|
{
|
||||||
|
protected $fillable = [
|
||||||
|
'name_first', "name_last", 'email', 'tel'
|
||||||
|
];
|
||||||
|
}
|
|
@ -0,0 +1,100 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Http\Response;
|
||||||
|
use App\Contact;
|
||||||
|
|
||||||
|
class ContactController extends Controller
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Display a listing of the resource.
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function index(Request $request)
|
||||||
|
{
|
||||||
|
|
||||||
|
$contact = Contact::query()->paginate($request->input("limit", 20));
|
||||||
|
|
||||||
|
return Response::detect("contacts.index", [ "contact" => $contact]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the form for creating a new resource.
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function create()
|
||||||
|
{
|
||||||
|
return Response::detect("contacts.create");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Store a newly created resource in storage.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function store(Request $request)
|
||||||
|
{
|
||||||
|
$requestContact = $request->validate([
|
||||||
|
"name_first" => "required|max:255",
|
||||||
|
"name_last" => "required|max:255",
|
||||||
|
"email" => "required|max:255",
|
||||||
|
"tel" => "required|max:255",
|
||||||
|
]);
|
||||||
|
|
||||||
|
$contact = new Contact($requestContact);
|
||||||
|
$contact->save();
|
||||||
|
|
||||||
|
return Response::detect("contacts.store");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display the specified resource.
|
||||||
|
*
|
||||||
|
* @param int $id
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function show($id)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the form for editing the specified resource.
|
||||||
|
*
|
||||||
|
* @param int $id
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function edit($id)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update the specified resource in storage.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @param int $id
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function update(Request $request, $id)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove the specified resource from storage.
|
||||||
|
*
|
||||||
|
* @param int $id
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function destroy($id)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
}
|
|
@ -83,15 +83,13 @@ class ExternalLinkController extends Controller
|
||||||
*/
|
*/
|
||||||
public function update(Request $request, $id)
|
public function update(Request $request, $id)
|
||||||
{
|
{
|
||||||
$data = $request->validate([
|
$data = $request->all();
|
||||||
"name" => "max:255",
|
|
||||||
"link" => "max:255"
|
|
||||||
]);
|
|
||||||
|
|
||||||
$id->update($data);
|
$link = ExternalLink::find($id);
|
||||||
$id->save();
|
$link->update($data);
|
||||||
|
$link->save();
|
||||||
|
|
||||||
return Response::detect("external-links.update");
|
return Response::detect("external-links.update", [ "link" => $link]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -102,7 +100,8 @@ class ExternalLinkController extends Controller
|
||||||
*/
|
*/
|
||||||
public function destroy($id)
|
public function destroy($id)
|
||||||
{
|
{
|
||||||
$id->delete();
|
$link = ExternalLink::find($id);
|
||||||
return Response::detect("external-links.destroy");
|
$link->delete();
|
||||||
|
return redirect()->route("external-links.index");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,7 +89,7 @@ class MenuPlanController extends Controller
|
||||||
public function update(Request $request, $id)
|
public function update(Request $request, $id)
|
||||||
{
|
{
|
||||||
$data = $request->all();
|
$data = $request->all();
|
||||||
|
//FORCED UPDATE
|
||||||
|
|
||||||
$menuplan = MenuPlan::find($id);
|
$menuplan = MenuPlan::find($id);
|
||||||
$menuplan->update($data);
|
$menuplan->update($data);
|
||||||
|
|
|
@ -117,33 +117,42 @@ class UserController extends Controller
|
||||||
*/
|
*/
|
||||||
public function update(Request $request, $id)
|
public function update(Request $request, $id)
|
||||||
{
|
{
|
||||||
$data = $request->validate([
|
$data = $request->all();
|
||||||
"name_first" => "max:255",
|
|
||||||
"name_last" => "max:255",
|
// $data = $request->validate([
|
||||||
"email" => "email|unique:users",
|
// "name_first" => "max:255",
|
||||||
"password" => "max:60",
|
// "name_last" => "max:255",
|
||||||
"phone" => "unique:users",
|
// "email" => "email|unique:users",
|
||||||
]);
|
// "password" => "max:60",
|
||||||
|
// "phone" => "unique:users",
|
||||||
|
// ]);
|
||||||
|
|
||||||
// Validates if the user is updating itself or another user.
|
// Validates if the user is updating itself or another user.
|
||||||
if($id === Auth::id()) {
|
// if($id === Auth::id()) {
|
||||||
$user = Auth::user();
|
// $user = Auth::user();
|
||||||
|
//
|
||||||
|
// $user->update($data);
|
||||||
|
//
|
||||||
|
// $user->save();
|
||||||
|
// return Response::detect("users.edit", [
|
||||||
|
// "user" => $user
|
||||||
|
// ]);
|
||||||
|
// }
|
||||||
|
|
||||||
$user->update($data);
|
//TODO: Implement when security's ready!!!
|
||||||
|
// else if(Auth::user()->hasPermissionTo("user.edit")) {
|
||||||
$user->save();
|
|
||||||
}
|
|
||||||
else if(Auth::user()->hasPermissionTo("user.edit")) {
|
|
||||||
$user = User::find($id);
|
$user = User::find($id);
|
||||||
|
|
||||||
/** @var User $user */
|
/** @var User $user */
|
||||||
$user->update($data);
|
$user->update($data);
|
||||||
|
|
||||||
$user->save();
|
$user->save();
|
||||||
}
|
// }
|
||||||
|
|
||||||
return Response::detect("users.edit", [
|
$users = User::query()->paginate(20);
|
||||||
"user" => $user
|
|
||||||
|
return Response::detect("users.index", [
|
||||||
|
"users" => $users
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -155,17 +164,17 @@ class UserController extends Controller
|
||||||
*/
|
*/
|
||||||
public function destroy($id)
|
public function destroy($id)
|
||||||
{
|
{
|
||||||
if($id === Auth::id()) {
|
// if($id === Auth::id()) {
|
||||||
$user = Auth::user();
|
// $user = Auth::user();
|
||||||
$user->delete();
|
// $user->delete();
|
||||||
}
|
// }
|
||||||
else if(Auth::user()->hasPermissionTo("user.delete")) {
|
// else if(Auth::user()->hasPermissionTo("user.delete")) {
|
||||||
$user = User::find($id);
|
$user = User::find($id);
|
||||||
|
|
||||||
$user->delete();
|
$user->delete();
|
||||||
}
|
// }
|
||||||
|
|
||||||
return view("users.delete");
|
return redirect()->route("users.index");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*******************************************/
|
/*******************************************/
|
||||||
|
|
|
@ -0,0 +1,31 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
class CreateContact extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::create('contact', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
$table->timestamps();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('contact');
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1 @@
|
||||||
|
<svg id="Layer_1" enable-background="new 0 0 512 512" height="512" fill="#fff" viewBox="0 0 512 512" width="512" xmlns="http://www.w3.org/2000/svg"><g><path d="m256 512c-60.615 0-119.406-21.564-165.543-60.721-10.833-9.188-20.995-19.375-30.201-30.275-38.859-46.06-60.256-104.657-60.256-165.004 0-68.381 26.628-132.668 74.98-181.02s112.639-74.98 181.02-74.98 132.668 26.628 181.02 74.98 74.98 112.639 74.98 181.02c0 60.348-21.397 118.945-60.251 164.998-9.211 10.906-19.373 21.093-30.209 30.284-46.134 39.154-104.925 60.718-165.54 60.718zm0-480c-123.514 0-224 100.486-224 224 0 52.805 18.719 104.074 52.709 144.363 8.06 9.543 16.961 18.466 26.451 26.516 40.364 34.256 91.801 53.121 144.84 53.121s104.476-18.865 144.837-53.119c9.493-8.052 18.394-16.976 26.459-26.525 33.985-40.281 52.704-91.55 52.704-144.356 0-123.514-100.486-224-224-224z"/><path d="m256 256c-52.935 0-96-43.065-96-96s43.065-96 96-96 96 43.065 96 96-43.065 96-96 96zm0-160c-35.29 0-64 28.71-64 64s28.71 64 64 64 64-28.71 64-64-28.71-64-64-64z"/><path d="m411.202 455.084c-1.29 0-2.6-.157-3.908-.485-8.57-2.151-13.774-10.843-11.623-19.414 2.872-11.443 4.329-23.281 4.329-35.185 0-78.285-63.646-142.866-141.893-143.99l-2.107-.01-2.107.01c-78.247 1.124-141.893 65.705-141.893 143.99 0 11.904 1.457 23.742 4.329 35.185 2.151 8.571-3.053 17.263-11.623 19.414s-17.263-3.052-19.414-11.623c-3.512-13.989-5.292-28.448-5.292-42.976 0-46.578 18.017-90.483 50.732-123.63 32.683-33.114 76.285-51.708 122.774-52.358.075-.001.149-.001.224-.001l2.27-.011 2.27.01c.075 0 .149 0 .224.001 46.489.649 90.091 19.244 122.774 52.358 32.715 33.148 50.732 77.053 50.732 123.631 0 14.528-1.78 28.987-5.292 42.976-1.823 7.262-8.343 12.107-15.506 12.108z"/></g></svg>
|
After Width: | Height: | Size: 1.7 KiB |
|
@ -0,0 +1 @@
|
||||||
|
<svg id="Layer_1" enable-background="new 0 0 512 512" height="512" viewBox="0 0 512 512" width="512" xmlns="http://www.w3.org/2000/svg"><g><path d="m256 512c-60.615 0-119.406-21.564-165.543-60.721-10.833-9.188-20.995-19.375-30.201-30.275-38.859-46.06-60.256-104.657-60.256-165.004 0-68.381 26.628-132.668 74.98-181.02s112.639-74.98 181.02-74.98 132.668 26.628 181.02 74.98 74.98 112.639 74.98 181.02c0 60.348-21.397 118.945-60.251 164.998-9.211 10.906-19.373 21.093-30.209 30.284-46.134 39.154-104.925 60.718-165.54 60.718zm0-480c-123.514 0-224 100.486-224 224 0 52.805 18.719 104.074 52.709 144.363 8.06 9.543 16.961 18.466 26.451 26.516 40.364 34.256 91.801 53.121 144.84 53.121s104.476-18.865 144.837-53.119c9.493-8.052 18.394-16.976 26.459-26.525 33.985-40.281 52.704-91.55 52.704-144.356 0-123.514-100.486-224-224-224z"/><path d="m256 256c-52.935 0-96-43.065-96-96s43.065-96 96-96 96 43.065 96 96-43.065 96-96 96zm0-160c-35.29 0-64 28.71-64 64s28.71 64 64 64 64-28.71 64-64-28.71-64-64-64z"/><path d="m411.202 455.084c-1.29 0-2.6-.157-3.908-.485-8.57-2.151-13.774-10.843-11.623-19.414 2.872-11.443 4.329-23.281 4.329-35.185 0-78.285-63.646-142.866-141.893-143.99l-2.107-.01-2.107.01c-78.247 1.124-141.893 65.705-141.893 143.99 0 11.904 1.457 23.742 4.329 35.185 2.151 8.571-3.053 17.263-11.623 19.414s-17.263-3.052-19.414-11.623c-3.512-13.989-5.292-28.448-5.292-42.976 0-46.578 18.017-90.483 50.732-123.63 32.683-33.114 76.285-51.708 122.774-52.358.075-.001.149-.001.224-.001l2.27-.011 2.27.01c.075 0 .149 0 .224.001 46.489.649 90.091 19.244 122.774 52.358 32.715 33.148 50.732 77.053 50.732 123.631 0 14.528-1.78 28.987-5.292 42.976-1.823 7.262-8.343 12.107-15.506 12.108z"/></g></svg>
|
After Width: | Height: | Size: 1.7 KiB |
|
@ -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) {
|
function toggleMenu(menu) {
|
||||||
let menuElement = document.getElementById(menu);
|
let menuElement = document.getElementById(menu);
|
||||||
let logoElement = document.getElementById("sdeLogo");
|
let logoElement = document.getElementById("sdeLogo");
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
@extends("admin.layout.base")
|
||||||
|
@extends("admin.layout.header")
|
||||||
|
|
||||||
|
@section("title")
|
||||||
|
Kontakter - Opret
|
||||||
|
@endsection
|
||||||
|
|
||||||
|
@section("path")
|
||||||
|
<a href="" class="text-white">Opret Kontakt</a> /
|
||||||
|
@endsection
|
||||||
|
|
||||||
|
@section("content")
|
||||||
|
<h1>Opret Kontakt:</h1>
|
||||||
|
<form method="post" action="{{ route("contacts.store") }}">
|
||||||
|
@csrf
|
||||||
|
<label for="name_first">Fornavn:</label>
|
||||||
|
<input type="text" name="name_first" id="name_first" placeholder="Fornavn" required>
|
||||||
|
<label for="name_last">Efternavn:</label>
|
||||||
|
<input type="text" name="name_last" id="name_last" placeholder="Efternavn" required>
|
||||||
|
<label for="email">Email:</label>
|
||||||
|
<input type="email" name="email" id="email" placeholder="x@y.z" required>
|
||||||
|
<label for="tel">Telefon nr:</label>
|
||||||
|
<input type="tel" name="phone" id="tel" placeholder="12345678" pattern="[0-9]{2}[0-9]{2}[0-9]{2}[0-9]{2}" required>
|
||||||
|
<input type="submit" class="btn btn-dark text-white" value="Opret">
|
||||||
|
</form>
|
||||||
|
@endsection
|
|
@ -0,0 +1,33 @@
|
||||||
|
@extends("admin.layout.base")
|
||||||
|
@extends("admin.layout.header")
|
||||||
|
|
||||||
|
@section("title")
|
||||||
|
Events - Vis
|
||||||
|
@endsection
|
||||||
|
|
||||||
|
@section("path")
|
||||||
|
<a href="" class="text-white">Vis Kontakter</a> /
|
||||||
|
@endsection
|
||||||
|
|
||||||
|
@section("content")
|
||||||
|
<table class="tbl">
|
||||||
|
<tr>
|
||||||
|
<th>Kontakt Navn</th>
|
||||||
|
<th>Titel</th>
|
||||||
|
<th>E-mail</th>
|
||||||
|
<th>Tlf</th>
|
||||||
|
<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/pencil.svg') }}" alt="Update"></th>
|
||||||
|
<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/trashcan.svg') }}" alt="Delete"></th>
|
||||||
|
</tr>
|
||||||
|
@foreach($contacts as $contact)
|
||||||
|
<tr>
|
||||||
|
<td>{{ $contact->name }}</td>
|
||||||
|
<td>{{ $contact->title }}</td>
|
||||||
|
<td>{{ $contact->email }}</td>
|
||||||
|
<td>{{ $contact->phone }}</td>
|
||||||
|
<td><a href=""><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
|
||||||
|
<td><a href=""><img class="w-100" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></a></td>
|
||||||
|
</tr>
|
||||||
|
@endforeach
|
||||||
|
</table>
|
||||||
|
@endsection
|
|
@ -6,17 +6,18 @@
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@section("path")
|
@section("path")
|
||||||
<a href="../external-links/edit.blade.php" class="text-white">Rediger Link</a> /
|
<a href="{{route('external-links.edit', ['external_link' => $link])}}" class="text-white">Rediger Link</a> /
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@section("content")
|
@section("content")
|
||||||
<h1>Rediger Link:</h1>
|
<h1>Rediger Link:</h1>
|
||||||
<form method="post" action="{{ route("external-links.edit", ['external_link' => $link]) }}">
|
<form method="post" action="{{route("external-links.update", ["external_link" => $link])}}">
|
||||||
@csrf
|
@csrf
|
||||||
|
@method("PUT")
|
||||||
<label for="title">Titel:</label>
|
<label for="title">Titel:</label>
|
||||||
<input type="text" name="title" id="title" required>
|
<input value="{{$link->name}}" type="text" name="title" id="title" required>
|
||||||
<label for="link">Linket:</label>
|
<label for="link">Linket:</label>
|
||||||
<input type="text" name="link" id="link" required>
|
<input value="{{$link->link}}" type="text" name="link" id="link" required>
|
||||||
<input type="submit" class="btn btn-dark text-white" value="Rediger">
|
<input type="submit" class="btn btn-dark text-white" value="Rediger">
|
||||||
</form>
|
</form>
|
||||||
@endsection
|
@endsection
|
||||||
|
|
|
@ -21,8 +21,13 @@
|
||||||
<tr>
|
<tr>
|
||||||
<th>{{$link->name}}</th>
|
<th>{{$link->name}}</th>
|
||||||
<th><a href="{{$link->link}}">{{$link->link}}</th>
|
<th><a href="{{$link->link}}">{{$link->link}}</th>
|
||||||
<td><a href=""><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
|
<td><a href="{{ route("external-links.edit", [ "external_link" => $link ]) }}"><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
|
||||||
<td><a href=""><img class="w-100" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></a></td>
|
<td> <form method="post" action="{{ route("external-links.destroy", [ "external_link" => $link ]) }}" class="w-100">
|
||||||
|
@csrf
|
||||||
|
@method("delete")
|
||||||
|
|
||||||
|
<button class="w-100" type="submit"><img class="w-100" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button>
|
||||||
|
</form></td>
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
@endforeach
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@section("path")
|
@section("path")
|
||||||
<a href="{{ route('external-links.index') }}" class="text-white">External link</a> /
|
<a href="{{ route('external-links.edit', ["external_link" => $link]) }}" class="text-white">External link</a> /
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@section("content")
|
@section("content")
|
||||||
|
|
|
@ -40,6 +40,15 @@
|
||||||
<a href="{{ route('washing-machines.create') }}" class="text-white"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Vaskemaskine</a>
|
<a href="{{ route('washing-machines.create') }}" class="text-white"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Vaskemaskine</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="segment">
|
||||||
|
<h3 class="text-white">Kontakter</h3>
|
||||||
|
<div class="row">
|
||||||
|
<a href="{{ route("contacts.index") }}" class="text-white"><img src="{{ asset('/images/icons/eye.svg') }}" alt="Read">Vis Kontakter</a>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<a href="{{ route("contacts.create") }}" class="text-white"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Kontakt</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="w-85" style="background-color: #cccccc;">
|
<div class="w-85" style="background-color: #cccccc;">
|
||||||
<div class="directorypath text-white">
|
<div class="directorypath text-white">
|
||||||
|
|
|
@ -14,17 +14,17 @@
|
||||||
<form method="post" action="{{ route("users.store") }}">
|
<form method="post" action="{{ route("users.store") }}">
|
||||||
@csrf
|
@csrf
|
||||||
<label for="name_first">Fornavn:</label>
|
<label for="name_first">Fornavn:</label>
|
||||||
<input type="text" name="name_first" id="name_first" required>
|
<input type="text" name="name_first" id="name_first" placeholder="Fornavn" required>
|
||||||
<label for="name_last">Efternavn:</label>
|
<label for="name_last">Efternavn:</label>
|
||||||
<input type="text" name="name_last" id="name_last" required>
|
<input type="text" name="name_last" id="name_last" placeholder="Efternavn" required>
|
||||||
<label for="email">Email:</label>
|
<label for="email">Email:</label>
|
||||||
<input type="email" name="email" id="email" required>
|
<input type="email" name="email" id="email" placeholder="x@y.z" required>
|
||||||
<label for="password1">Password:</label>
|
<label for="password1">Password:</label>
|
||||||
<input type="password" name="password" id="password1" required>
|
<input type="password" name="password" placeholder="Password" id="password1" required>
|
||||||
<label for="password2">Confirm Password:</label>
|
<label for="password2">Bekræft Password:</label>
|
||||||
<input type="password" id="password2" required>
|
<input type="password" id="password2" placeholder="Bekræft Password" required>
|
||||||
<label for="tel">Telefon nr:</label>
|
<label for="tel">Telefon nr:</label>
|
||||||
<input type="tel" name="phone" id="tel" required>
|
<input type="tel" name="phone" id="tel" placeholder="12345678" pattern="[0-9]{2}[0-9]{2}[0-9]{2}[0-9]{2}" required>
|
||||||
<input type="submit" class="btn btn-dark text-white" value="Opret">
|
<input type="submit" class="btn btn-dark text-white" value="Opret">
|
||||||
</form>
|
</form>
|
||||||
@endsection
|
@endsection
|
||||||
|
|
|
@ -6,25 +6,26 @@
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@section("path")
|
@section("path")
|
||||||
<a href="{{ route('users.edit', ['id' => $user->id]) }}" class="text-white">Rediger Bruger</a> /
|
<a href="{{ route('users.edit', ['user' => $user]) }}" class="text-white">Rediger Bruger</a> /
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@section("content")
|
@section("content")
|
||||||
<h1>Rediger Bruger:</h1>
|
<h1>Rediger Bruger:</h1>
|
||||||
<form method="post" action="">
|
<form method="post" action="{{ route("users.update", ['user' => $user]) }}">
|
||||||
@csrf
|
@csrf
|
||||||
|
@method("put")
|
||||||
<label for="name_first">Fornavn:</label>
|
<label for="name_first">Fornavn:</label>
|
||||||
<input type="text" name="name_first" id="name_first" value="{Fornavn}" required>
|
<input type="text" name="name_first" id="name_first" value="{{ $user->name_first }}" required>
|
||||||
<label for="name_last">Efternavn:</label>
|
<label for="name_last">Efternavn:</label>
|
||||||
<input type="text" name="name_last" id="name_last" value="{Efternavn}" required>
|
<input type="text" name="name_last" id="name_last" value="{{ $user->name_last }}" required>
|
||||||
<label for="email">Email:</label>
|
<label for="email">Email:</label>
|
||||||
<input type="email" name="email" id="email" value="{Email}" required>
|
<input type="email" name="email" id="email" value="{{ $user->name_email }}" required>
|
||||||
<label for="password1">Password:</label>
|
<label for="password1">Password:</label>
|
||||||
<input type="password" name="password" id="password1" value="{Password}" required>
|
<input type="password" name="password" id="password1" value="" required>
|
||||||
<label for="password2">Confirm Password:</label>
|
<label for="password2">Confirm Password:</label>
|
||||||
<input type="password" id="password2" value="{Password}" required>
|
<input type="password" id="password2" value="" required>
|
||||||
<label for="tel">Telefon nr:</label>
|
<label for="tel">Telefon nr:</label>
|
||||||
<input type="tel" name="phone" id="tel" value="{Telefon}" required>
|
<input type="tel" name="phone" id="tel" value="{{ $user->phone }}" required>
|
||||||
<input type="submit" class="btn btn-dark text-white" value="Rediger">
|
<input type="submit" class="btn btn-dark text-white" value="Rediger">
|
||||||
</form>
|
</form>
|
||||||
@endsection
|
@endsection
|
||||||
|
|
|
@ -25,8 +25,15 @@
|
||||||
<td>{{ $user->name_last }}</td>
|
<td>{{ $user->name_last }}</td>
|
||||||
<td>{{ $user->email }}</td>
|
<td>{{ $user->email }}</td>
|
||||||
<td>{{ $user->phone }}</td>
|
<td>{{ $user->phone }}</td>
|
||||||
<td><a href=""><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
|
<td><a href="{{ route("users.edit", [ "user" => $user->id ]) }}"><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
|
||||||
<td><a href=""><img class="w-100" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></a></td>
|
<td>
|
||||||
|
<form method="post" action="{{ route("users.destroy", [ "user" => $user ]) }}" class="w-100">
|
||||||
|
@csrf
|
||||||
|
@method("delete")
|
||||||
|
|
||||||
|
<button type="submit"><img class="w-100" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button>
|
||||||
|
</form>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
@endforeach
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -7,11 +7,42 @@
|
||||||
@section("content")
|
@section("content")
|
||||||
<main>
|
<main>
|
||||||
<h1 class="text-center sde-blue mt-0">Kontakt</h1>
|
<h1 class="text-center sde-blue mt-0">Kontakt</h1>
|
||||||
<h4 class="mt-0">Email: x@x.x</h4>
|
<h4 class="mt-0">Navn: Claus Trasbo</h4>
|
||||||
<span class="text-center sde-black-20 mt-1">+45 xx xx xx xx</span>
|
<h4 class="mt-0">Email: ctr@sde.dk</h4>
|
||||||
<a class="btn text-center btn-sde-blue" href="tel:+45" id="call">Tilkald x</a>
|
<h4 class="mt-0">Forstander for Erhvervskollegiet</h4>
|
||||||
<h4 class="mt-3">Email: x@x.x</h4>
|
<span class="text-center sde-black-20 mt-1">+45 40 88 65 15 og +45 63 12 65 15</span>
|
||||||
<span class="text-center sde-black-20 mt-1">+45 xx xx xx xx</span>
|
<a class="btn text-center btn-sde-blue mt-1" href="tel:+4540886515">Ring</a>
|
||||||
<a class="btn text-center btn-sde-blue" href="tel:+45" id="call">Tilkald x</a>
|
|
||||||
|
<h4 class="mt-2">Navn: Birgitte True</h4>
|
||||||
|
<h4 class="mt-0">Email: bit@sde.dk</h4>
|
||||||
|
<h4 class="mt-0">Telefontid:</h4>
|
||||||
|
<h4 class="mt-0">Mandag-Torsdag kl. 8.00-15.00</h4>
|
||||||
|
<h4 class="mt-0">Fredag kl. 8.00-12.00</h4>
|
||||||
|
<span class="text-center sde-black-20 mt-1">+45 63 12 67 15</span>
|
||||||
|
<a class="btn text-center btn-sde-blue mt-1" href="tel:+4563126715">Ring</a>
|
||||||
|
|
||||||
|
<h4 class="mt-2">Navn: Thomas Thomsen</h4>
|
||||||
|
<h4 class="mt-0">Email: thth@sde.dk</h4>
|
||||||
|
<h4 class="mt-0">Kollegieassistent</h4>
|
||||||
|
<span class="text-center sde-black-20 mt-1">+45 24 62 94 50</span>
|
||||||
|
<a class="btn text-center btn-sde-blue mt-1" href="tel:+4524629450">Ring</a>
|
||||||
|
|
||||||
|
<h4 class="mt-2">Navn: Anja Holm Brix</h4>
|
||||||
|
<h4 class="mt-0">Email: ahb@sde.dk</h4>
|
||||||
|
<h4 class="mt-0">Kollegieassistent</h4>
|
||||||
|
<span class="text-center sde-black-20 mt-1">+45 24 62 94 50</span>
|
||||||
|
<a class="btn text-center btn-sde-blue mt-1" href="tel:+4524629450">Ring</a>
|
||||||
|
|
||||||
|
<h4 class="mt-2">Navn: Britta Overgaard Brink Olsen</h4>
|
||||||
|
<h4 class="mt-0">Email: brio@sde.dk</h4>
|
||||||
|
<h4 class="mt-0">Kollegieassistent</h4>
|
||||||
|
<span class="text-center sde-black-20 mt-1">+45 24 62 94 50</span>
|
||||||
|
<a class="btn text-center btn-sde-blue mt-1" href="tel:+4524629450">Ring</a>
|
||||||
|
|
||||||
|
<h4 class="mt-2">Navn: Jesper Sandberg</h4>
|
||||||
|
<h4 class="mt-0">Email: jesa@sde.dk</h4>
|
||||||
|
<h4 class="mt-0">Kollegieassistent</h4>
|
||||||
|
<span class="text-center sde-black-20 mt-1">+45 24 62 94 50</span>
|
||||||
|
<a class="btn text-center btn-sde-blue mt-1" href="tel:+4524629450">Ring</a>
|
||||||
</main>
|
</main>
|
||||||
@endsection
|
@endsection
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
<img src="{{URL::asset('/images/icons/Galleri.svg')}}" alt="Galleri">
|
<img src="{{URL::asset('/images/icons/Galleri.svg')}}" alt="Galleri">
|
||||||
Galleri
|
Galleri
|
||||||
</a>
|
</a>
|
||||||
<a href="#">
|
<a href="{{ route("contacts.index") }}">
|
||||||
<img src="{{URL::asset('/images/icons/Kontoret.svg')}}" alt="Kontoret">
|
<img src="{{URL::asset('/images/icons/Kontoret.svg')}}" alt="Kontoret">
|
||||||
Kontoret
|
Kontoret
|
||||||
</a>
|
</a>
|
||||||
|
@ -40,6 +40,10 @@
|
||||||
<img src="{{URL::asset('/images/icons/Vagttelefon-hvid.svg')}}" alt="Vagttelefon">
|
<img src="{{URL::asset('/images/icons/Vagttelefon-hvid.svg')}}" alt="Vagttelefon">
|
||||||
Vagttelefon
|
Vagttelefon
|
||||||
</a>
|
</a>
|
||||||
|
<a href="#">
|
||||||
|
<img src="{{URL::asset('/images/icons/user-hvid.svg')}}" alt="Konto">
|
||||||
|
Konto
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@yield("content")
|
@yield("content")
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
{{--@extends("app.users.register")--}}
|
{{--@extends("app.users.register")--}}
|
||||||
|
|
||||||
{{--Events--}}
|
{{--Events--}}
|
||||||
{{----}}@extends("app.events.index")
|
{{--@extends("app.events.index")--}}
|
||||||
|
|
||||||
{{--Vagttelefon--}}
|
{{--Vagttelefon--}}
|
||||||
{{--@extends("app.vagttelefons.index")--}}
|
{{--@extends("app.vagttelefons.index")--}}
|
||||||
|
@ -21,7 +21,7 @@
|
||||||
{{--@extends("app.washing-reservations.index")--}}
|
{{--@extends("app.washing-reservations.index")--}}
|
||||||
|
|
||||||
{{--Menuplan--}}
|
{{--Menuplan--}}
|
||||||
{{--@extends("app.menuplans.index")--}}
|
{{----}}@extends("app.menuplans.index")
|
||||||
|
|
||||||
{{--Contact--}}
|
{{--Contact--}}
|
||||||
{{--@extends("app.contact.index")--}}
|
{{--@extends("app.contact.index")--}}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
@extends('app.layout.base')
|
@extends('app.layout.base')
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
|
<main>
|
||||||
<div class="d-flex col block-container mt-2">
|
<div class="d-flex col block-container mt-2">
|
||||||
<a href="" class="block text-center mb-1">Menu</a>
|
<a href="" class="block text-center mb-1">Menu</a>
|
||||||
<a href="" class="block text-center mb-1">Aktiviteter</a>
|
<a href="" class="block text-center mb-1">Aktiviteter</a>
|
||||||
|
@ -18,4 +19,5 @@
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
</main>
|
||||||
@endsection
|
@endsection
|
||||||
|
|
|
@ -26,7 +26,7 @@ Route::get("/logout", "UserController@logout")->name("users.logout");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Route::resource("contacts", "ContactController");
|
||||||
Route::resource("menu-plans", "MenuPlanController");
|
Route::resource("menu-plans", "MenuPlanController");
|
||||||
Route::resource("users", "UserController");
|
Route::resource("users", "UserController");
|
||||||
Route::resource("events", "EventController");
|
Route::resource("events", "EventController");
|
||||||
|
|
Loading…
Reference in New Issue