v0.5.6 - Fixed Guide when destroying.
Added accountable in Event table to see who is the accountable for the event. Changed description field to CKEditor
This commit is contained in:
@@ -10,36 +10,34 @@
|
||||
@endsection
|
||||
|
||||
@section("content")
|
||||
<style>
|
||||
.ck-editor__main {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
</style>
|
||||
<script src="https://cdn.ckeditor.com/ckeditor5/21.0.0/classic/ckeditor.js"></script>
|
||||
<h1>Opret Aktivitet:</h1>
|
||||
<form method="post" action="{{ route("events.store") }}">
|
||||
@csrf
|
||||
<label for="name">Navn:</label>
|
||||
<label for="name">Event Navn:</label>
|
||||
<input type="text" name="name" id="name" max="60" required>
|
||||
<label for="description">Beskrivelse:</label>
|
||||
<input type="text" name="description" id="description" max="500" required>
|
||||
<label for="date">Aktivitet dato:</label>
|
||||
<label for="accountable">Event Ansvarlig:</label>
|
||||
<input type="text" name="accountable" id="accountable" required>
|
||||
<label for="description">Event Beskrivelse:</label>
|
||||
<textarea name="description" id="editor"></textarea>
|
||||
<label for="date">Event dato:</label>
|
||||
<input type="datetime-local" name="date" id="date" required>
|
||||
<input type="submit" class="btn btn-dark text-white" value="Opret">
|
||||
</form>
|
||||
|
||||
{{-- <table class="tbl">--}}
|
||||
{{-- <tr>--}}
|
||||
{{-- <th>ID</th>--}}
|
||||
{{-- <th>Fornavn</th>--}}
|
||||
{{-- <th>Efternavn</th>--}}
|
||||
{{-- <th>Email</th>--}}
|
||||
{{-- <th>Tlf nr</th>--}}
|
||||
{{-- <th style="width: 1px;"><img class="w-100" src="{{ asset('/images/icons/pencil.svg') }}" alt="Update"></th>--}}
|
||||
{{-- <th style="width: 1px;"><img class="w-100" src="{{ asset('/images/icons/trashcan.svg') }}" alt="Delete"></th>--}}
|
||||
{{-- </tr>--}}
|
||||
{{-- <tr>--}}
|
||||
{{-- <td>{ID}</td>--}}
|
||||
{{-- <td>{Fornavn}</td>--}}
|
||||
{{-- <td>{Efternavn}</td>--}}
|
||||
{{-- <td>{Email}</td>--}}
|
||||
{{-- <td>{TLF}</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>--}}
|
||||
{{-- </table>--}}
|
||||
<script>
|
||||
ClassicEditor
|
||||
.create( document.querySelector( '#editor' ))
|
||||
.then( editor => {
|
||||
console.log( editor );
|
||||
} )
|
||||
.catch( error => {
|
||||
console.error( error );
|
||||
} );
|
||||
</script>
|
||||
@endsection
|
||||
|
||||
@@ -16,8 +16,10 @@
|
||||
@method("PUT")
|
||||
<label for="event_title">Event Titel:</label>
|
||||
<input value="{{$event->name}}" type="text" name="name" id="event_title" required>
|
||||
<label for="accountable">Event Ansvarlig:</label>
|
||||
<input value="{{$event->accountable}}" type="text" name="accountable" id="accountable" required>
|
||||
<label for="description">Beskrivelse</label>
|
||||
<input value="{{$event->description}}" type="text" name="description" id="description" required>
|
||||
<input value="{!! $event->description !!}" type="text" name="description" id="description" required>
|
||||
<label for="date">Beskrivelse</label>
|
||||
<input value="{{$event->date}}" type="datetime-local" name="date" id="date" required>
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<table class="tbl mt-2">
|
||||
<tr>
|
||||
<th>Event Navn</th>
|
||||
<th>Event Beskrivelse</th>
|
||||
<th>Event Ansvarlig</th>
|
||||
<th>Event Dato</th>
|
||||
<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/eye.svg') }}" alt="Update"></th>
|
||||
<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/pencil.svg') }}" alt="Update"></th>
|
||||
@@ -32,7 +32,7 @@
|
||||
@foreach($events as $event)
|
||||
<tr>
|
||||
<td>{{ $event->name }}</td>
|
||||
<td>{{ $event->description }}</td>
|
||||
<td>{{ $event->accountable }}</td>
|
||||
<td>{{ \Illuminate\Support\Facades\Date::createFromTimeStamp(strtotime($event->date))->format('d/m/Y \k\l\. H:i') }}</td>
|
||||
<td><a href="{{ route("events.signups", [ "event" => $event ]) }}"><img class="w-100" src="{{ asset('/images/icons/eye-dark.svg') }}" alt="Update"></a></td>
|
||||
<td><a href="{{ route("events.edit", [ "event" => $event ]) }}"><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
|
||||
|
||||
Reference in New Issue
Block a user