little refactoring
This commit is contained in:
@@ -1,11 +1,9 @@
|
||||
@extends('layout.index', [
|
||||
'title' => __('shop.producers.title'),
|
||||
'subtitle' => __('shop.producers.add'),
|
||||
'breadcrumb' => [__('shop.producers.title'), __('shop.producers.add')]
|
||||
'title' => __('shop.producers.title'),
|
||||
'subtitle' => __('shop.producers.add'),
|
||||
'breadcrumb' => [__('shop.producers.title'), __('shop.producers.add')],
|
||||
])
|
||||
|
||||
@section('content')
|
||||
{{ Form::open(['route' => 'Admin.Shop.Producers.store', 'id' => 'form', 'autocomplete' => 'off', 'files' => true]) }}
|
||||
@include('Admin.Shop.Producers.form')
|
||||
</form>
|
||||
@include('Admin.Shop.Producers.form')
|
||||
@endsection
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
@extends('layout.index', [
|
||||
'title' => __('Shop.producers.title'),
|
||||
'subtitle' => __('Shop.producers.edit'),
|
||||
'breadcrumb' => [__('Shop.producers.title'), __('Shop.producers.edit')]
|
||||
'title' => __('Shop.producers.title'),
|
||||
'subtitle' => __('Shop.producers.edit'),
|
||||
'breadcrumb' => [__('Shop.producers.title'), __('Shop.producers.edit')],
|
||||
])
|
||||
|
||||
@section('content')
|
||||
{{ Form::open(['route' => 'Admin.Shop.Producers.store', 'id' => 'form', 'autocomplete' => 'off', 'files' => true]) }}
|
||||
<input type="hidden" name="id" id="id" value="{{ $producer['id'] }}">
|
||||
@include('Admin.Shop.Producers.form')
|
||||
</form>
|
||||
@include('Admin.Shop.Producers.form')
|
||||
@endsection
|
||||
|
||||
@@ -1,55 +1,67 @@
|
||||
{{ Form::open(['route' => 'Admin.Shop.Producers.store', 'id' => 'form', 'autocomplete' => 'off', 'files' => true]) }}
|
||||
<input type="hidden" name="id" id="id" value="{{ $producer['id'] ?? false }}">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="row mb-3">
|
||||
<div class="col-6">
|
||||
{{ Form::label('name', 'Nom') }}
|
||||
@include('components.form.input', ['name' => 'name', 'value' => $producer['name'] ?? null, 'required' => true])
|
||||
</div>
|
||||
<div class="col-6">
|
||||
{{ Form::label('name', 'Alias') }}
|
||||
@include('components.form.input', ['name' => 'alias', 'value' => $producer['alias'] ?? null, 'required' => true])
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<div class="row mb-3">
|
||||
<div class="col-6">
|
||||
@include('components.form.input', [
|
||||
'name' => 'name',
|
||||
'value' => $producer['name'] ?? null,
|
||||
'required' => true,
|
||||
'label' => 'Nom',
|
||||
])
|
||||
</div>
|
||||
<div class="col-6">
|
||||
@include('components.form.input', [
|
||||
'name' => 'alias',
|
||||
'value' => $producer['alias'] ?? null,
|
||||
'required' => true,
|
||||
'label' => 'Alias',
|
||||
])
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<div class="col-12">
|
||||
{{ Form::label('tags', 'Tags') }}
|
||||
@include('components.form.selects.select-tree', [
|
||||
'name' => 'tags[]',
|
||||
'list' => $tags_list,
|
||||
'values' => $producer['tags'] ?? null,
|
||||
'class' => 'select2 form-control',
|
||||
'multiple' => true
|
||||
])
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<div class="col-12">
|
||||
@include('components.form.selects.select-tree', [
|
||||
'name' => 'tags[]',
|
||||
'list' => $tags_list,
|
||||
'values' => $producer['tags'] ?? null,
|
||||
'class' => 'select2 form-control',
|
||||
'multiple' => true,
|
||||
'label' => 'Tags',
|
||||
])
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<div class="col-12">
|
||||
{{ Form::label('description', 'Description') }}
|
||||
@include('components.form.textarea', [
|
||||
'name' => 'description',
|
||||
'value' => $producer['description'] ?? null,
|
||||
'class' => 'editor',
|
||||
'rows' => 5,
|
||||
'required' => false,
|
||||
])
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<div class="col-12">
|
||||
@include('components.form.textarea', [
|
||||
'name' => 'description',
|
||||
'value' => $producer['description'] ?? null,
|
||||
'class' => 'editor',
|
||||
'rows' => 5,
|
||||
'required' => false,
|
||||
'label' => 'Description',
|
||||
])
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
@include('components.uploader.widget', [
|
||||
'load_url' => route('Admin.Shop.Merchandises.getImages', ['id' => $producer['id'] ?? false]),
|
||||
'delete_url' => route('Admin.Botanic.Varieties.deleteImage'),
|
||||
'name' => 'images',
|
||||
])
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
@include('components.uploader.widget', [
|
||||
'load_url' => route('Admin.Shop.Merchandises.getImages', ['id' => $producer['id'] ?? false]),
|
||||
'delete_url' => route('Admin.Botanic.Varieties.deleteImage'),
|
||||
'name' => 'images',
|
||||
])
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{{ form::close() }}
|
||||
|
||||
@include('components.save')
|
||||
<x-save />
|
||||
|
||||
@include('load.form.appender')
|
||||
@include('load.form.editor')
|
||||
@@ -60,12 +72,12 @@
|
||||
@include('boilerplate::load.tinymce')
|
||||
|
||||
@push('js')
|
||||
<script>
|
||||
$(function() {
|
||||
initSelect2();
|
||||
initChevron();
|
||||
initEditor();
|
||||
initSaveForm();
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
<script>
|
||||
$(function() {
|
||||
initSelect2();
|
||||
initChevron();
|
||||
initEditor();
|
||||
initSaveForm();
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
@extends('layout.index', [
|
||||
'title' => __('shop.producers.title'),
|
||||
'subtitle' => __('shop.producers.list'),
|
||||
'breadcrumb' => [__('Shop.producers.title')]
|
||||
'title' => __('shop.producers.title'),
|
||||
'subtitle' => __('shop.producers.list'),
|
||||
'breadcrumb' => [__('Shop.producers.title')],
|
||||
])
|
||||
|
||||
@section('content')
|
||||
@component('components.card')
|
||||
@include('components.datatable', ['route' => route('Admin.Shop.Producers.index'), 'model' => 'producers'])
|
||||
@endcomponent
|
||||
@component('components.card')
|
||||
@include('components.datatable', [
|
||||
'route' => route('Admin.Shop.Producers.index'),
|
||||
'model' => 'producers',
|
||||
])
|
||||
@endcomponent
|
||||
@endsection
|
||||
|
||||
|
||||
Reference in New Issue
Block a user