aboutsummaryrefslogtreecommitdiff
path: root/resources
diff options
context:
space:
mode:
authorMateja <mail@matejamaric.com>2020-11-16 20:15:43 +0100
committerMateja <mail@matejamaric.com>2020-11-16 20:15:43 +0100
commit26bdfee839f4b8fb18beb1a9770fc758ad20c267 (patch)
tree1b928e64a2eab9f97f60d8ac1011fac379af71b5 /resources
parent03616b700748fe4e44eea484a4d7679121517791 (diff)
downloadyota-laravel-26bdfee839f4b8fb18beb1a9770fc758ad20c267.tar.gz
yota-laravel-26bdfee839f4b8fb18beb1a9770fc758ad20c267.zip
AJAX filtering reservations on admin panel...
Diffstat (limited to 'resources')
-rw-r--r--resources/views/pages/reservations.blade.php106
1 files changed, 72 insertions, 34 deletions
diff --git a/resources/views/pages/reservations.blade.php b/resources/views/pages/reservations.blade.php
index 66b4d7e..06c0335 100644
--- a/resources/views/pages/reservations.blade.php
+++ b/resources/views/pages/reservations.blade.php
@@ -4,10 +4,24 @@
@section('navbar', View::make('inc.navbar'))
+@section('scripts')
+ <script src="{{ asset('js/reservations.js') }}"></script>
+@endsection
+
@section('content')
-@if (count($data) > 0)
-<div class="table-responsive">
- <table class="table table-striped table-bordered" style="white-space:nowrap;"><!-- table-hover -->
+<input type="hidden" name="csrf-token" content="{{ csrf_token() }}">
+<label for="call-sign">Filter by special callsign: </label>
+<select id="call-sign">
+ <option value="all">All</option>
+ @if (count($signs) > 0)
+ @foreach ($signs as $sign)
+ <option value="{{ $sign->sign }}">{{ $sign->sign }}</option>
+ @endforeach
+ @endif
+</select>
+
+<div class="table-responsive mt-2">
+ <table id="ajax-table" class="table table-striped table-bordered" style="white-space:nowrap;"><!-- table-hover -->
<thead class="thead-dark">
<tr>
<th>ID</th>
@@ -16,47 +30,71 @@
<th>QSO</th>
<th>From</th>
<th>To</th>
+ <th>Special Callsign</th>
<th>Frequencies</th>
<th>Modes</th>
- <th>Special Callsign</th>
<th>Operator Name</th>
<th>Operator Email</th>
<th>Operator Phone</th>
<th>Actions</th>
</tr>
- @foreach ($data as $row)
- <tr>
- <td class="align-middle">{{ $row->id }}</td>
- @if ($row->approved)
- <td class="align-middle"><input type="checkbox" checked></td>
- @else
- <td class="align-middle"><input type="checkbox"></td>
- @endif
- <td class="align-middle">{{ $row->operatorCall }}</td>
- <td class="align-middle">{{ $row->qso }}</td>
- <td class="align-middle">{{ $row->fromTime }}</td>
- <td class="align-middle">{{ $row->toTime }}</td>
- <td class="align-middle">{{ $row->frequencies }}</td>
- <td class="align-middle">{{ $row->modes }}</td>
- <td class="align-middle">{{ $row->specialCall }}</td>
- <td class="align-middle">{{ $row->operatorName }}</td>
- <td class="align-middle">{{ $row->operatorEmail }}</td>
- <td class="align-middle">{{ $row->operatorPhone }}</td>
- <td>
- <button class="btn btn-primary">Update</button>
- <button class="btn btn-warning">Restore</button>
- <button class="btn btn-danger">Delete</button>
- </td>
- </tr>
- @endforeach
</thead>
<tbody>
</tbody>
</table>
</div>
-@else
-<div class="text-center">
- <strong>There are currently no reservations.</strong>
-</div>
-@endif
+{{--@if (count($data) > 0)--}}
+{{--<div class="table-responsive">--}}
+ {{--<table class="table table-striped table-bordered" style="white-space:nowrap;"><!-- table-hover -->--}}
+ {{--<thead class="thead-dark">--}}
+ {{--<tr>--}}
+ {{--<th>ID</th>--}}
+ {{--<th>Approved</th>--}}
+ {{--<th>Operator Callsign</th>--}}
+ {{--<th>QSO</th>--}}
+ {{--<th>From</th>--}}
+ {{--<th>To</th>--}}
+ {{--<th>Frequencies</th>--}}
+ {{--<th>Modes</th>--}}
+ {{--<th>Special Callsign</th>--}}
+ {{--<th>Operator Name</th>--}}
+ {{--<th>Operator Email</th>--}}
+ {{--<th>Operator Phone</th>--}}
+ {{--<th>Actions</th>--}}
+ {{--</tr>--}}
+ {{--</thead>--}}
+ {{--<tbody>--}}
+ {{--@foreach ($data as $row)--}}
+ {{--<tr>--}}
+ {{--<td class="align-middle">{{ $row->id }}</td>--}}
+ {{--@if ($row->approved)--}}
+ {{--<td class="align-middle"><input type="checkbox" checked></td> --}}
+ {{--@else--}}
+ {{--<td class="align-middle"><input type="checkbox"></td> --}}
+ {{--@endif--}}
+ {{--<td class="align-middle">{{ $row->operatorCall }}</td>--}}
+ {{--<td class="align-middle">{{ $row->qso }}</td>--}}
+ {{--<td class="align-middle">{{ $row->fromTime }}</td>--}}
+ {{--<td class="align-middle">{{ $row->toTime }}</td>--}}
+ {{--<td class="align-middle">{{ $row->frequencies }}</td>--}}
+ {{--<td class="align-middle">{{ $row->modes }}</td>--}}
+ {{--<td class="align-middle">{{ $row->specialCall }}</td>--}}
+ {{--<td class="align-middle">{{ $row->operatorName }}</td>--}}
+ {{--<td class="align-middle">{{ $row->operatorEmail }}</td>--}}
+ {{--<td class="align-middle">{{ $row->operatorPhone }}</td>--}}
+ {{--<td>--}}
+ {{--<button class="btn btn-primary">Update</button>--}}
+ {{--<button class="btn btn-warning">Restore</button>--}}
+ {{--<button class="btn btn-danger">Delete</button>--}}
+ {{--</td>--}}
+ {{--</tr>--}}
+ {{--@endforeach--}}
+ {{--</tbody>--}}
+ {{--</table>--}}
+{{--</div>--}}
+{{--@else--}}
+{{--<div class="text-center">--}}
+ {{--<strong>There are currently no reservations.</strong>--}}
+{{--</div>--}}
+{{--@endif--}}
@endsection()