Ich Ich, gros commit
This commit is contained in:
@ -4,7 +4,7 @@
|
||||
@slot('title')
|
||||
@lang('Ajouter un karting')
|
||||
@endslot
|
||||
<form method="POST" action="{{ route('kart.store') }}">
|
||||
<form method="POST" action="{{ url('kart') }}">
|
||||
{{ csrf_field() }}
|
||||
@include('partials.form-group', [
|
||||
'title' => __('Nom'),
|
||||
|
60
resources/views/kart/index.blade.php
Executable file
60
resources/views/kart/index.blade.php
Executable file
@ -0,0 +1,60 @@
|
||||
@extends('layouts.loggedform')
|
||||
@section('card')
|
||||
@component('components.card')
|
||||
@slot('title')
|
||||
@lang('Liste des kartings - ') <a href="{{route("kart.create")}}"><i class="far fa-plus-square"></i></a>
|
||||
@endslot
|
||||
|
||||
<table class="table table-bordered" id="pilots-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Nom du karting</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<script type="text/javascript">
|
||||
var tableKarts = '';
|
||||
|
||||
|
||||
window.deletePilot = function (id) {
|
||||
$.ajax({
|
||||
url: '/kart/'+id,
|
||||
type: 'DELETE', // user.destroy
|
||||
success: function(result) {
|
||||
console.log('OK');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
window.reloadData = function (id, name) {
|
||||
|
||||
|
||||
document.cookie = "active_kartid=" + id;
|
||||
document.cookie = "active_kartname=" + name;
|
||||
|
||||
if (name != null)
|
||||
$('#btnChoiceKartTitle').html(name);
|
||||
}
|
||||
|
||||
$(() => {
|
||||
|
||||
tableKarts = $('#pilots-table').DataTable({
|
||||
processing: true,
|
||||
ajax: '/getkartsalldata',
|
||||
columns: [
|
||||
{
|
||||
data: 'id',
|
||||
searchable: false,
|
||||
render:
|
||||
function (data, type, row, meta) {
|
||||
return '<a onclick="deleteKart(' + data + ');tableKarts.row( $(this).parents(\'tr\') ).remove().draw();"><i class="far fa-trash-alt"></i></a>';
|
||||
}
|
||||
},
|
||||
{data: 'name'}
|
||||
]
|
||||
});
|
||||
})
|
||||
</script>
|
||||
@endcomponent
|
||||
@endsection
|
Reference in New Issue
Block a user