diff --git a/app/DataTables/ParentDataTable.php b/app/DataTables/ParentDataTable.php
index 85c3f5b6..98a21664 100644
--- a/app/DataTables/ParentDataTable.php
+++ b/app/DataTables/ParentDataTable.php
@@ -36,7 +36,7 @@ class ParentDataTable extends DataTable
{
$buttons = '';
// $buttons .= '';
- $buttons .= '';
+ $buttons .= '';
$buttons .= '';
return $buttons;
}
@@ -82,9 +82,10 @@ class ParentDataTable extends DataTable
{
return $this->builder()
->setTableId($id)
+ ->parameters($this->getParameters())
->columns($this->getColumns())
->minifiedAjax()
- ->dom('Bfrtip')
+ ->dom($this->getDom())
->orderBy(0,'asc')
->buttons(
Button::make('export'),
@@ -92,6 +93,27 @@ class ParentDataTable extends DataTable
);
}
+ public function getParameters()
+ {
+ return [];
+ }
+
+ public function getDom()
+ {
+ $dom = $this->getDatatablesHeaderDefault();
+ $dom .= "rt";
+ $dom .= $this->getDatatablesFooterDefault();
+ return $dom;
+ }
+
+ public function getDatatablesHeaderDefault() {
+ return "<'row dt-toolbar-header'<'col-lg-4'l><'col-lg-4'B><'col-lg-4 text-right add'f>>";
+ }
+
+ public function getDatatablesFooterDefault() {
+ return "<'row dt-toolbar-footer'<'col-md-6'i><'col-md-6'p>>";
+ }
+
/**
* Get filename for export.
*
diff --git a/app/DataTables/Shop/ArticleAttributeFamiliesDataTable.php b/app/DataTables/Shop/ArticleAttributeFamiliesDataTable.php
index f7858e53..6aeceff0 100644
--- a/app/DataTables/Shop/ArticleAttributeFamiliesDataTable.php
+++ b/app/DataTables/Shop/ArticleAttributeFamiliesDataTable.php
@@ -12,15 +12,15 @@ class ArticleAttributeFamiliesDataTable extends DataTable
public function query(ArticleAttributeFamily $model)
{
- $model = $model::withCount(['values']);
+ $model = $model::withCount(['Attributes']);
return self::buildQuery($model);
}
protected function getColumns()
{
return [
- Column::make('name'),
- Column::make('values_count')->title('Nb valeurs')->searchable(false),
+ Column::make('name')->title('Nom'),
+ Column::make('attributes_count')->title('Nb attributs')->searchable(false)->addClass('text-right'),
self::makeColumnButtons(),
];
}
diff --git a/app/DataTables/Shop/ArticleAttributeValuesDataTable.php b/app/DataTables/Shop/ArticleAttributeValuesDataTable.php
index 5f3c7fdd..60ba3eaf 100644
--- a/app/DataTables/Shop/ArticleAttributeValuesDataTable.php
+++ b/app/DataTables/Shop/ArticleAttributeValuesDataTable.php
@@ -12,15 +12,15 @@ class ArticleAttributeValuesDataTable extends DataTable
public function query(ArticleAttributeValue $model)
{
- $model = $model::with(['attribute_family']);
+ $model = $model::with(['ArticleAttributeFamily']);
return self::buildQuery($model);
}
protected function getColumns()
{
return [
- Column::make('attribute_family.name')->title('Famille d\'attributs') ,
- Column::make('value'),
+ Column::make('value')->title('Attributs'),
+ Column::make('article_attribute_family.name')->title('Famille d\'attributs')->sortable(false),
self::makeColumnButtons(),
];
}
diff --git a/app/DataTables/Shop/ArticleFamiliesDataTable.php b/app/DataTables/Shop/ArticleFamiliesDataTable.php
index 8fef4ad7..0b170519 100644
--- a/app/DataTables/Shop/ArticleFamiliesDataTable.php
+++ b/app/DataTables/Shop/ArticleFamiliesDataTable.php
@@ -12,13 +12,15 @@ class ArticleFamiliesDataTable extends DataTable
public function query(ArticleFamily $model)
{
+ $model = $model::withCount('Articles');
return self::buildQuery($model);
}
protected function getColumns()
{
return [
- Column::make('name'),
+ Column::make('name')->title('Nom'),
+ Column::make('articles_count')->title('Nb articles')->addClass('text-right'),
self::makeColumnButtons(),
];
}
diff --git a/app/DataTables/Shop/CategoriesDataTable.php b/app/DataTables/Shop/CategoriesDataTable.php
index e690d53e..2eb3d2e9 100644
--- a/app/DataTables/Shop/CategoriesDataTable.php
+++ b/app/DataTables/Shop/CategoriesDataTable.php
@@ -18,7 +18,7 @@ class CategoriesDataTable extends DataTable
protected function getColumns()
{
return [
- Column::make('name'),
+ Column::make('name')->title('Nom'),
self::makeColumnButtons(),
];
}
diff --git a/app/Http/Controllers/Shop/Admin/ArticleAttributeValueController.php b/app/Http/Controllers/Shop/Admin/ArticleAttributeValueController.php
index 6595c8e9..76057079 100644
--- a/app/Http/Controllers/Shop/Admin/ArticleAttributeValueController.php
+++ b/app/Http/Controllers/Shop/Admin/ArticleAttributeValueController.php
@@ -20,6 +20,13 @@ class ArticleAttributeValueController extends Controller
return ArticleAttributeValues::getTables($request->all());
}
+ public function getOptionsByFamily(Request $request)
+ {
+ $id = $request->input('family_id');
+ return response()->json(ArticleAttributeValues::getSelectByFamily($id));
+ }
+
+
public function create()
{
return view('Shop.Admin.ArticleAttributeValues.create');
diff --git a/app/Http/Controllers/Shop/Admin/ArticleController.php b/app/Http/Controllers/Shop/Admin/ArticleController.php
index 5b7e10ca..c6ce259b 100644
--- a/app/Http/Controllers/Shop/Admin/ArticleController.php
+++ b/app/Http/Controllers/Shop/Admin/ArticleController.php
@@ -31,7 +31,8 @@ class ArticleController extends Controller
$data['families'] = ArticleFamilies::getOptions();
$data['attribute_families'] = ArticleAttributeFamilies::getOptions();
$data['tags_list'] = TagGroups::getTreeTags();
- $data['models'] = ['App\Models\Botanic\Specie' => 'Espèces', 'App\Models\Botanic\Variety' => 'Variétés'];
+ // $data['models'] = ['App\Models\Botanic\Specie' => 'Espèces', 'App\Models\Botanic\Variety' => 'Variétés'];
+ $data['models'] = ['App\Models\Botanic\Variety' => 'Variétés'];
return view('Shop.Admin.Articles.create', $data);
}
diff --git a/app/Models/Shop/ArticleAttributeFamily.php b/app/Models/Shop/ArticleAttributeFamily.php
index 3d634845..8e7151cf 100644
--- a/app/Models/Shop/ArticleAttributeFamily.php
+++ b/app/Models/Shop/ArticleAttributeFamily.php
@@ -9,9 +9,9 @@ class ArticleAttributeFamily extends Model
protected $guarded = ['id'];
protected $table = 'shop_article_attribute_families';
- public function Values()
+ public function Attributes()
{
- return $this->hasMany('App\Models\Shop\ArticleAttributeValue','attribute_family_id');
+ return $this->hasMany('App\Models\Shop\ArticleAttributeValue');
}
}
\ No newline at end of file
diff --git a/app/Models/Shop/ArticleAttributeValue.php b/app/Models/Shop/ArticleAttributeValue.php
index ec10f767..74afe4be 100644
--- a/app/Models/Shop/ArticleAttributeValue.php
+++ b/app/Models/Shop/ArticleAttributeValue.php
@@ -9,14 +9,14 @@ class ArticleAttributeValue extends Model
protected $guarded = ['id'];
protected $table = 'shop_article_attribute_values';
- public function AttributeFamily()
+ public function ArticleAttributeFamily()
{
return $this->belongsTo('App\Models\Shop\ArticleAttributeFamily');
}
public function scopeByFamily($query, $attribute_family_id)
{
- return $query->where('attribute_family_id', $attribute_family_id);
+ return $query->where('article_attribute_family_id', $attribute_family_id);
}
}
\ No newline at end of file
diff --git a/app/Repositories/Shop/ArticleAttributeValues.php b/app/Repositories/Shop/ArticleAttributeValues.php
index e7d073c8..78177563 100644
--- a/app/Repositories/Shop/ArticleAttributeValues.php
+++ b/app/Repositories/Shop/ArticleAttributeValues.php
@@ -27,12 +27,19 @@ class ArticleAttributeValues
public static function getOptions()
{
- return ArticleAttributeValue::get()->pluck('name','id')->toArray();
+ return ArticleAttributeValue::get()->pluck('value','id')->toArray();
}
- public static function getOptionsByFamily($attribute_family_id)
+ public static function getSelectByFamily($attribute_family_id)
{
- return ArticleAttributeValue::byFamily($attribute_family_id)->get()->pluck('name','id')->toArray();
+ // return ArticleAttributeValue::byFamily($attribute_family_id)->get()->pluck('value','id')->toArray();
+ $values = ArticleAttributeValue::byFamily($attribute_family_id)->get();
+ $data = [];
+ foreach ($values as $value)
+ {
+ $data[] = ['id' => $value->id, 'text' => $value->value];
+ }
+ return collect($data)->sortBy('text')->values()->all();
}
public static function store($data)
diff --git a/app/Repositories/Shop/Articles.php b/app/Repositories/Shop/Articles.php
index 24eec32a..f254d110 100644
--- a/app/Repositories/Shop/Articles.php
+++ b/app/Repositories/Shop/Articles.php
@@ -51,6 +51,17 @@ class Articles
return Article::destroy($id);
}
+ public static function getImages($id)
+ {
+ $variety = self::get($id);
+ $variety->getMedia();
+ foreach ($variety->media as $key => $media) {
+ $variety->media[$key]['url'] = $media->getUrl();
+ }
+ return $variety->media;
+ }
+
+
public static function deleteImage($id, $index)
{
$article = self::get($id);
diff --git a/build/js/include/appender.js b/build/js/include/appender.js
index 7dc4a8f2..495b1ab9 100644
--- a/build/js/include/appender.js
+++ b/build/js/include/appender.js
@@ -29,17 +29,17 @@
$(type).each(function(rowIndex) {
$(this).find('input[name]').each(function() {
var name = $(this).attr('name');
- name = name.replace(/\[[0-9]?\]$/, '['+rowIndex+']');
+ name = name.replace(/\[[0-9]?\]/g, '['+rowIndex+']');
$(this).attr('name',name);
});
$(this).find('select[name]').each(function() {
var name = $(this).attr('name');
- name = name.replace(/\[[0-9]?\]$/, '['+rowIndex+']');
+ name = name.replace(/\[[0-9]?\]/g, '['+rowIndex+']');
$(this).attr('name',name);
});
$(this).find('textarea[name]').each(function() {
var name = $(this).attr('name');
- name = name.replace(/\[[0-9]?\]$/, '['+rowIndex+']');
+ name = name.replace(/\[[0-9]?\]/g, '['+rowIndex+']');
$(this).attr('name',name);
});
$(this).find('.appender').each(function() {
diff --git a/config/datatables-html.php b/config/datatables-html.php
index 2b0995fd..7149d638 100644
--- a/config/datatables-html.php
+++ b/config/datatables-html.php
@@ -5,7 +5,7 @@ return [
* Default table attributes when generating the table.
*/
'table' => [
- 'class' => 'table',
+ 'class' => 'table table-striped table-hover va-middle',
'id' => 'dataTableBuilder',
],
diff --git a/resources/lang/fr/shop.php b/resources/lang/fr/shop.php
index ab85d430..a7990d0c 100644
--- a/resources/lang/fr/shop.php
+++ b/resources/lang/fr/shop.php
@@ -30,6 +30,42 @@ return [
'successdel' => 'L\'article a été correctement effacé',
'confirmdelete' => 'Confirmez-vous la suppression de l\'article ?',
],
+ 'article_families' => [
+ 'title' => 'Familles d\'articles',
+ 'description' => 'Gérer les familles d\'articles',
+ 'add' => 'Ajouter une famille d\'articles',
+ 'edit' => 'Editer une famille d\'articles',
+ 'del' => 'Effacer une famille d\'articles',
+ 'list' => 'Liste des familles d\'articles',
+ 'successadd' => 'La famille d\'articles été correctement ajoutée',
+ 'successmod' => 'La famille d\'articles a été correctement modifiée',
+ 'successdel' => 'La famille d\'articles a été correctement effacée',
+ 'confirmdelete' => 'Confirmez-vous la suppression de la famille d\'articles ?',
+ ],
+ 'article_attribute_families' => [
+ 'title' => 'Familles d\'attributs',
+ 'description' => 'Gérer les familles d\'attributs',
+ 'add' => 'Ajouter une famille d\'attributs',
+ 'edit' => 'Editer une famille d\'attributs',
+ 'del' => 'Effacer une famille d\'attributs',
+ 'list' => 'Liste des familles d\'attributs',
+ 'successadd' => 'La famille d\'attributs été correctement ajoutée',
+ 'successmod' => 'La famille d\'attributs a été correctement modifiée',
+ 'successdel' => 'La familles d\'attributs a été correctement effacée',
+ 'confirmdelete' => 'Confirmez-vous la suppression de la famille d\'attributs ?',
+ ],
+ 'article_attribute_values' => [
+ 'title' => 'Attributs d\'articles',
+ 'description' => 'Gérer les attributs d\'articles',
+ 'add' => 'Ajouter un attribut d\'articles',
+ 'edit' => 'Editer un attribut d\'articles',
+ 'del' => 'Effacer un attribut d\'articles',
+ 'list' => 'Liste des attributs d\'articles',
+ 'successadd' => 'L\'attribut d\'articles été correctement ajouté',
+ 'successmod' => 'L\'attribut d\'articles a été correctement modifiée',
+ 'successdel' => 'L\'attribut d\'articles a été correctement effacée',
+ 'confirmdelete' => 'Confirmez-vous la suppression de l\'attribut d\'article ?',
+ ],
'tags' => [
'title' => 'Tags',
'description' => 'Gérer les tags',
diff --git a/resources/views/Botanic/Admin/Families/list.blade.php b/resources/views/Botanic/Admin/Families/list.blade.php
index bd032a62..425aef39 100644
--- a/resources/views/Botanic/Admin/Families/list.blade.php
+++ b/resources/views/Botanic/Admin/Families/list.blade.php
@@ -5,15 +5,7 @@
])
@section('content')
-
-
-
- {{$dataTable->table()}}
-
+ @include('components.datatable', ['route' => route('Botanic.Admin.Families.create'), 'label' => __('Botanic.families.add')])
@endsection
@push('scripts')
diff --git a/resources/views/Botanic/Admin/Genres/list.blade.php b/resources/views/Botanic/Admin/Genres/list.blade.php
index 5919aded..7345a94c 100644
--- a/resources/views/Botanic/Admin/Genres/list.blade.php
+++ b/resources/views/Botanic/Admin/Genres/list.blade.php
@@ -5,15 +5,7 @@
])
@section('content')
-
-
-
- {{$dataTable->table()}}
-
+ @include('components.datatable', ['route' => route('Botanic.Admin.Genres.create'), 'label' => __('Botanic.genres.add')])
@endsection
@push('scripts')
diff --git a/resources/views/Botanic/Admin/Species/list.blade.php b/resources/views/Botanic/Admin/Species/list.blade.php
index 6f297715..7ac87c97 100644
--- a/resources/views/Botanic/Admin/Species/list.blade.php
+++ b/resources/views/Botanic/Admin/Species/list.blade.php
@@ -5,15 +5,7 @@
])
@section('content')
-
-
-
- {{$dataTable->table()}}
-
+ @include('components.datatable', ['route' => route('Botanic.Admin.Species.create'), 'label' => __('Botanic.species.add')])
@endsection
@push('scripts')
diff --git a/resources/views/Botanic/Admin/Varieties/list.blade.php b/resources/views/Botanic/Admin/Varieties/list.blade.php
index 74fe2996..09043388 100644
--- a/resources/views/Botanic/Admin/Varieties/list.blade.php
+++ b/resources/views/Botanic/Admin/Varieties/list.blade.php
@@ -5,15 +5,7 @@
])
@section('content')
-
-
-
- {{$dataTable->table()}}
-
+ @include('components.datatable', ['route' => route('Botanic.Admin.Varieties.create'), 'label' => __('Botanic.varieties.add')])
@endsection
@push('scripts')
diff --git a/resources/views/Shop/Admin/ArticleAttributeFamilies/create.blade.php b/resources/views/Shop/Admin/ArticleAttributeFamilies/create.blade.php
index 53d5e646..78075320 100644
--- a/resources/views/Shop/Admin/ArticleAttributeFamilies/create.blade.php
+++ b/resources/views/Shop/Admin/ArticleAttributeFamilies/create.blade.php
@@ -1,19 +1,19 @@
@extends('layout.index', [
- 'title' => __('article_families.title'),
- 'subtitle' => __('article_families.create.title'),
- 'breadcrumb' => [__('article_families.title'), __('article_families.create.title')]
+ 'title' => __('article_attribute_families.title'),
+ 'subtitle' => __('article_attribute_families.create.title'),
+ 'breadcrumb' => [__('article_attribute_families.title'), __('article_attribute_families.create.title')]
])
@include('boilerplate::load.fileinput')
@section('content')
- {{ Form::open(['route' => 'Shop.Admin.ArticleFamilies.store', 'id' => 'article-family-form', 'autocomplete' => 'off', 'files' => true]) }}
+ {{ Form::open(['route' => 'Shop.Admin.ArticleAttributeFamilies.store', 'id' => 'article-attribute-family-form', 'autocomplete' => 'off']) }}
- @include('Shop.Admin.ArticleFamilies.form')
+ @include('Shop.Admin.ArticleAttributeFamilies.form')
@endsection
diff --git a/resources/views/Shop/Admin/ArticleAttributeFamilies/list.blade.php b/resources/views/Shop/Admin/ArticleAttributeFamilies/list.blade.php
index 4b5ab72f..ac365736 100644
--- a/resources/views/Shop/Admin/ArticleAttributeFamilies/list.blade.php
+++ b/resources/views/Shop/Admin/ArticleAttributeFamilies/list.blade.php
@@ -1,21 +1,13 @@
@extends('layout.index', [
- 'title' => __('Shop.article_families.title'),
- 'subtitle' => __('Shop.article_families.list'),
- 'breadcrumb' => [__('Shop.article_families.title')]
+ 'title' => __('Shop.article_attribute_families.title'),
+ 'subtitle' => __('Shop.article_attribute_families.list'),
+ 'breadcrumb' => [__('Shop.article_attribute_families.title')]
])
@section('content')
-
-
-
- {{$dataTable->table()}}
-
+ @include('components.datatable', ['route' => route('Shop.Admin.ArticleAttributeFamilies.create'), 'label' => __('Shop.article_attribute_families.add')])
@endsection
@push('scripts')
- @include('components.js.datatable', ['route' => '/Shop/Admin/ArticleFamilies', 'model' => 'articlefamilies'])
+ @include('components.js.datatable', ['route' => '/Shop/Admin/ArticleAttributeFamilies', 'model' => 'ArticleAttributefamilies'])
@endpush
\ No newline at end of file
diff --git a/resources/views/Shop/Admin/ArticleAttributeValues/list.blade.php b/resources/views/Shop/Admin/ArticleAttributeValues/list.blade.php
index 4b5ab72f..398a6657 100644
--- a/resources/views/Shop/Admin/ArticleAttributeValues/list.blade.php
+++ b/resources/views/Shop/Admin/ArticleAttributeValues/list.blade.php
@@ -1,21 +1,13 @@
@extends('layout.index', [
- 'title' => __('Shop.article_families.title'),
- 'subtitle' => __('Shop.article_families.list'),
- 'breadcrumb' => [__('Shop.article_families.title')]
+ 'title' => __('Shop.article_attribute_values.title'),
+ 'subtitle' => __('Shop.article_attribute_values.list'),
+ 'breadcrumb' => [__('Shop.article_attribute_values.title')]
])
@section('content')
-
-
-
- {{$dataTable->table()}}
-
+ @include('components.datatable', ['route' => route('Shop.Admin.ArticleAttributeValues.create'), 'label' => __('Shop.article_attribute_values.add')])
@endsection
@push('scripts')
- @include('components.js.datatable', ['route' => '/Shop/Admin/ArticleFamilies', 'model' => 'articlefamilies'])
+ @include('components.js.datatable', ['route' => '/Shop/Admin/ArticleAttributeValues', 'model' => 'articleattributes'])
@endpush
\ No newline at end of file
diff --git a/resources/views/Shop/Admin/ArticleFamilies/list.blade.php b/resources/views/Shop/Admin/ArticleFamilies/list.blade.php
index 4b5ab72f..424a08ad 100644
--- a/resources/views/Shop/Admin/ArticleFamilies/list.blade.php
+++ b/resources/views/Shop/Admin/ArticleFamilies/list.blade.php
@@ -5,15 +5,7 @@
])
@section('content')
-
-
-
- {{$dataTable->table()}}
-
+ @include('components.datatable', ['route' => route('Shop.Admin.ArticleFamilies.create'), 'label' => __('Shop.article_families.add')])
@endsection
@push('scripts')
diff --git a/resources/views/Shop/Admin/Articles/create.blade.php b/resources/views/Shop/Admin/Articles/create.blade.php
index b1f5bd89..731e3d4f 100644
--- a/resources/views/Shop/Admin/Articles/create.blade.php
+++ b/resources/views/Shop/Admin/Articles/create.blade.php
@@ -1,7 +1,7 @@
@extends('layout.index', [
- 'title' => __('articles.title'),
- 'subtitle' => __('articles.create.title'),
- 'breadcrumb' => [__('articles.title'), __('articles.create.title')]
+ 'title' => __('Shop.articles.title'),
+ 'subtitle' => __('Shop.articles.add'),
+ 'breadcrumb' => [__('Shop.articles.title'), __('Shop.articles.add')]
])
@include('boilerplate::load.fileinput')
@@ -9,7 +9,6 @@
@section('content')
{{ Form::open(['route' => 'Shop.Admin.Articles.store', 'id' => 'article-form', 'autocomplete' => 'off', 'files' => true]) }}
-
@include('Shop.Admin.Articles.form')
diff --git a/resources/views/Shop/Admin/Articles/edit.blade.php b/resources/views/Shop/Admin/Articles/edit.blade.php
index d0ecc2f2..b8d3ab40 100644
--- a/resources/views/Shop/Admin/Articles/edit.blade.php
+++ b/resources/views/Shop/Admin/Articles/edit.blade.php
@@ -13,7 +13,7 @@
- {{ __('lots.list.title') }}
+ {{ __('Shop.articles.title') }}
diff --git a/resources/views/Shop/Admin/Articles/form.blade.php b/resources/views/Shop/Admin/Articles/form.blade.php
index 74659ffe..1f874351 100644
--- a/resources/views/Shop/Admin/Articles/form.blade.php
+++ b/resources/views/Shop/Admin/Articles/form.blade.php
@@ -79,43 +79,17 @@
@push('js')
@endpush
\ No newline at end of file
diff --git a/resources/views/Shop/Admin/Articles/list.blade.php b/resources/views/Shop/Admin/Articles/list.blade.php
index 9d1ac939..146c94dc 100644
--- a/resources/views/Shop/Admin/Articles/list.blade.php
+++ b/resources/views/Shop/Admin/Articles/list.blade.php
@@ -5,15 +5,7 @@
])
@section('content')
-
-
-
- {{$dataTable->table()}}
-
+ @include('components.datatable', ['route' => route('Shop.Admin.Articles.create'), 'label' => __('Shop.articles.add')])
@endsection
@push('scripts')
diff --git a/resources/views/Shop/Admin/Articles/partials/characteristics.blade.php b/resources/views/Shop/Admin/Articles/partials/characteristics.blade.php
index f9f3b05a..cf8e3077 100644
--- a/resources/views/Shop/Admin/Articles/partials/characteristics.blade.php
+++ b/resources/views/Shop/Admin/Articles/partials/characteristics.blade.php
@@ -49,3 +49,31 @@
@include('components.uploader.widget', ['delete_url' => route('Shop.Admin.Articles.deleteImage') ])
+
+@push('js')
+
+@endpush
\ No newline at end of file
diff --git a/resources/views/Shop/Admin/Articles/partials/prices.blade.php b/resources/views/Shop/Admin/Articles/partials/prices.blade.php
index 30e1ac1a..4d0aadd9 100644
--- a/resources/views/Shop/Admin/Articles/partials/prices.blade.php
+++ b/resources/views/Shop/Admin/Articles/partials/prices.blade.php
@@ -10,7 +10,9 @@
@endpush
diff --git a/resources/views/Shop/Admin/Articles/partials/prices/attributes.blade.php b/resources/views/Shop/Admin/Articles/partials/prices/attributes.blade.php
index c075fe44..622b50fe 100644
--- a/resources/views/Shop/Admin/Articles/partials/prices/attributes.blade.php
+++ b/resources/views/Shop/Admin/Articles/partials/prices/attributes.blade.php
@@ -1,4 +1,4 @@
@include('Shop.Admin.Articles.partials.prices.block_attribute_new')
-
+
diff --git a/resources/views/Shop/Admin/Articles/partials/prices/block_attribute_new.blade.php b/resources/views/Shop/Admin/Articles/partials/prices/block_attribute_new.blade.php
index 428122ee..e386c3f3 100644
--- a/resources/views/Shop/Admin/Articles/partials/prices/block_attribute_new.blade.php
+++ b/resources/views/Shop/Admin/Articles/partials/prices/block_attribute_new.blade.php
@@ -1,15 +1,12 @@
-
- {{ Form::label('quantity', 'Quantité') }}
- @include('components.input', ['name' => 'prices[][quantity][]', 'value' => (isset($quantity)) ? $quantity : 1, 'required' => true, 'class' => 'form-control-sm'])
-
-
+
+
{{ Form::label('attribute_family_id', 'Attributs') }}
- @include('components.select', ['name' => 'prices[][attribute_family_id][]', 'value' => (isset($attribute_value['attribute_family_id'])) ? $attribute_value['attribute_family_id'] : null, 'list' => $attribute_families, 'required' => true, 'class' => 'form-control form-control-sm'])
+ @include('components.select', ['name' => 'prices[][attributes][attribute_family_id]', 'value' => (isset($attribute_value['attribute_family_id'])) ? $attribute_value['attribute_family_id'] : null, 'list' => $attribute_families, 'required' => true, 'class' => 'select2 form-control form-control-sm attributes-family'])
-
+
{{ Form::label('attribute_value_id', 'Valeur') }}
- @include('components.select', ['name' => 'prices[][attribute_value_id][]', 'value' => (isset($attribute_value['id'])) ? $attribute_value['id'] : null, 'list' => (isset($attribute_values)) ? $attribute_values : null, 'required' => true, 'class' => 'form-control form-control-sm'])
+ @include('components.select', ['name' => 'prices[][attributes][attribute_value_id]', 'value' => (isset($attribute_value['id'])) ? $attribute_value['id'] : null, 'list' => (isset($attribute_values)) ? $attribute_values : null, 'required' => true, 'class' => 'select2 form-control form-control-sm attributes-value'])
diff --git a/resources/views/Shop/Admin/Articles/partials/prices/block_price_new.blade.php b/resources/views/Shop/Admin/Articles/partials/prices/block_price_new.blade.php
index 31cae55e..5129f32b 100644
--- a/resources/views/Shop/Admin/Articles/partials/prices/block_price_new.blade.php
+++ b/resources/views/Shop/Admin/Articles/partials/prices/block_price_new.blade.php
@@ -7,43 +7,39 @@
-
- {{ Form::label('tax_id', 'TVA') }}
- @include('components.select', ['name' => 'prices[][tax_id]', 'value' => (isset($tax_id)) ? $tax_id : null, 'list' => isset($taxes) ? $taxes : null, 'required' => true, 'class' => 'form-control form-control-sm'])
+
+ {{ Form::label('quantity', 'Quantité') }}
+ @include('components.number', ['name' => 'prices[0][quantity]', 'value' => (isset($quantity)) ? $quantity : 1, 'required' => true, 'class' => 'form-control-sm'])
-
- {{ Form::label('quantity', 'Quantité') }}
- @include('components.number', ['name' => 'prices[][quantity}', 'value' => (isset($quantity)) ? $quantity : 1, 'required' => true, 'class' => 'form-control-sm'])
+
+ @include('Shop.Admin.Articles.partials.prices.block_attribute_new')
+
+
+
+ {{ Form::label('tax_id', 'TVA') }}
+ @include('components.select', ['name' => 'prices[0][tax_id]', 'value' => (isset($tax_id)) ? $tax_id : null, 'list' => isset($taxes) ? $taxes : null, 'required' => true, 'class' => 'form-control form-control-sm'])
{{ Form::label('price', 'Prix HT') }}
- @include('components.money', ['name' => 'prices[][price}', 'value' => (isset($price)) ? $price : 0, 'required' => true, 'class' => 'form-control-sm'])
+ @include('components.money', ['name' => 'prices[0][price]', 'value' => (isset($price)) ? $price : 0, 'required' => true, 'class' => 'form-control-sm'])
{{ Form::label('price_taxed', 'Prix TTC') }}
- @include('components.money', ['name' => 'prices[][price_taxed]', 'value' => (isset($price_ht)) ? $price_ht : 0, 'required' => true, 'class' => 'form-control-sm'])
+ @include('components.money', ['name' => 'prices[0][price_taxed]', 'value' => (isset($price_ht)) ? $price_ht : 0, 'required' => true, 'class' => 'form-control-sm'])
-
+
-
-
-
-
-
-
-
-
- @include('Shop.Admin.Articles.partials.prices.attributes')
+
diff --git a/resources/views/Shop/Admin/TagGroups/list.blade.php b/resources/views/Shop/Admin/TagGroups/list.blade.php
index 7a174c80..e3e93f4e 100644
--- a/resources/views/Shop/Admin/TagGroups/list.blade.php
+++ b/resources/views/Shop/Admin/TagGroups/list.blade.php
@@ -5,15 +5,7 @@
])
@section('content')
-
-
-
- {{$dataTable->table()}}
-
+ @include('components.datatable', ['route' => route('Shop.Admin.TagGroups.create'), 'label' => __('Shop.tag_groups.add')])
@endsection
@push('scripts')
diff --git a/resources/views/Shop/Admin/Tags/list.blade.php b/resources/views/Shop/Admin/Tags/list.blade.php
index a5be97ae..9ac528c3 100644
--- a/resources/views/Shop/Admin/Tags/list.blade.php
+++ b/resources/views/Shop/Admin/Tags/list.blade.php
@@ -5,17 +5,10 @@
])
@section('content')
-
-
-
- {{$dataTable->table()}}
-
+ @include('components.datatable', ['route' => route('Shop.Admin.Tags.create'), 'label' => __('Shop.tags.add')])
@endsection
+
@push('scripts')