[WIP] Admin for Families, Genres and Species

This commit is contained in:
Ludovic CANDELLIER
2020-04-13 01:43:04 +02:00
parent 134e04d197
commit b7edcd402f
37 changed files with 655 additions and 334 deletions

View File

@@ -0,0 +1,13 @@
@extends('layout.index', [
'title' => __('shop.genres.title'),
'subtitle' => __('shop.genres.add'),
'breadcrumb' => [__('shop.genres.title'), __('shop.genres.add')]
])
@section('content')
{{ Form::open(['route' => 'Shop.Admin.genres.store', 'id' => 'form', 'autocomplete' => 'off']) }}
@include('Shop.Admin.genres.form')
</form>
@endsection

View File

@@ -0,0 +1,16 @@
@extends('layout.index', [
'title' => __('shop.genres.title'),
'subtitle' => __('shop.genres.edit'),
'breadcrumb' => ['Familles']
])
@section('content')
{{ Form::open(['route' => 'Shop.Admin.Genres.store', 'id' => 'form', 'autocomplete' => 'off']) }}
<input type="hidden" name="id" value="{{ $genre['id'] }}">
@include('Shop.Admin.Genres.form')
</form>
@endsection

View File

@@ -0,0 +1,24 @@
<div class="row">
<div class="col-md-8">
{{ Form::label('name', 'Nom') }}
@include('components.input', ['name' => 'name', 'value' => (isset($genre['name'])) ? $genre['name'] : null, 'required' => true])
{{ Form::label('alias', 'Alias') }}
@include('components.input', ['name' => 'alias', 'value' => (isset($genre['alias'])) ? $genre['alias'] : null, 'required' => true])
{{ Form::label('latin', 'Nom latin') }}
@include('components.input', ['name' => 'latin', 'value' => (isset($genre['latin'])) ? $genre['latin'] : null, 'required' => true])
{{ Form::label('description', 'Description') }}
@include('components.textarea', ['name' => 'description', 'value' => (isset($genre['description'])) ? $genre['description'] : null, 'class' => 'editor', 'required' => false])
</div>
</div>
<div class="row">
<div class="col-md-8">
<div class="float-right mt-3">
@include('components.button-save')
</div>
</div>
</div>

View File

@@ -0,0 +1,32 @@
@extends('layout.index', [
'title' => __('shop.genres.title'),
'subtitle' => __('shop.genres.list'),
'breadcrumb' => [__('shop.genres.title')]
])
@section('content')
<div class="row pb-3">
<div class="col text-right">
<a href="{{ route('Shop.Admin.Genres.create') }}" class="btn btn-sm btn-success">{{ __('shop.genres.add') }} <i class="fa fa-plus"></i></a>
</div>
</div>
{{$dataTable->table()}}
@endsection
@push('scripts')
{{$dataTable->scripts()}}
<script>
$('#genres-table').on( 'draw.dt', function () {
$('.btn-edit').click(function() {
url = '/Shop/Admin/Genres/edit/' + $(this).data('id');
window.location = url;
});
});
</script>
@endpush

View 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