[WIP] config Datatables/Webpack/Yajra
This commit is contained in:
22
resources/views/shop/admin/Species/create.blade.php
Normal file
22
resources/views/shop/admin/Species/create.blade.php
Normal file
@@ -0,0 +1,22 @@
|
||||
@extends('boilerplate::layout.index', [
|
||||
'title' => __('shop.families.title'),
|
||||
'subtitle' => __('shop.families.add'),
|
||||
'breadcrumb' => [__('shop.families.title'), __('shop.families.add')]
|
||||
])
|
||||
|
||||
@include('boilerplate::load.fileinput')
|
||||
|
||||
@section('content')
|
||||
|
||||
{{ Form::open(['route' => 'Shop.Admin.families.store', 'id' => 'form', 'autocomplete' => 'off', 'files' => true]) }}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12 text-right">
|
||||
@include('components.button-save')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('Shop.Admin.families.form')
|
||||
</form>
|
||||
|
||||
@endsection
|
||||
39
resources/views/shop/admin/Species/edit.blade.php
Normal file
39
resources/views/shop/admin/Species/edit.blade.php
Normal file
@@ -0,0 +1,39 @@
|
||||
@extends('layout.index', [
|
||||
'title' => 'Familles',
|
||||
'subtitle' => 'Edition d\'une famille',
|
||||
'breadcrumb' => ['Familles']
|
||||
])
|
||||
|
||||
@include('boilerplate::load.icheck')
|
||||
@include('boilerplate::load.fileinput')
|
||||
|
||||
@prepend('js')
|
||||
@include('components.js', ['js' => '/js/main.min.js'])
|
||||
@endprepend
|
||||
|
||||
@push('css')
|
||||
@include('components.css', ['css' => '/css/main.min.css'])
|
||||
@endpush
|
||||
|
||||
|
||||
@section('content')
|
||||
|
||||
{{ Form::open(['route' => 'Shop.Admin.Families.update', 'id' => 'lot-form', 'autocomplete' => 'off', 'files' => true]) }}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12 mbl">
|
||||
<a href="{{ route("Shop.Admin.Families.index") }}" class="btn btn-default">
|
||||
{{ __('families.list.title') }}
|
||||
</a>
|
||||
|
||||
<span class="btn-group pull-right">
|
||||
@include('components.button-save')
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="id" value="{{ $id }}">
|
||||
@include('Shop.Admin.Families.form')
|
||||
</form>
|
||||
|
||||
@endsection
|
||||
38
resources/views/shop/admin/Species/form.blade.php
Normal file
38
resources/views/shop/admin/Species/form.blade.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
{{ Form::label('name', 'Nom') }}
|
||||
@include('components.input', ['name' => 'name', 'value' => (isset($section['name'])) ? $section['name'] : null, 'required' => true])
|
||||
|
||||
{{ Form::label('description', 'Description') }}
|
||||
@include('components.textarea', ['name' => 'description', 'id_name' => 'description', 'value' => (isset($section['description'])) ? $section['description'] : null, 'required' => true])
|
||||
|
||||
{{ Form::label('description', 'Rubrique parente') }}
|
||||
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="row">
|
||||
<div class="col-md-12 row-new-lot-photo row-lot-photo mt-3">
|
||||
|
||||
<!--
|
||||
<p>
|
||||
<button type="button" class="btn btn-danger delete-new-lot-photo-btn"><i class="fa fa-minus-circle"></i></button>
|
||||
Photo <span class="row-photo-number"></span>
|
||||
</p>
|
||||
-->
|
||||
|
||||
<input name="lot_photos[][file]" type="file" class="file" data-show-upload="false" data-show-caption="true" data-msg-placeholder="Choisissez une photo">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('boilerplate::load.tinymce')
|
||||
|
||||
@push('js')
|
||||
<script>
|
||||
$(function() {
|
||||
$('#description').tinymce({});
|
||||
})
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
62
resources/views/shop/admin/Species/list.blade.php
Normal file
62
resources/views/shop/admin/Species/list.blade.php
Normal file
@@ -0,0 +1,62 @@
|
||||
@extends('boilerplate::layout.index', [
|
||||
'title' => __('shop.species.title'),
|
||||
'breadcrumb' => [__('shop.species.title')]
|
||||
])
|
||||
|
||||
@section('content')
|
||||
<div class="box">
|
||||
<div class="box-body">
|
||||
<table class="table table-striped table-hover va-middle" id="species-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
<input type="text" class="form-control-sm" style="max-width: 100px;">
|
||||
</th>
|
||||
<th>
|
||||
</th>
|
||||
<th class="text-right">
|
||||
<a href="{{ route('Shop.Admin.Species.create') }}" class="btn btn-sm btn-success">{{ __('shop.species.add') }} <i class="fa fa-plus"></i></a>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Nom</th>
|
||||
<th>Nb produits</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@include('boilerplate::load.datatables')
|
||||
|
||||
@push('js')
|
||||
<script>
|
||||
$(function () {
|
||||
|
||||
$('#species-table').dataTable();
|
||||
|
||||
$('#species-table').on('click', '.destroy', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
var href = $(this).attr('href');
|
||||
var line = $(this).closest('tr');
|
||||
|
||||
bootbox.confirm("{{ __('boilerplate::shop.admin.species.list.confirmdelete') }}", function (result) {
|
||||
if (result === false) return;
|
||||
|
||||
$.ajax({
|
||||
url: href,
|
||||
method: 'delete',
|
||||
headers: {'X-CSRF-TOKEN': '{{ csrf_token() }}'},
|
||||
success: function(){
|
||||
line.remove();
|
||||
growl("{{ __('boilerplate::shop.admin.species.list.deletesuccess') }}", 'success');
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
30
resources/views/shop/admin/Species/show.blade.php
Normal file
30
resources/views/shop/admin/Species/show.blade.php
Normal file
@@ -0,0 +1,30 @@
|
||||
@extends('layout.index', [
|
||||
'title' => __('products.title'),
|
||||
'subtitle' => __('products.title'),
|
||||
'breadcrumb' => [__('products.title')]
|
||||
])
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-offset-2 col-md-8">
|
||||
|
||||
<div class="box box-info">
|
||||
<div class="box-body">
|
||||
<div class="col-md-6">
|
||||
<h3>{{ name }}</h3>
|
||||
<h4>
|
||||
{{ $product.section.name }}<br>
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12">
|
||||
@include('components.carousel')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
Reference in New Issue
Block a user