Ich Ich, gros commit

This commit is contained in:
bglacial
2018-10-08 22:31:58 +02:00
parent ecded0947f
commit b11b2befd7
49 changed files with 37276 additions and 11977 deletions

View File

@ -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'),

View 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