Ajout du titre du produit sur l'article
This commit is contained in:
@@ -17,6 +17,7 @@ var jsMain = [
|
|||||||
// 'node_modules/jQuery-QueryBuilder/dist/js/jquery-builder.standalone.min.js',
|
// 'node_modules/jQuery-QueryBuilder/dist/js/jquery-builder.standalone.min.js',
|
||||||
/* 'node_modules/jQuery-QueryBuilder/dist/i18n/query-builder.fr.js', */
|
/* 'node_modules/jQuery-QueryBuilder/dist/i18n/query-builder.fr.js', */
|
||||||
/* 'node_modules/isotope-layout/dist/isotope.pkgd.min.js', */
|
/* 'node_modules/isotope-layout/dist/isotope.pkgd.min.js', */
|
||||||
|
'node_modules/bootstrap4-toggle/js/bootstrap4-toggle.min.js',
|
||||||
'node_modules/wew.js/dist/wew.min.js',
|
'node_modules/wew.js/dist/wew.min.js',
|
||||||
'node_modules/jquery.are-you-sure/jquery.are-you-sure.js',
|
'node_modules/jquery.are-you-sure/jquery.are-you-sure.js',
|
||||||
/* 'node_modules/letteringjs/jquery.lettering.js', */
|
/* 'node_modules/letteringjs/jquery.lettering.js', */
|
||||||
@@ -39,6 +40,7 @@ var cssMain = [
|
|||||||
// 'node_modules/bootstrap-slider/dist/css/bootstrap-slider.min.css',
|
// 'node_modules/bootstrap-slider/dist/css/bootstrap-slider.min.css',
|
||||||
// 'node_modules/jQuery-QueryBuilder/dist/css/query-builder.default.min.css',
|
// 'node_modules/jQuery-QueryBuilder/dist/css/query-builder.default.min.css',
|
||||||
'node_modules/animate.css/animate.min.css',
|
'node_modules/animate.css/animate.min.css',
|
||||||
|
'node_modules/bootstrap4-toggle/css/bootstrap4-toggle.min.css',
|
||||||
'node_modules/jqtree/jqtree.css',
|
'node_modules/jqtree/jqtree.css',
|
||||||
// 'build/css/modal-option.css',
|
// 'build/css/modal-option.css',
|
||||||
'build/css/shadow.css',
|
'build/css/shadow.css',
|
||||||
@@ -60,6 +62,7 @@ var jsDataTables = [
|
|||||||
'node_modules/datatables.net-buttons/js/buttons.print.min.js',
|
'node_modules/datatables.net-buttons/js/buttons.print.min.js',
|
||||||
'node_modules/datatables.net-buttons/js/buttons.colVis.min.js',
|
'node_modules/datatables.net-buttons/js/buttons.colVis.min.js',
|
||||||
'node_modules/datatables.net-colreorder/js/dataTables.colReorder.min.js',
|
'node_modules/datatables.net-colreorder/js/dataTables.colReorder.min.js',
|
||||||
|
'node_modules/datatables.net-colreorder-bs4/js/dataTables.colReorder-bs4.min.js',
|
||||||
'node_modules/datatables.net-fixedheader/js/dataTables.fixedHeader.min.js',
|
'node_modules/datatables.net-fixedheader/js/dataTables.fixedHeader.min.js',
|
||||||
'node_modules/datatables.net-fixedheader-bs4/js/fixedHeader.bootstrap4.min.js',
|
'node_modules/datatables.net-fixedheader-bs4/js/fixedHeader.bootstrap4.min.js',
|
||||||
'node_modules/datatables.net-fixedcolumns/js/dataTables.fixedColumns.min.js',
|
'node_modules/datatables.net-fixedcolumns/js/dataTables.fixedColumns.min.js',
|
||||||
@@ -67,6 +70,8 @@ var jsDataTables = [
|
|||||||
'node_modules/datatables.net-keytable/js/dataTables.keyTable.min.js',
|
'node_modules/datatables.net-keytable/js/dataTables.keyTable.min.js',
|
||||||
'node_modules/datatables.net-keytable-bs4/js/keyTable.bootstrap4.min.js',
|
'node_modules/datatables.net-keytable-bs4/js/keyTable.bootstrap4.min.js',
|
||||||
'node_modules/datatables.net-responsive/js/dataTables.responsive.min.js',
|
'node_modules/datatables.net-responsive/js/dataTables.responsive.min.js',
|
||||||
|
'node_modules/datatables.net-rowreorder/js/dataTables.rowReorder.min.js',
|
||||||
|
'node_modules/datatables.net-rowreorder-bs4/js/dataTables.rowReorder.botstrap4.min.js',
|
||||||
'node_modules/datatables.net-scroller/js/dataTables.scroller.min.js',
|
'node_modules/datatables.net-scroller/js/dataTables.scroller.min.js',
|
||||||
'node_modules/datatables.net-scroller-bs4/js/scroller.bootstrap4.min.js',
|
'node_modules/datatables.net-scroller-bs4/js/scroller.bootstrap4.min.js',
|
||||||
'node_modules/datatables.net-select/js/dataTables.select.min.js',
|
'node_modules/datatables.net-select/js/dataTables.select.min.js',
|
||||||
@@ -85,6 +90,7 @@ var cssDataTables = [
|
|||||||
'node_modules/datatables.net-fixedheader-bs4/css/fixedHeader.bootstrap4.min.css',
|
'node_modules/datatables.net-fixedheader-bs4/css/fixedHeader.bootstrap4.min.css',
|
||||||
'node_modules/datatables.net-fixedcolumns-bs4/css/fixedColumns.bootstrap4.min.css',
|
'node_modules/datatables.net-fixedcolumns-bs4/css/fixedColumns.bootstrap4.min.css',
|
||||||
'node_modules/datatables.net-keytable-bs4/css/keyTable.bootstrap4.min.css',
|
'node_modules/datatables.net-keytable-bs4/css/keyTable.bootstrap4.min.css',
|
||||||
|
'node_modules/datatables.net-rowreorder-bs4/css/rowReorder.bootstrap4.min.css',
|
||||||
'node_modules/datatables.net-scroller-bs4/css/scroller.bootstrap4.min.css',
|
'node_modules/datatables.net-scroller-bs4/css/scroller.bootstrap4.min.css',
|
||||||
'node_modules/datatables.net-select-bs4/css/select.bootstrap4.min.css',
|
'node_modules/datatables.net-select-bs4/css/select.bootstrap4.min.css',
|
||||||
'node_modules/yadcf/jquery.dataTables.yadcf.css',
|
'node_modules/yadcf/jquery.dataTables.yadcf.css',
|
||||||
|
|||||||
@@ -1,30 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\DataTables\Shop;
|
|
||||||
|
|
||||||
use Yajra\DataTables\Html\Column;
|
|
||||||
use App\DataTables\ParentDataTable as DataTable;
|
|
||||||
use App\Models\Shop\TagFamily;
|
|
||||||
|
|
||||||
class TagFamiliesDataTable extends DataTable
|
|
||||||
{
|
|
||||||
public $model_name = 'TagFamilies';
|
|
||||||
|
|
||||||
public function query(TagFamily $model)
|
|
||||||
{
|
|
||||||
return self::buildQuery($model);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function getColumns()
|
|
||||||
{
|
|
||||||
return [
|
|
||||||
Column::make('name'),
|
|
||||||
Column::computed('action')
|
|
||||||
->exportable(false)
|
|
||||||
->printable(false)
|
|
||||||
->width(120)
|
|
||||||
->addClass('text-center'),
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
27
app/DataTables/Shop/TagGroupsDataTable.php
Normal file
27
app/DataTables/Shop/TagGroupsDataTable.php
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\DataTables\Shop;
|
||||||
|
|
||||||
|
use Yajra\DataTables\Html\Column;
|
||||||
|
use App\DataTables\ParentDataTable as DataTable;
|
||||||
|
use App\Models\Shop\TagGroup;
|
||||||
|
|
||||||
|
class TagGroupsDataTable extends DataTable
|
||||||
|
{
|
||||||
|
public $model_name = 'TagGroups';
|
||||||
|
|
||||||
|
public function query(TagGroup $model)
|
||||||
|
{
|
||||||
|
$model = $model::withCount('tags');
|
||||||
|
return self::buildQuery($model);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function getColumns()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
Column::make('name'),
|
||||||
|
self::makeColumnButtons(),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -19,11 +19,7 @@ class TagsDataTable extends DataTable
|
|||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
Column::make('name'),
|
Column::make('name'),
|
||||||
Column::computed('action')
|
self::makeColumnButtons(),
|
||||||
->exportable(false)
|
|
||||||
->printable(false)
|
|
||||||
->width(120)
|
|
||||||
->addClass('text-center'),
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ use Illuminate\Http\Request;
|
|||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
|
|
||||||
use App\Repositories\Shop\Tags;
|
use App\Repositories\Shop\Tags;
|
||||||
use App\Repositories\Shop\TagFamilies;
|
use App\Repositories\Shop\TagGroups;
|
||||||
use App\DataTables\Shop\TagsDataTable;
|
use App\DataTables\Shop\TagsDataTable;
|
||||||
|
|
||||||
class TagController extends Controller
|
class TagController extends Controller
|
||||||
@@ -24,10 +24,7 @@ class TagController extends Controller
|
|||||||
public function create()
|
public function create()
|
||||||
{
|
{
|
||||||
$data = [];
|
$data = [];
|
||||||
$data['categories'] = Categories::getOptions();
|
$data['groups'] = TagGroups::getOptions();
|
||||||
$data['families'] = TagFamilies::getOptions();
|
|
||||||
$data['attribute_families'] = TagAttributeFamilies::getOptions();
|
|
||||||
$data['models'] = ['App\Models\Botanic\Specie' => 'Espèces', 'App\Models\Botanic\Variety' => 'Variétés'];
|
|
||||||
return view('Shop.Admin.Tags.create', $data);
|
return view('Shop.Admin.Tags.create', $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -46,7 +43,7 @@ class TagController extends Controller
|
|||||||
public function edit($id)
|
public function edit($id)
|
||||||
{
|
{
|
||||||
$data = Tags::get($id);
|
$data = Tags::get($id);
|
||||||
$data['categories'] = Tags::getOptions();
|
$data['groups'] = TagGroups::getOptions();
|
||||||
return view('Shop.Admin.Tags.edit', $data);
|
return view('Shop.Admin.Tags.edit', $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,62 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Http\Controllers\Shop\Admin;
|
|
||||||
|
|
||||||
use Illuminate\Http\Request;
|
|
||||||
use App\Http\Controllers\Controller;
|
|
||||||
|
|
||||||
use App\Repositories\Shop\TagFamily;
|
|
||||||
use App\DataTables\Shop\TagFamiliesDataTable;
|
|
||||||
|
|
||||||
class TagFamilyController extends Controller
|
|
||||||
{
|
|
||||||
public function index(TagFamiliesDataTable $dataTable)
|
|
||||||
{
|
|
||||||
return $dataTable->render('Shop.Admin.TagFamilies.list');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getDatatable(Request $request)
|
|
||||||
{
|
|
||||||
return TagFamilies::getTables($request->all());
|
|
||||||
}
|
|
||||||
|
|
||||||
public function create()
|
|
||||||
{
|
|
||||||
$data = [];
|
|
||||||
$data['categories'] = Categories::getOptions();
|
|
||||||
$data['families'] = TagFamilyFamilies::getOptions();
|
|
||||||
$data['attribute_families'] = TagFamilyAttributeFamilies::getOptions();
|
|
||||||
$data['models'] = ['App\Models\Botanic\Specie' => 'Espèces', 'App\Models\Botanic\Variety' => 'Variétés'];
|
|
||||||
return view('Shop.Admin.TagFamilies.create', $data);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function store(Request $request)
|
|
||||||
{
|
|
||||||
$ret = TagFamilies::store($request->all());
|
|
||||||
return redirect()->route('Shop.Admin.TagFamilies.index');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function show($id)
|
|
||||||
{
|
|
||||||
$data = TagFamilies::get($id);
|
|
||||||
return view('Shop.Admin.TagFamilies.view', $data);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function edit($id)
|
|
||||||
{
|
|
||||||
$data = TagFamilies::get($id);
|
|
||||||
$data['categories'] = TagFamilies::getOptions();
|
|
||||||
return view('Shop.Admin.TagFamilies.edit', $data);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function update(Request $request)
|
|
||||||
{
|
|
||||||
//
|
|
||||||
}
|
|
||||||
|
|
||||||
public function destroy($id)
|
|
||||||
{
|
|
||||||
return TagFamilies::destroy($id);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
56
app/Http/Controllers/Shop/Admin/TagGroupController.php
Normal file
56
app/Http/Controllers/Shop/Admin/TagGroupController.php
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\Shop\Admin;
|
||||||
|
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
|
||||||
|
use App\Repositories\Shop\TagGroup;
|
||||||
|
use App\DataTables\Shop\TagGroupsDataTable;
|
||||||
|
|
||||||
|
class TagGroupController extends Controller
|
||||||
|
{
|
||||||
|
public function index(TagGroupsDataTable $dataTable)
|
||||||
|
{
|
||||||
|
return $dataTable->render('Shop.Admin.TagGroups.list');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getDatatable(Request $request)
|
||||||
|
{
|
||||||
|
return TagGroups::getTables($request->all());
|
||||||
|
}
|
||||||
|
|
||||||
|
public function create($data)
|
||||||
|
{
|
||||||
|
return view('Shop.Admin.TagGroups.create', $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function store(Request $request)
|
||||||
|
{
|
||||||
|
$ret = TagGroups::store($request->all());
|
||||||
|
return redirect()->route('Shop.Admin.TagGroups.index');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function show($id)
|
||||||
|
{
|
||||||
|
$data = TagGroups::get($id);
|
||||||
|
return view('Shop.Admin.TagGroups.view', $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function edit($id)
|
||||||
|
{
|
||||||
|
$data = TagGroups::get($id);
|
||||||
|
return view('Shop.Admin.TagGroups.edit', $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function update(Request $request)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
public function destroy($id)
|
||||||
|
{
|
||||||
|
return TagGroups::destroy($id);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -23,8 +23,8 @@ class Shop
|
|||||||
->activeIfRoute(['Shop.Admin.ArticleAttributeFamilies.*'])->order(4);
|
->activeIfRoute(['Shop.Admin.ArticleAttributeFamilies.*'])->order(4);
|
||||||
$menu->addTo('shop', 'Attributs', [ 'route' => 'Shop.Admin.ArticleAttributeValues.index', 'permission' => 'backend_access' ])
|
$menu->addTo('shop', 'Attributs', [ 'route' => 'Shop.Admin.ArticleAttributeValues.index', 'permission' => 'backend_access' ])
|
||||||
->activeIfRoute(['Shop.Admin.ArticleAttributeValues.*'])->order(5);
|
->activeIfRoute(['Shop.Admin.ArticleAttributeValues.*'])->order(5);
|
||||||
$menu->addTo('shop', 'Familles de tags', [ 'route' => 'Shop.Admin.TagFamilies.index', 'permission' => 'backend_access' ])
|
$menu->addTo('shop', 'Familles de tags', [ 'route' => 'Shop.Admin.TagGroups.index', 'permission' => 'backend_access' ])
|
||||||
->activeIfRoute(['Shop.Admin.TagFamilies.*'])->order(6);
|
->activeIfRoute(['Shop.Admin.TagGroups.*'])->order(6);
|
||||||
$menu->addTo('shop', 'Tags', [ 'route' => 'Shop.Admin.Tags.index', 'permission' => 'backend_access' ])
|
$menu->addTo('shop', 'Tags', [ 'route' => 'Shop.Admin.Tags.index', 'permission' => 'backend_access' ])
|
||||||
->activeIfRoute(['Shop.Admin.Tags.*'])->order(7);
|
->activeIfRoute(['Shop.Admin.Tags.*'])->order(7);
|
||||||
|
|
||||||
|
|||||||
@@ -4,9 +4,15 @@ namespace App\Models\Shop;
|
|||||||
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
class TagFamily extends Model
|
class Tag extends Model
|
||||||
{
|
{
|
||||||
protected $guarded = ['id'];
|
protected $guarded = ['id'];
|
||||||
protected $table = 'tagging_tag_groups';
|
protected $table = 'tagging_tags';
|
||||||
|
|
||||||
|
|
||||||
|
public function group()
|
||||||
|
{
|
||||||
|
return $this->hasOne('App\Models\Shop\TagGroup');
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,9 +4,14 @@ namespace App\Models\Shop;
|
|||||||
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
class TagFamily extends Model
|
class TagGroup extends Model
|
||||||
{
|
{
|
||||||
protected $guarded = ['id'];
|
protected $guarded = ['id'];
|
||||||
protected $table = 'tagging_tag_groups';
|
protected $table = 'tagging_tag_groups';
|
||||||
|
|
||||||
|
public function tags()
|
||||||
|
{
|
||||||
|
return $this->hasMany('App\Models\Shop\Tag');
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -15,10 +15,15 @@ class TagGroups
|
|||||||
|
|
||||||
public static function getDatatable()
|
public static function getDatatable()
|
||||||
{
|
{
|
||||||
$model = TagGroup::orderBy('name');
|
$model = TagGroup::query();
|
||||||
return Datatables::of($model)->make(true);
|
return Datatables::of($model)->make(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function getOptions()
|
||||||
|
{
|
||||||
|
return TagGroup::get()->SortBy('name')->pluck('name','id')->toArray();
|
||||||
|
}
|
||||||
|
|
||||||
public static function getAll()
|
public static function getAll()
|
||||||
{
|
{
|
||||||
return TagGroup::orderBy('name','asc')->get();
|
return TagGroup::orderBy('name','asc')->get();
|
||||||
|
|||||||
54
app/Repositories/Shop/Tags.php
Normal file
54
app/Repositories/Shop/Tags.php
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Repositories\Shop;
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Storage;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
use Illuminate\Support\Str;
|
||||||
|
|
||||||
|
use Yajra\DataTables\DataTables;
|
||||||
|
|
||||||
|
use App\Models\Shop\TagGroup;
|
||||||
|
|
||||||
|
class TagGroups
|
||||||
|
{
|
||||||
|
|
||||||
|
public static function getDatatable()
|
||||||
|
{
|
||||||
|
$model = TagGroup::orderBy('name');
|
||||||
|
return Datatables::of($model)->make(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getAll()
|
||||||
|
{
|
||||||
|
return TagGroup::orderBy('name','asc')->get();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function get($id)
|
||||||
|
{
|
||||||
|
return TagGroup::find($id);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function store($data)
|
||||||
|
{
|
||||||
|
$id = isset($data['id']) ? $data['id'] : false;
|
||||||
|
$item = $id ? self::update($data) : self::create($data);
|
||||||
|
return $item->id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function create($data)
|
||||||
|
{
|
||||||
|
return TagGroup::create($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function update($data)
|
||||||
|
{
|
||||||
|
return TagGroup::find($id)->update($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function destroy($id)
|
||||||
|
{
|
||||||
|
return TagGroup::destroy($id);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -25,6 +25,7 @@
|
|||||||
"eduardokum/laravel-mail-auto-embed": "^1.0",
|
"eduardokum/laravel-mail-auto-embed": "^1.0",
|
||||||
"erjanmx/laravel-migrate-check": "^1.3",
|
"erjanmx/laravel-migrate-check": "^1.3",
|
||||||
"exyplis/eloquent-builder-macros": "^1.5",
|
"exyplis/eloquent-builder-macros": "^1.5",
|
||||||
|
"fico7489/laravel-eloquent-join": "^4.1",
|
||||||
"fideloper/proxy": "^4.0",
|
"fideloper/proxy": "^4.0",
|
||||||
"geo6/geocoder-php-addok-provider": "^1.1",
|
"geo6/geocoder-php-addok-provider": "^1.1",
|
||||||
"gzero/eloquent-tree": "^3.1",
|
"gzero/eloquent-tree": "^3.1",
|
||||||
|
|||||||
@@ -64,8 +64,13 @@
|
|||||||
"datatables.net-keytable-bs4": "^2.5.0",
|
"datatables.net-keytable-bs4": "^2.5.0",
|
||||||
"datatables.net-plugins": "^1.10.19",
|
"datatables.net-plugins": "^1.10.19",
|
||||||
"datatables.net-responsive": "^2.2.3",
|
"datatables.net-responsive": "^2.2.3",
|
||||||
|
"datatables.net-rowgroup": "^1.1.2",
|
||||||
|
"datatables.net-rowgroup-bs4": "^1.1.2",
|
||||||
|
"datatables.net-rowreorder": "^1.2.7",
|
||||||
|
"datatables.net-rowreorder-bs4": "^1.2.7",
|
||||||
"datatables.net-scroller": "^2.0.0",
|
"datatables.net-scroller": "^2.0.0",
|
||||||
"datatables.net-scroller-bs4": "^2.0.0",
|
"datatables.net-scroller-bs4": "^2.0.0",
|
||||||
|
"datatables.net-searchpanes": "^1.1.0",
|
||||||
"datatables.net-select": "^1.3.0",
|
"datatables.net-select": "^1.3.0",
|
||||||
"datatables.net-select-bs4": "^1.3.0",
|
"datatables.net-select-bs4": "^1.3.0",
|
||||||
"daterangepicker": "^3.0.5",
|
"daterangepicker": "^3.0.5",
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<input type="hidden" name="id" value="{{ $id }}">
|
<input type="hidden" name="id" id="id" value="{{ $id }}">
|
||||||
@include('Shop.Admin.Articles.form')
|
@include('Shop.Admin.Articles.form')
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,8 @@
|
|||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="card card-primary card-outline card-outline-tabs">
|
<div class="card card-primary card-outline card-outline-tabs">
|
||||||
<div class="card-header p-0 border-bottom-0">
|
<div class="card-header p-0 border-bottom-0">
|
||||||
<ul class="nav nav-tabs" role="tablist">
|
|
||||||
|
<ul class="card-title nav nav-tabs ml-auto" role="tablist">
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="#characteristics" class="nav-link active" data-toggle="tab" aria-expanded="true">
|
<a href="#characteristics" class="nav-link active" data-toggle="tab" aria-expanded="true">
|
||||||
Caractéristiques
|
Caractéristiques
|
||||||
@@ -37,7 +38,15 @@
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<div class="tab-content p-3">
|
<div class="card-tools">
|
||||||
|
Actif
|
||||||
|
<input type="checkbox" name="active" class="active-checkbox" data-toggle="toggle" data-size="mini" data-width="50" data-height="25" data-onstyle="success" data-offstyle="danger">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="tab-content">
|
||||||
<div class="tab-pane active" id="characteristics">
|
<div class="tab-pane active" id="characteristics">
|
||||||
@include('Shop.Admin.Articles.partials.characteristics')
|
@include('Shop.Admin.Articles.partials.characteristics')
|
||||||
</div>
|
</div>
|
||||||
@@ -71,8 +80,17 @@
|
|||||||
@push('js')
|
@push('js')
|
||||||
<script>
|
<script>
|
||||||
$(function() {
|
$(function() {
|
||||||
|
|
||||||
|
$("#model_id").off('change').on('change', function(e) {
|
||||||
|
var model = $('#model_id').select2('data');
|
||||||
|
var name = model[0]['text'];
|
||||||
|
console.log(name);
|
||||||
|
$('input[name="name"]').val(name);
|
||||||
|
});
|
||||||
|
|
||||||
$(".select2").select2();
|
$(".select2").select2();
|
||||||
$('.editor').tinymce({});
|
$('.editor').tinymce({});
|
||||||
|
|
||||||
$('#model').change( function() {
|
$('#model').change( function() {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url : '{{ route('Botanic.Admin.Varieties.getSelect') }}',
|
url : '{{ route('Botanic.Admin.Varieties.getSelect') }}',
|
||||||
@@ -84,9 +102,20 @@
|
|||||||
data: data
|
data: data
|
||||||
});
|
});
|
||||||
// setOptions('#model_id',data);
|
// setOptions('#model_id',data);
|
||||||
|
//
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('.active-checkbox').bootstrapToggle();
|
||||||
|
|
||||||
|
$('.active-checkbox').off('change').on('change', function(e) {
|
||||||
|
var id = $('#id').val();
|
||||||
|
// handleAdmin.toggle(id, $(this).prop('checked'));
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
@endpush
|
@endpush
|
||||||
@@ -1,21 +1,6 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<div class="row">
|
|
||||||
<div class="col-8">
|
|
||||||
{{ Form::label('name', 'Nom') }}
|
|
||||||
@include('components.input', ['name' => 'name', 'value' => isset($name) ? $name : null, 'required' => true])
|
|
||||||
</div>
|
|
||||||
<div class="col-4">
|
|
||||||
{{ Form::label('family_id', 'Famille d\'articles') }}
|
|
||||||
@include('components.select', ['name' => 'family_id', 'list' => $families, 'value' => isset($family_id) ? $family_id : null, 'class' => 'select2 form-control'])
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-12">
|
|
||||||
{{ Form::label('categories', 'Catégories') }}
|
|
||||||
@include('components.select', ['name' => 'categories', 'list' => $categories, 'value' => isset($category_id) ? $category_id : null, 'class' => 'select2 form-control', 'multiple' => true])
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
{{ Form::label('model', 'Familles de produit') }}
|
{{ Form::label('model', 'Familles de produit') }}
|
||||||
@@ -26,12 +11,32 @@
|
|||||||
@include('components.select2', ['name' => 'model_id', 'id_name' => 'model_id', 'value' => isset($model_id) ? $model_id : null, 'class' => 'select2 form-control'])
|
@include('components.select2', ['name' => 'model_id', 'id_name' => 'model_id', 'value' => isset($model_id) ? $model_id : null, 'class' => 'select2 form-control'])
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-8">
|
||||||
|
{{ Form::label('name', 'Nom') }}
|
||||||
|
@include('components.input', ['name' => 'name', 'value' => isset($name) ? $name : null, 'required' => true])
|
||||||
|
</div>
|
||||||
|
<div class="col-4">
|
||||||
|
{{ Form::label('family_id', 'Famille d\'articles') }}
|
||||||
|
@include('components.select', ['name' => 'family_id', 'list' => $families, 'value' => isset($family_id) ? $family_id : null, 'class' => 'select2 form-control'])
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12">
|
||||||
|
{{ Form::label('categories', 'Catégories') }}
|
||||||
|
@include('components.select', ['name' => 'categories', 'list' => $categories, 'value' => isset($category_id) ? $category_id : null, 'class' => 'select2 form-control', 'multiple' => true])
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
{{ Form::label('tags', 'Tags') }}
|
{{ Form::label('tags', 'Tags') }}
|
||||||
@include('components.select', ['name' => 'tags', 'value' => isset($tags) ? $tags : null, 'class' => 'select2 form-control', 'multiple' => true])
|
@include('components.select', ['name' => 'tags', 'value' => isset($tags) ? $tags : null, 'class' => 'select2 form-control', 'multiple' => true])
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
{{ Form::label('description', 'Description') }}
|
{{ Form::label('description', 'Description') }}
|
||||||
|
|||||||
@@ -1,28 +0,0 @@
|
|||||||
@extends('layout.index', [
|
|
||||||
'title' => __('tag_families.title'),
|
|
||||||
'subtitle' => __('tag_families.create.title'),
|
|
||||||
'breadcrumb' => [__('tag_families.title'), __('tag_families.create.title')]
|
|
||||||
])
|
|
||||||
|
|
||||||
@include('boilerplate::load.fileinput')
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
|
|
||||||
{{ Form::open(['route' => 'Shop.Admin.ArticleFamilies.store', 'id' => 'article-family-form', 'autocomplete' => 'off', 'files' => true]) }}
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-12 mbl">
|
|
||||||
<a href="{{ route("Shop.Admin.TagFamilies.index") }}" class="btn btn-default">
|
|
||||||
{{ __('tag_families.list.title') }}
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<span class="btn-group pull-right">
|
|
||||||
@include('components.button-save')
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
@include('Shop.Admin.TagFamilies.form')
|
|
||||||
</form>
|
|
||||||
|
|
||||||
@endsection
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
@extends('layout.index', [
|
|
||||||
'title' => 'Famille d\'articles',
|
|
||||||
'subtitle' => 'Edition d\'une famille d\'article',
|
|
||||||
'breadcrumb' => ['Articles']
|
|
||||||
])
|
|
||||||
|
|
||||||
@include('boilerplate::load.fileinput')
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
|
|
||||||
{{ Form::open(['route' => 'Shop.Admin.TagFamilies.update', 'id' => 'article-family-form', 'autocomplete' => 'off', 'files' => true]) }}
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-12 mbl">
|
|
||||||
<a href="{{ route("Shop.Admin.TagFamilies.index") }}" class="btn btn-default">
|
|
||||||
{{ __('tag_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.TagFamilies.form')
|
|
||||||
</form>
|
|
||||||
|
|
||||||
@endsection
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
@include('boilerplate::load.tinymce')
|
|
||||||
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-8">
|
|
||||||
{{ Form::label('name', 'Nom') }}
|
|
||||||
@include('components.input', ['name' => 'name', 'value' => (isset($family['name'])) ? $family['name'] : null, 'required' => true])
|
|
||||||
|
|
||||||
{{ Form::label('description', 'Description') }}
|
|
||||||
@include('components.textarea', ['name' => 'description', 'value' => isset($description) ? $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>
|
|
||||||
|
|
||||||
@push('js')
|
|
||||||
<script>
|
|
||||||
$(function() {
|
|
||||||
$('.editor').tinymce({});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
@endpush
|
|
||||||
24
resources/views/Shop/Admin/TagGroups/create.blade.php
Normal file
24
resources/views/Shop/Admin/TagGroups/create.blade.php
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
@extends('layout.index', [
|
||||||
|
'title' => __('tag_groups.title'),
|
||||||
|
'subtitle' => __('tag_groups.create.title'),
|
||||||
|
'breadcrumb' => [__('tag_groups.title'), __('tag_groups.create.title')]
|
||||||
|
])
|
||||||
|
|
||||||
|
@include('boilerplate::load.fileinput')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
|
||||||
|
{{ Form::open(['route' => 'Shop.Admin.TagGroups.store', 'id' => 'tag-group-form', 'autocomplete' => 'off']) }}
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 mbl">
|
||||||
|
<a href="{{ route("Shop.Admin.TagGroups.index") }}" class="btn btn-default">
|
||||||
|
{{ __('tag_families.list.title') }}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@include('Shop.Admin.TagGroups.form')
|
||||||
|
</form>
|
||||||
|
|
||||||
|
@endsection
|
||||||
23
resources/views/Shop/Admin/TagGroups/edit.blade.php
Normal file
23
resources/views/Shop/Admin/TagGroups/edit.blade.php
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
@extends('layout.index', [
|
||||||
|
'title' => __('tag_groups.title'),
|
||||||
|
'subtitle' => __('tag_groups.edit.title'),
|
||||||
|
'breadcrumb' => [__('tag_groups.title'), __('tag_groups.edit.title')]
|
||||||
|
])
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
|
||||||
|
{{ Form::open(['route' => 'Shop.Admin.TagGroups.update', 'id' => 'tag-group-form', 'autocomplete' => 'off']) }}
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 mbl">
|
||||||
|
<a href="{{ route("Shop.Admin.TagGroups.index") }}" class="btn btn-default">
|
||||||
|
{{ __('tag_groups.list.title') }}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<input type="hidden" name="id" value="{{ $id }}">
|
||||||
|
@include('Shop.Admin.TagGroups.form')
|
||||||
|
</form>
|
||||||
|
|
||||||
|
@endsection
|
||||||
9
resources/views/Shop/Admin/TagGroups/form.blade.php
Normal file
9
resources/views/Shop/Admin/TagGroups/form.blade.php
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<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>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@include('components.save')
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<div class="row pb-3">
|
<div class="row pb-3">
|
||||||
<div class="col text-right">
|
<div class="col text-right">
|
||||||
<a href="{{ route('Shop.Admin.TagFamilies.create') }}" class="btn btn-sm btn-success">{{ __('Shop.Admin.ArticleFamilies.add') }} <i class="fa fa-plus"></i></a>
|
<a href="{{ route('Shop.Admin.TagGroups.create') }}" class="btn btn-sm btn-success">{{ __('Shop.Admin.TagGroups.add') }} <i class="fa fa-plus"></i></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -17,5 +17,5 @@
|
|||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@push('scripts')
|
@push('scripts')
|
||||||
@include('components.js.datatable', ['route' => '/Shop/Admin/TagFamilies', 'model' => 'TagFamilies'])
|
@include('components.js.datatable', ['route' => '/Shop/Admin/TagGroups', 'model' => 'TagGroups'])
|
||||||
@endpush
|
@endpush
|
||||||
@@ -3,11 +3,12 @@
|
|||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
{{ Form::label('name', 'Nom') }}
|
{{ Form::label('group_id', 'Groupe') }}
|
||||||
@include('components.input', ['name' => 'name', 'value' => (isset($family['name'])) ? $family['name'] : null, 'required' => true])
|
@include('components.select', ['name' => 'group_id', 'list' => isset($groups) ? $groups : null, 'value' => isset($group_id) ? $group_id : null, 'required' => true])
|
||||||
|
|
||||||
{{ Form::label('description', 'Description') }}
|
|
||||||
@include('components.textarea', ['name' => 'description', 'value' => isset($description) ? $description : null, 'class' => 'editor', 'required' => false])
|
{{ Form::label('name', 'Nom') }}
|
||||||
|
@include('components.input', ['name' => 'name', 'value' => isset($name) ? $name : null, 'required' => true])
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,12 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
Route::prefix('TagFamilies')->name('TagFamilies.')->group(function () {
|
|
||||||
Route::get('', 'TagFamilyController@index')->name('index');
|
|
||||||
Route::get('create', 'TagFamilyController@create')->name('create');
|
|
||||||
Route::delete('destroy', 'TagFamilyController@destroy')->name('destroy');
|
|
||||||
Route::post('update', 'TagFamilyController@update')->name('update');
|
|
||||||
Route::post('store', 'TagFamilyController@store')->name('store');
|
|
||||||
Route::get('edit/{id}', 'TagFamilyController@edit')->name('edit');
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
12
routes/Shop/Admin/TagGroups.php
Normal file
12
routes/Shop/Admin/TagGroups.php
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
Route::prefix('TagGroups')->name('TagGroups.')->group(function () {
|
||||||
|
Route::get('', 'TagGroupController@index')->name('index');
|
||||||
|
Route::get('create', 'TagGroupController@create')->name('create');
|
||||||
|
Route::delete('destroy', 'TagGroupController@destroy')->name('destroy');
|
||||||
|
Route::post('update', 'TagGroupController@update')->name('update');
|
||||||
|
Route::post('store', 'TagGroupController@store')->name('store');
|
||||||
|
Route::get('edit/{id}', 'TagGroupController@edit')->name('edit');
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
@@ -17,6 +17,6 @@ Route::middleware('auth')->prefix('Admin')->namespace('Admin')->name('Admin.')->
|
|||||||
include( __DIR__ . '/OrderPayments.php');
|
include( __DIR__ . '/OrderPayments.php');
|
||||||
include( __DIR__ . '/Orders.php');
|
include( __DIR__ . '/Orders.php');
|
||||||
include( __DIR__ . '/Tags.php');
|
include( __DIR__ . '/Tags.php');
|
||||||
include( __DIR__ . '/TagFamilies.php');
|
include( __DIR__ . '/TagGroups.php');
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user