[WIP] Refactor architecture, models
This commit is contained in:
@@ -1,16 +1,13 @@
|
||||
@extends('layout.index', [
|
||||
'title' => __('Shop.sections.title'),
|
||||
'subtitle' => __('Shop.sections.add'),
|
||||
'breadcrumb' => [__('Shop.sections.title'), __('Shop.sections.add')]
|
||||
'title' => __('Shop.categories.title'),
|
||||
'subtitle' => __('Shop.categories.add'),
|
||||
'breadcrumb' => [__('Shop.categories.title'), __('Shop.categories.list')]
|
||||
])
|
||||
|
||||
@include('boilerplate::load.fileinput')
|
||||
|
||||
@section('content')
|
||||
|
||||
{{ Form::open(['route' => 'Shop.Admin.Sections.store', 'id' => 'form', 'autocomplete' => 'off', 'files' => true]) }}
|
||||
|
||||
@include('Shop.Admin.Sections.form')
|
||||
{{ Form::open(['route' => 'Shop.Admin.Categories.store', 'id' => 'form', 'autocomplete' => 'off', 'files' => true]) }}
|
||||
@include('Shop.Admin.Categories.form')
|
||||
</form>
|
||||
|
||||
@endsection
|
||||
|
||||
@@ -1,16 +1,14 @@
|
||||
@extends('layout.index', [
|
||||
'title' => __('Shop.species.title'),
|
||||
'subtitle' => __('Shop.species.edit'),
|
||||
'breadcrumb' => ['Familles']
|
||||
'title' => __('Shop.categories.title'),
|
||||
'subtitle' => __('Shop.categories.edit'),
|
||||
'breadcrumb' => [__('Shop.categories.title'), __('Shop.categories.list')]
|
||||
])
|
||||
|
||||
@section('content')
|
||||
|
||||
{{ Form::open(['route' => 'Shop.Admin.Species.store', 'id' => 'form', 'autocomplete' => 'off']) }}
|
||||
<input type="hidden" name="id" value="{{ $specie['id'] }}">
|
||||
|
||||
@include('Shop.Admin.Species.form')
|
||||
|
||||
{{ Form::open(['route' => 'Shop.Admin.Categories.store', 'id' => 'form', 'autocomplete' => 'off']) }}
|
||||
<input type="hidden" name="id" value="{{ $id }}">
|
||||
@include('Shop.Admin.Categories.form')
|
||||
</form>
|
||||
|
||||
@endsection
|
||||
|
||||
@@ -1,8 +1,35 @@
|
||||
@include('boilerplate::load.fileinput')
|
||||
@include('boilerplate::load.select2')
|
||||
@include('boilerplate::load.tinymce')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
{{ Form::label('name', 'Nom') }}
|
||||
@include('components.input', ['name' => 'name', 'value' => isset($name) ? $name : null, 'required' => true])
|
||||
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
{{ Form::label('name', 'Nom') }}
|
||||
@include('components.input', ['name' => 'name', 'value' => isset($name) ? $name : null, 'required' => true])
|
||||
</div>
|
||||
<div class="col-6">
|
||||
{{ Form::label('category_id', 'Catégorie parente') }}
|
||||
@include('components.select', ['name' => 'category_id', 'value' => isset($category_id) ? $category_id : null, 'class' => 'select2 form-control', 'required' => true])
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
{{ Form::label('tags', 'Tags') }}
|
||||
@include('components.select', ['name' => 'tags', 'value' => isset($tags) ? $tags : null, 'class' => 'select2 form-control', 'multiple' => true])
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
{{ Form::label('description', 'Description') }}
|
||||
@include('components.textarea', ['name' => 'description', 'value' => isset($description) ? $description : null, 'class' => 'editor', 'required' => true])
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
{{ Form::label('photo', 'Photos') }}
|
||||
@include('components.file', ['name' => 'photo', 'value' => isset($photo) ? $photo : null, 'required' => true])
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -14,3 +41,11 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@push('js')
|
||||
<script>
|
||||
$(function() {
|
||||
$(".select2").select2();
|
||||
$('.editor').tinymce({});
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
@@ -1,14 +1,14 @@
|
||||
@extends('layout.index', [
|
||||
'title' => __('Shop.Categories.title'),
|
||||
'subtitle' => __('Shop.Categories.list'),
|
||||
'breadcrumb' => [__('Shop.Categories.title')]
|
||||
'title' => __('Shop.categories.title'),
|
||||
'subtitle' => __('Shop.categories.list'),
|
||||
'breadcrumb' => [__('Shop.categories.title')]
|
||||
])
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="row pb-3">
|
||||
<div class="col text-right">
|
||||
<a href="{{ route('Shop.Admin.Categories.create') }}" class="btn btn-sm btn-success">{{ __('Shop.Categories.add') }} <i class="fa fa-plus"></i></a>
|
||||
<a href="{{ route('Shop.Admin.Categories.create') }}" class="btn btn-sm btn-success">{{ __('Shop.categories.add') }} <i class="fa fa-plus"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -23,6 +23,6 @@
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
@include('components.js.datatable', ['route' => '/Shop/Admin/Categories', 'model' => 'Categories'])
|
||||
@include('components.js.datatable', ['route' => '/Shop/Admin/Categories', 'model' => 'categories'])
|
||||
@endpush
|
||||
|
||||
|
||||
Reference in New Issue
Block a user