v1.3.2 - Fixed table css and removed pagination in backend
This commit is contained in:
@@ -11,73 +11,43 @@
|
||||
|
||||
|
||||
@section("content")
|
||||
|
||||
|
||||
<div class="risRos">
|
||||
<label for="risros">Vælg type feedback:</label>
|
||||
<select name="risRosName" id="risRosValue">
|
||||
<option selected="selected" name="all" value="all">Alle</option>
|
||||
<option name="ris" value="Ris">Ris</option>
|
||||
<option name="ros" value="Ros">Ros</option>
|
||||
<option name="andet" value="Andet">Andet</option>
|
||||
</select>
|
||||
<!-- Dont delete me sir :(
|
||||
<input class="checkbox-inline" type="checkbox" name="checkbox" id="ris" value="ris">
|
||||
<label for="efternavn">Ris</label>
|
||||
<input class="checkbox-inline" type="checkbox" name="checkbox" id="ros" value="ros">
|
||||
<label for="efternavn">Ros</label>
|
||||
-->
|
||||
</div>
|
||||
|
||||
|
||||
<table class="tbl">
|
||||
<tr>
|
||||
<table class="tbl" id="table_id">
|
||||
<thead>
|
||||
<th style="width: 6em;">Dato</th>
|
||||
<th>Feedback Besked</th>
|
||||
<th style="width: 7em;">Feedback type</th>
|
||||
@if(auth()->user()->can('feedback.delete'))
|
||||
<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/trashcan.svg') }}" alt="Delete"></th>
|
||||
@endif
|
||||
</tr>
|
||||
@foreach($feedback as $fb)
|
||||
<tr>
|
||||
<td>{{ date('d-m-Y', strtotime($fb->created_at)) }}</td>
|
||||
<td>{{ $fb->message }}</td>
|
||||
<td>{{ $fb->suggestion_form }}</td>
|
||||
@if(auth()->user()->can('feedback.delete'))
|
||||
<td><form method="post" action="{{ route("feedbacks.destroy", [ "feedback" => $fb ]) }}" class="w-100 nostyle">
|
||||
@csrf
|
||||
@method("delete")
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($feedback as $fb)
|
||||
<tr>
|
||||
<td>{{ date('d-m-Y', strtotime($fb->created_at)) }}</td>
|
||||
<td>{{ $fb->message }}</td>
|
||||
<td>{{ $fb->suggestion_form }}</td>
|
||||
@if(auth()->user()->can('feedback.delete'))
|
||||
<td><form method="post" action="{{ route("feedbacks.destroy", [ "feedback" => $fb ]) }}" class="w-100 nostyle">
|
||||
@csrf
|
||||
@method("delete")
|
||||
|
||||
<button onclick="return confirm('Are you sure you want to delete?');" class="w-100 nostyle" type="submit"><img class="w-100 cursor-pointer" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button>
|
||||
</form>
|
||||
</td>
|
||||
@endif
|
||||
</tr>
|
||||
@endforeach
|
||||
<button onclick="return confirm('Are you sure you want to delete?');" class="w-100 nostyle" type="submit"><img class="w-100 cursor-pointer" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button>
|
||||
</form>
|
||||
</td>
|
||||
@endif
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{{ $feedback->links() }}
|
||||
|
||||
|
||||
<script>
|
||||
$('#risRosValue').change(function () {
|
||||
$value = $('#risRosValue').find(":selected").val();
|
||||
$.ajax({
|
||||
type: 'get',
|
||||
url: '{{route('feedbacks.search')}}',
|
||||
data: {'option':$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
|
||||
|
||||
Reference in New Issue
Block a user