v1.4.1 - Small fixes

This commit is contained in:
frederikpyt
2020-10-07 08:23:26 +02:00
parent 505ed3710b
commit 159c3f3764
10 changed files with 44 additions and 68 deletions
@@ -10,47 +10,41 @@
@endsection
@section("content")
<table class="tbl mt-1">
<tr>
<table class="tbl mt-1" id="table_id">
<thead>
<th>Tilmeldtes Fornavn</th>
<th>Tilmeldtes Efternavn</th>
<th>Tilmeldtes Tlf Nr</th>
<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/trashcan.svg') }}" alt="Delete"></th>
</tr>
@foreach($events as $event)
@if ($event->name_first != null && $event->name_last != null && $event->phone != null && $event->event_id != null && $event->user_id != null)
<tr>
<td>{{ $event->name_first }}</td>
<td>{{ $event->name_last }}</td>
<td>{{ $event->phone }}</td>
<td><form method="post" action="{{ route("events.destroy", [ "event" => $event->event_id ]) }}" class="w-100 nostyle">
@csrf
@method("delete")
</thead>
<tbody>
@foreach($events as $event)
@if ($event->name_first != null && $event->name_last != null && $event->phone != null && $event->event_id != null && $event->user_id != null)
<tr>
<td>{{ $event->name_first }}</td>
<td>{{ $event->name_last }}</td>
<td>{{ $event->phone }}</td>
<td><form method="post" action="{{ route("events.destroy", [ "event" => $event->event_id ]) }}" class="w-100 nostyle">
@csrf
@method("delete")
<button name="signup" value="{{ $event->user_id }}" class="w-100 nostyle" onclick="return confirm('Are you sure you want to delete?');" type="submit"><img class="w-100 cursor-pointer" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button>
</form>
</td>
</tr>
@endif
@endforeach
<button name="signup" value="{{ $event->user_id }}" class="w-100 nostyle" onclick="return confirm('Are you sure you want to delete?');" type="submit"><img class="w-100 cursor-pointer" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button>
</form>
</td>
</tr>
@endif
@endforeach
</tbody>
</table>
<script>
$('#search').on('keyup', function () {
$value = $(this).val();
$.ajax({
type: 'get',
url: '{{route('events.search')}}',
data: {'search':$value},
success:function (data) {
$('tbody').html(data);
},
error:function (data) {
console.log(data);
}
});
})
</script>
@endsection
@section('scripts')
<script>
$(document).ready( function () {
$('#table_id').DataTable({
columnDefs: [
{ orderable: false, targets: [-1] }
]
});
});
</script>
@endsection
@@ -2,7 +2,11 @@
@extends("admin.layout.header")
@section("title")
Home - Admin Panel
Dashboard - Admin Panel
@endsection
@section("path")
<a href="{{ route('root.index') }}" class="text-white">Dashboard</a> /
@endsection
@section("content")
@@ -6,7 +6,7 @@
@endsection
@section("path")
<a href="{{ route('news.index') }}" class="text-white">Opret Nyheder</a> /
<a href="{{ route('news.index') }}" class="text-white">Vis Nyheder</a> /
@endsection
@section("content")
@@ -23,13 +23,5 @@
{!!$event->description!!}
</div>
<button style="margin-top: auto" onclick="window.history.back()" class="btn btn-sde-blue text-white mb-1 mt-1" >{{__('msg.tilbage')}}</button>
</main>
@endsection