diff --git a/Gruntfile.js b/Gruntfile.js
index d350b430..002f596f 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -25,6 +25,7 @@ var jsMain = [
'node_modules/jqtree/tree.jquery.js',
'node_modules/numeral/min/numeral.min.js',
'node_modules/numeral/min/locales/fr.min.js',
+ 'build/js/include/plugins/jquery.hcaptions.js',
'build/js/include/url_on_tab.js',
'build/js/include/set_options.js',
// 'build/js/include/confirm.js',
diff --git a/app/DataTables/Shop/ArticleFamiliesDataTable.php b/app/DataTables/Shop/ArticleFamiliesDataTable.php
index 37eea8af..8fef4ad7 100644
--- a/app/DataTables/Shop/ArticleFamiliesDataTable.php
+++ b/app/DataTables/Shop/ArticleFamiliesDataTable.php
@@ -19,11 +19,7 @@ class ArticleFamiliesDataTable extends DataTable
{
return [
Column::make('name'),
- Column::computed('action')
- ->exportable(false)
- ->printable(false)
- ->width(120)
- ->addClass('text-center'),
+ self::makeColumnButtons(),
];
}
diff --git a/app/DataTables/Shop/TagGroupsDataTable.php b/app/DataTables/Shop/TagGroupsDataTable.php
index c9459c93..0c7e3648 100644
--- a/app/DataTables/Shop/TagGroupsDataTable.php
+++ b/app/DataTables/Shop/TagGroupsDataTable.php
@@ -20,6 +20,7 @@ class TagGroupsDataTable extends DataTable
{
return [
Column::make('name'),
+ Column::make('tags_count')->title('Nb de tags')->searchable(false)->addClass('text-right'),
self::makeColumnButtons(),
];
}
diff --git a/app/DataTables/Shop/TagsDataTable.php b/app/DataTables/Shop/TagsDataTable.php
index 13705561..01a2cdb9 100644
--- a/app/DataTables/Shop/TagsDataTable.php
+++ b/app/DataTables/Shop/TagsDataTable.php
@@ -12,13 +12,16 @@ class TagsDataTable extends DataTable
public function query(Tag $model)
{
+ $model = $model::with('group')->select(['tagging_tags.*']);
return self::buildQuery($model);
}
protected function getColumns()
{
return [
- Column::make('name'),
+ Column::make('group.name')->title('Groupe'),
+ Column::make('order')->title('Ordre'),
+ Column::make('name')->title('Nom'),
self::makeColumnButtons(),
];
}
diff --git a/app/Http/Controllers/Botanic/Admin/VarietyController.php b/app/Http/Controllers/Botanic/Admin/VarietyController.php
index 4b1f5dd7..9a719f24 100644
--- a/app/Http/Controllers/Botanic/Admin/VarietyController.php
+++ b/app/Http/Controllers/Botanic/Admin/VarietyController.php
@@ -7,6 +7,7 @@ use App\Http\Controllers\Controller;
use App\Repositories\Botanic\Varieties;
use App\Repositories\Botanic\Species;
+use App\Repositories\Shop\TagGroups;
use App\DataTables\Botanic\VarietiesDataTable;
use App\Models\Shop\Variety;
@@ -30,25 +31,32 @@ class VarietyController extends Controller
public function create()
{
- return view('Botanic.Admin.Varieties.create');
+ $data['tags_list'] = TagGroups::getTreeTags();
+ return view('Botanic.Admin.Varieties.create', $data);
}
public function store(Request $request)
{
- $ret = Varieties::store($request);
+ $data = $request->all();
+ $images = isset($data['images']) ? $data['images'] : false;
+ // dump($images);
+ // exit;
+ unset($data['images']);
+ $variety = Varieties::store($data);
+ Varieties::storeImages($variety, $images);
return redirect()->route('Botanic.Admin.Varieties.index');
}
public function show($id)
{
- $data = Varieties::get($id);
- return view('Botanic.Admin.Varieties.view', $data);
+ return view('Botanic.Admin.Varieties.view', Varieties::get($id));
}
public function edit($id)
{
- $data = Varieties::get($id);
+ $data = Varieties::getWithImages($id)->toArray();
$data['species'] = Species::getOptions();
+ $data['tags_list'] = TagGroups::getTreeTags();
return view('Botanic.Admin.Varieties.edit', $data);
}
@@ -57,4 +65,9 @@ class VarietyController extends Controller
return Varieties::destroy($id);
}
+ public function deleteImage($id)
+ {
+
+ }
+
}
diff --git a/app/Http/Controllers/Shop/Admin/ArticleController.php b/app/Http/Controllers/Shop/Admin/ArticleController.php
index a5cafe02..bda0d562 100644
--- a/app/Http/Controllers/Shop/Admin/ArticleController.php
+++ b/app/Http/Controllers/Shop/Admin/ArticleController.php
@@ -9,6 +9,7 @@ use App\Repositories\Shop\Articles;
use App\Repositories\Shop\ArticleAttributeFamilies;
use App\Repositories\Shop\ArticleFamilies;
use App\Repositories\Shop\Categories;
+use App\Repositories\Shop\TagGroups;
use App\DataTables\Shop\ArticlesDataTable;
class ArticleController extends Controller
@@ -29,6 +30,7 @@ class ArticleController extends Controller
$data['categories'] = Categories::getOptions();
$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'];
return view('Shop.Admin.Articles.create', $data);
}
@@ -49,6 +51,10 @@ class ArticleController extends Controller
{
$data = Articles::get($id);
$data['categories'] = Articles::getOptions();
+ $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'];
return view('Shop.Admin.Articles.edit', $data);
}
diff --git a/app/Http/Controllers/Shop/Admin/CategoryController.php b/app/Http/Controllers/Shop/Admin/CategoryController.php
index 0c945884..5fc3afe0 100644
--- a/app/Http/Controllers/Shop/Admin/CategoryController.php
+++ b/app/Http/Controllers/Shop/Admin/CategoryController.php
@@ -24,6 +24,7 @@ class CategoryController extends Controller
public function create()
{
$data = [];
+ $data['category_id'] = 0;
$data['categories'] = Categories::getOptions();
return view('Shop.Admin.Categories.create', $data);
}
@@ -42,7 +43,7 @@ class CategoryController extends Controller
public function edit($id)
{
- $data = Categories::get($id);
+ $data = Categories::get($id)->toArray();
$data['categories'] = Categories::getOptions();
return view('Shop.Admin.Categories.edit', $data);
}
diff --git a/app/Models/Botanic/Variety.php b/app/Models/Botanic/Variety.php
index f09ca53c..871bcdbe 100644
--- a/app/Models/Botanic/Variety.php
+++ b/app/Models/Botanic/Variety.php
@@ -3,9 +3,13 @@
namespace App\Models\Botanic;
use Illuminate\Database\Eloquent\Model;
+use Spatie\MediaLibrary\HasMedia\HasMedia;
+use Spatie\MediaLibrary\HasMedia\HasMediaTrait;
-class Variety extends Model
+class Variety extends Model implements HasMedia
{
+ use HasMediaTrait;
+
protected $guarded = ['id'];
protected $table = 'botanic_varieties';
@@ -13,4 +17,9 @@ class Variety extends Model
{
return $this->belongsTo('App\Models\Botanic\Specie');
}
+
+ public function Articles()
+ {
+ return $this->belongsTo('App\Models\Shop\Article','id','model_id');
+ }
}
\ No newline at end of file
diff --git a/app/Models/Shop/Article.php b/app/Models/Shop/Article.php
index 58c214b3..674c03c7 100644
--- a/app/Models/Shop/Article.php
+++ b/app/Models/Shop/Article.php
@@ -3,7 +3,8 @@
namespace App\Models\Shop;
use Illuminate\Database\Eloquent\Model;
-
+use Spatie\MediaLibrary\HasMedia\HasMedia;
+use Spatie\MediaLibrary\HasMedia\HasMediaTrait;
use Rinvex\Categories\Traits\Categorizable;
use Conner\Tagging\Taggable;
@@ -11,6 +12,7 @@ class Article extends Model
{
use Categorizable;
use Taggable;
+ use HasMediaTrait;
protected $guarded = ['id'];
protected $table = 'shop_articles';
diff --git a/app/Models/Shop/Tag.php b/app/Models/Shop/Tag.php
index 633cb3b0..85ed3f6b 100644
--- a/app/Models/Shop/Tag.php
+++ b/app/Models/Shop/Tag.php
@@ -9,10 +9,9 @@ class Tag extends Model
protected $guarded = ['id'];
protected $table = 'tagging_tags';
-
public function group()
{
- return $this->hasOne('App\Models\Shop\TagGroup');
+ return $this->hasOne('App\Models\Shop\TagGroup','id','tag_group_id');
}
}
diff --git a/app/Repositories/Botanic/Varieties.php b/app/Repositories/Botanic/Varieties.php
index be7f6b14..452274aa 100644
--- a/app/Repositories/Botanic/Varieties.php
+++ b/app/Repositories/Botanic/Varieties.php
@@ -45,11 +45,20 @@ class Varieties
return Variety::find($id);
}
+ public static function getWithImages($id)
+ {
+ $variety = self::get($id);
+ $variety->getMedia();
+ // $variety = $variety->toArray();
+ foreach ($variety->media as $key => $media) {
+ $variety->media[$key]['url'] = $media->getUrl();
+ }
+ return $variety;
+ }
+
public static function store($data)
{
- $id = isset($data['id']) ? $data['id'] : false;
- $item = $id ? self::update($data) : self::create($data);
- return $item->id;
+ return isset($data['id']) ? self::update($data) : self::create($data);
}
public static function create($data)
@@ -59,7 +68,9 @@ class Varieties
public static function update($data)
{
- return Variety::find($id)->update($data);
+ $variety = self::get($data['id']);
+ $variety->update($data);
+ return $variety;
}
public static function destroy($id)
@@ -67,4 +78,13 @@ class Varieties
return Variety::destroy($id);
}
+ public static function storeImages($variety, $files)
+ {
+ if ($files) {
+ foreach ($files as $file) {
+ $variety->addMedia($file)->toMediaCollection('images');
+ }
+ }
+ }
+
}
diff --git a/app/Repositories/Shop/ArticleComponents.php b/app/Repositories/Shop/ArticleComponents.php
index 27771371..4c53b6c2 100644
--- a/app/Repositories/Shop/ArticleComponents.php
+++ b/app/Repositories/Shop/ArticleComponents.php
@@ -8,25 +8,25 @@ use Illuminate\Support\Str;
use Yajra\DataTables\DataTables;
-use App\Models\Shop\Article;
+use App\Models\Shop\ArticleComponent;
-class Articles
+class ArticleComponents
{
public static function getDatatable()
{
- $model = Article::orderBy('name');
+ $model = ArticleComponent::orderBy('name');
return Datatables::of($model)->make(true);
}
public static function getAll()
{
- return Article::orderBy('name','asc')->get();
+ return ArticleComponent::orderBy('name','asc')->get();
}
public static function get($id)
{
- return Article::find($id);
+ return ArticleComponent::find($id);
}
public static function store($data)
@@ -38,17 +38,17 @@ class Articles
public static function create($data)
{
- return Article::create($data);
+ return ArticleComponent::create($data);
}
public static function update($data)
{
- return Article::find($id)->update($data);
+ return ArticleComponent::find($id)->update($data);
}
public static function destroy($id)
{
- return Article::destroy($id);
+ return ArticleComponent::destroy($id);
}
}
diff --git a/app/Repositories/Shop/TagGroups.php b/app/Repositories/Shop/TagGroups.php
index 0280a69c..c1a82bce 100644
--- a/app/Repositories/Shop/TagGroups.php
+++ b/app/Repositories/Shop/TagGroups.php
@@ -2,10 +2,6 @@
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;
@@ -24,6 +20,23 @@ class TagGroups
return TagGroup::get()->SortBy('name')->pluck('name','id')->toArray();
}
+ public static function getTreeTags()
+ {
+ $items = TagGroup::with('tags')->get();
+ $tags = [];
+ foreach ($items as $group) {
+ $group_tags = [];
+ foreach ($group->tags as $tag) {
+ $group_tags[$tag->id] = $tag->name;
+ }
+ $tags[] = [
+ 'label' => $group->name,
+ 'options' => $group_tags,
+ ];
+ }
+ return $tags;
+ }
+
public static function getAll()
{
return TagGroup::orderBy('name','asc')->get();
diff --git a/app/Repositories/Shop/Tags.php b/app/Repositories/Shop/Tags.php
index 55139776..77ab076f 100644
--- a/app/Repositories/Shop/Tags.php
+++ b/app/Repositories/Shop/Tags.php
@@ -8,25 +8,30 @@ use Illuminate\Support\Str;
use Yajra\DataTables\DataTables;
-use App\Models\Shop\TagGroup;
+use App\Models\Shop\Tag;
-class TagGroups
+class Tags
{
public static function getDatatable()
{
- $model = TagGroup::orderBy('name');
+ $model = Tag::orderBy('name');
return Datatables::of($model)->make(true);
}
+ public static function getOptions()
+ {
+ return Tag::get()->pluck('name','id')->toArray();
+ }
+
public static function getAll()
{
- return TagGroup::orderBy('name','asc')->get();
+ return Tag::orderBy('order','asc')->get();
}
public static function get($id)
{
- return TagGroup::find($id);
+ return Tag::find($id);
}
public static function store($data)
@@ -38,17 +43,17 @@ class TagGroups
public static function create($data)
{
- return TagGroup::create($data);
+ return Tag::create($data);
}
public static function update($data)
{
- return TagGroup::find($id)->update($data);
+ return Tag::find($id)->update($data);
}
public static function destroy($id)
{
- return TagGroup::destroy($id);
+ return Tag::destroy($id);
}
}
diff --git a/build/js/include/handlebars.js b/build/js/include/handlebars.js
index 2e00873d..be6cdaad 100644
--- a/build/js/include/handlebars.js
+++ b/build/js/include/handlebars.js
@@ -13,7 +13,7 @@ function renderContractDriveTPL(filename, data, selector) {
function getTemplate(file, data) {
var source = getSource(file);
var template = Handlebars.compile(source);
- return template(data);
+ return template(data);
}
function getSource(file) {
@@ -21,11 +21,11 @@ function getSource(file) {
$.ajax({
async: false,
dataType: 'html',
- type: 'GET',
- url: file + '?' + Date.now(),
- success: function(data) {
- source = data;
- }
+ type: 'GET',
+ url: file + '?' + Date.now(),
+ success: function(data) {
+ source = data;
+ }
});
return source;
}
diff --git a/build/js/include/plugins/jquery.hcaptions.js b/build/js/include/plugins/jquery.hcaptions.js
new file mode 100644
index 00000000..2f002b05
--- /dev/null
+++ b/build/js/include/plugins/jquery.hcaptions.js
@@ -0,0 +1,241 @@
+(function($){
+
+ var Captions = function(el, opts) {
+ var _this = this,
+ $this = $(el),
+ $el = $this.clone(),
+ href = $this.attr('href'),
+ $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))), //strip for ie7
+ _overlay_css = {};
+
+ if ( ! $target.length )
+ {
+ $target = $this.next(opts.data_selector);
+ }
+ if ($target.length) {
+
+ this.set_from_attr(el, opts);
+
+ $wrap = $('
',{position: 'relative', 'z-index': 1, display: 'block', overflow: 'hidden'})
+ .append($el)
+ .append($target);
+
+
+
+ $this.replaceWith($wrap);
+ $target.hide();
+
+ $wrap.css({ 'position':'relative', 'overflow':'hidden', display: 'block', padding:'2px' });
+
+ if (opts.find_image && $this.not('img'))
+ {
+ var img = $wrap.find('img'),
+ w = img.width(),
+ h = img.height();
+ }
+ else {
+ var w = $wrap.outerWidth(),
+ h = $wrap.outerHeight();
+ }
+
+ var overlay_w = opts.width || w,
+ overlay_h = opts.height || h;
+
+ $target.css({ 'width':overlay_w, 'height':overlay_h, 'position':'absolute', 'z-index':33, overflow: 'hidden' });
+
+ var _overlay_css = {};
+
+ if (opts.overlay_bg) {
+ _overlay_css.background = opts.overlay_bg;
+ }
+ if (opts.overlay_opacity<1) {
+ _overlay_css.opacity = opts.overlay_opacity;
+ }
+
+ // CSS: Overlay X Position
+ _overlay_css.left = (opts.overlay_x == 'left')
+ ? 0
+ : (opts.overlay_x == 'right')
+ ? w-overlay_w
+ : (w - overlay_w) / 2 + 'px';
+
+ // CSS: Overlay Y Position
+ _overlay_css.top = (opts.overlay_y == 'top')
+ ? 0
+ : (opts.overlay_y == 'bottom')
+ ? h-overlay_h
+ : (h - overlay_h) / 2 + 'px';
+
+ // CSS: Apply rules
+ $target.css(_overlay_css);
+
+ // slide effect
+ if (opts.effect=='slide') {
+
+ var slide_css = {};
+
+ switch (opts.direction) {
+ case 'top':
+ slide_css.top = '-'+overlay_h+'px';
+ break;
+ case 'bottom':
+ slide_css.top = h+'px';
+ break;
+ case 'left':
+ slide_css.left = '-'+overlay_w+'px';
+ break;
+ case 'right':
+ default:
+ slide_css.left = w+'px';
+ break;
+ }
+
+ // Apply Slide rules
+ $target.css('z-index',opts.zindex+1).css(slide_css);
+
+ // Hover events
+ $wrap.hover(function(){
+ $target.show().stop(true, true).animate({ 'top': _overlay_css.top, 'left': _overlay_css.left }, +opts.speed, opts.onshow());
+ }, function(){
+ $target.show().stop(true, true).animate(slide_css, +opts.speed, opts.onhide());
+ });
+
+ // fade effect
+ } else if (opts.effect=='fade') {
+ $target.css('z-index',opts.zindex+1).hide();
+ $wrap.hover(function () {
+ $target.stop(true, true).fadeIn(+opts.speed, opts.onshow());
+ }, function () {
+ $target.stop(true, true).fadeOut(+opts.speed, opts.onhide());
+ });
+
+ // just show/hide
+ } else {
+ $target.css('z-index',opts.zindex+1).hide();
+ $wrap.hover(function () {
+ $target.show(0, opts.onshow());
+ }, function () {
+ $target.hide(0, opts.onhide());
+ });
+ }
+ }
+ };
+
+ Captions.prototype = {
+
+ constructor: Captions,
+
+ set_from_attr: function(el, opt){
+ var cfg={},
+ attrs=el.attributes,
+ l=attrs.length;
+
+ for (var i=0; i i {
+ color: #02baf2;
+ font-size: 16px;
+}
+.btn-toolbar:hover {
+ background: #02baf2;
+ cursor: pointer;
+}
+.btn-toolbar:hover > i {
+ color: white;
+}
+.btn-toolbar-primary {
+ background-color: #009dcd;
+}
+.btn-toolbar-primary.pressed {
+ background-color: #02baf2;
+}
+.btn-toolbar-primary:hover {
+ background-color: #02baf2;
+}
+.btn-toolbar-primary > i {
+ color: white;
+}
+.btn-toolbar-danger {
+ background-color: #cc0000;
+}
+.btn-toolbar-danger.pressed {
+ background-color: #f84545;
+}
+.btn-toolbar-danger:hover {
+ background-color: #f84545;
+}
+.btn-toolbar-danger > i {
+ color: white;
+}
+.btn-toolbar-warning {
+ background-color: #f3bc65;
+}
+.btn-toolbar-warning.pressed {
+ background-color: #fad46b;
+}
+.btn-toolbar-warning:hover {
+ background-color: #fad46b;
+}
+.btn-toolbar-warning > i {
+ color: white;
+}
+.btn-toolbar-info {
+ background-color: #e96300;
+}
+.btn-toolbar-info.pressed {
+ background-color: #f58410;
+}
+.btn-toolbar-info:hover {
+ background-color: #f58410;
+}
+.btn-toolbar-info > i {
+ color: white;
+}
+.btn-toolbar-success {
+ background-color: #28948c;
+}
+.btn-toolbar-success.pressed {
+ background-color: #3eb5ac;
+}
+.btn-toolbar-success:hover {
+ background-color: #3eb5ac;
+}
+.btn-toolbar-success > i {
+ color: white;
+}
+.btn-toolbar-info-o {
+ background-color: #9175bd;
+}
+.btn-toolbar-info-o.pressed {
+ background-color: #a88cd5;
+}
+.btn-toolbar-info-o:hover {
+ background-color: #a88cd5;
+}
+.btn-toolbar-info-o > i {
+ color: white;
+}
+.btn-toolbar-light {
+ background-color: #b2c6cd;
+}
+.btn-toolbar-light.pressed {
+ background-color: #d6e1e5;
+}
+.btn-toolbar-light:hover {
+ background-color: #d6e1e5;
+}
+.btn-toolbar-light > i {
+ color: white;
+}
+.btn-toolbar-dark {
+ background-color: #364347;
+}
+.btn-toolbar-dark.pressed {
+ background-color: #5e696d;
+}
+.btn-toolbar-dark:hover {
+ background-color: #5e696d;
+}
+.btn-toolbar-dark > i {
+ color: white;
+}
+.tool-container {
+ background-color: #5e696d;
+ background-size: 100% 100%;
+ border-radius: 6px;
+ position: absolute;
+}
+.tool-container.tool-top,
+.tool-container.tool-bottom {
+ height: 40px;
+ border-bottom: 0px solid #beb8b8;
+}
+.tool-container.tool-top .tool-item,
+.tool-container.tool-bottom .tool-item {
+ float: left;
+ border-right: 0;
+ border-left: 0;
+}
+.tool-item {
+ height: 100%;
+ display: block;
+ width: 20px;
+ height: 20px;
+ text-align: center;
+ padding: 10px;
+ transition: none;
+}
+.tool-item > .fa {
+ color: #b2c6cd;
+}
+.tool-item.selected,
+.tool-item:hover {
+ background: #02baf2;
+}
+.tool-item.selected > .fa,
+.tool-item:hover > .fa {
+ color: white;
+}
+.tool-top .tool-item:first-child:hover,
+.tool-bottom .tool-item:first-child:hover {
+ border-top-left-radius: 6px;
+ border-bottom-left-radius: 6px;
+}
+.tool-top .tool-item:last-child:hover,
+.tool-bottom .tool-item:last-child:hover {
+ border-top-right-radius: 6px;
+ border-bottom-right-radius: 6px;
+}
+.tool-vertical-top .tool-item:first-child:hover,
+.tool-vertical-bottom .tool-item:first-child:hover,
+.tool-right .tool-item:first-child:hover,
+.tool-left .tool-item:first-child:hover {
+ border-top-left-radius: 6px;
+ border-top-right-radius: 6px;
+}
+.tool-vertical-top .tool-item:last-child:hover,
+.tool-vertical-bottom .tool-item:last-child:hover,
+.tool-right .tool-item:last-child:hover,
+.tool-left .tool-item:last-child:hover {
+ border-bottom-left-radius: 6px;
+ border-bottom-right-radius: 6px;
+}
+.tool-container .arrow {
+ width: 0;
+ height: 0;
+ position: absolute;
+ border-width: 7px;
+ border-style: solid;
+}
+.tool-container.tool-top .arrow {
+ border-color: #5e696d transparent transparent;
+ left: 50%;
+ bottom: -14px;
+ margin-left: -7px;
+}
+.tool-container.tool-bottom .arrow {
+ border-color: transparent transparent #5e696d;
+ left: 50%;
+ top: -14px;
+ margin-left: -7px;
+}
+.tool-container.tool-left .arrow {
+ border-color: transparent transparent transparent #5e696d;
+ top: 50%;
+ right: -14px;
+ margin-top: -7px;
+}
+.tool-container.tool-right .arrow {
+ border-color: transparent #5e696d transparent transparent;
+ top: 50%;
+ left: -14px;
+ margin-top: -7px;
+}
+.toolbar-primary {
+ background-color: #02baf2;
+}
+.toolbar-primary.tool-top .arrow {
+ border-color: #02baf2 transparent transparent;
+}
+.toolbar-primary.tool-bottom .arrow {
+ border-color: transparent transparent #02baf2;
+}
+.toolbar-primary.tool-left .arrow {
+ border-color: transparent transparent transparent #02baf2;
+}
+.toolbar-primary.tool-right .arrow {
+ border-color: transparent #02baf2 transparent transparent;
+}
+.toolbar-primary .tool-item > .fa {
+ color: white;
+}
+.toolbar-primary .tool-item.selected,
+.toolbar-primary .tool-item:hover {
+ background: #009dcd;
+ color: white;
+}
+.toolbar-danger {
+ background-color: #f84545;
+}
+.toolbar-danger.tool-top .arrow {
+ border-color: #f84545 transparent transparent;
+}
+.toolbar-danger.tool-bottom .arrow {
+ border-color: transparent transparent #f84545;
+}
+.toolbar-danger.tool-left .arrow {
+ border-color: transparent transparent transparent #f84545;
+}
+.toolbar-danger.tool-right .arrow {
+ border-color: transparent #f84545 transparent transparent;
+}
+.toolbar-danger .tool-item > .fa {
+ color: white;
+}
+.toolbar-danger .tool-item.selected,
+.toolbar-danger .tool-item:hover {
+ background: #cc0000;
+ color: white;
+}
+.toolbar-warning {
+ background-color: #f3bc65;
+}
+.toolbar-warning.tool-top .arrow {
+ border-color: #f3bc65 transparent transparent;
+}
+.toolbar-warning.tool-bottom .arrow {
+ border-color: transparent transparent #f3bc65;
+}
+.toolbar-warning.tool-left .arrow {
+ border-color: transparent transparent transparent #f3bc65;
+}
+.toolbar-warning.tool-right .arrow {
+ border-color: transparent #f3bc65 transparent transparent;
+}
+.toolbar-warning .tool-item > .fa {
+ color: white;
+}
+.toolbar-warning .tool-item.selected,
+.toolbar-warning .tool-item:hover {
+ background: #fad46b;
+ color: white;
+}
+.toolbar-info {
+ background-color: #e96300;
+}
+.toolbar-info.tool-top .arrow {
+ border-color: #e96300 transparent transparent;
+}
+.toolbar-info.tool-bottom .arrow {
+ border-color: transparent transparent #e96300;
+}
+.toolbar-info.tool-left .arrow {
+ border-color: transparent transparent transparent #e96300;
+}
+.toolbar-info.tool-right .arrow {
+ border-color: transparent #e96300 transparent transparent;
+}
+.toolbar-info .tool-item > .fa {
+ color: white;
+}
+.toolbar-info .tool-item.selected,
+.toolbar-info .tool-item:hover {
+ background: #f58410;
+ color: white;
+}
+.toolbar-success {
+ background-color: #28948c;
+}
+.toolbar-success.tool-top .arrow {
+ border-color: #28948c transparent transparent;
+}
+.toolbar-success.tool-bottom .arrow {
+ border-color: transparent transparent #28948c;
+}
+.toolbar-success.tool-left .arrow {
+ border-color: transparent transparent transparent #28948c;
+}
+.toolbar-success.tool-right .arrow {
+ border-color: transparent #28948c transparent transparent;
+}
+.toolbar-success .tool-item > .fa {
+ color: white;
+}
+.toolbar-success .tool-item.selected,
+.toolbar-success .tool-item:hover {
+ background: #3eb5ac;
+ color: white;
+}
+.toolbar-info-o {
+ background-color: #9175bd;
+}
+.toolbar-info-o.tool-top .arrow {
+ border-color: #9175bd transparent transparent;
+}
+.toolbar-info-o.tool-bottom .arrow {
+ border-color: transparent transparent #9175bd;
+}
+.toolbar-info-o.tool-left .arrow {
+ border-color: transparent transparent transparent #9175bd;
+}
+.toolbar-info-o.tool-right .arrow {
+ border-color: transparent #9175bd transparent transparent;
+}
+.toolbar-info-o .tool-item > .fa {
+ color: white;
+}
+.toolbar-info-o .tool-item.selected,
+.toolbar-info-o .tool-item:hover {
+ background: #a88cd5;
+ color: white;
+}
+.toolbar-light {
+ background-color: #b2c6cd;
+}
+.toolbar-light.tool-top .arrow {
+ border-color: #b2c6cd transparent transparent;
+}
+.toolbar-light.tool-bottom .arrow {
+ border-color: transparent transparent #b2c6cd;
+}
+.toolbar-light.tool-left .arrow {
+ border-color: transparent transparent transparent #b2c6cd;
+}
+.toolbar-light.tool-right .arrow {
+ border-color: transparent #b2c6cd transparent transparent;
+}
+.toolbar-light .tool-item > .fa {
+ color: white;
+}
+.toolbar-light .tool-item.selected,
+.toolbar-light .tool-item:hover {
+ background: #d6e1e5;
+ color: white;
+}
+.toolbar-dark {
+ background-color: #364347;
+}
+.toolbar-dark.tool-top .arrow {
+ border-color: #364347 transparent transparent;
+}
+.toolbar-dark.tool-bottom .arrow {
+ border-color: transparent transparent #364347;
+}
+.toolbar-dark.tool-left .arrow {
+ border-color: transparent transparent transparent #364347;
+}
+.toolbar-dark.tool-right .arrow {
+ border-color: transparent #364347 transparent transparent;
+}
+.toolbar-dark .tool-item > .fa {
+ color: white;
+}
+.toolbar-dark .tool-item.selected,
+.toolbar-dark .tool-item:hover {
+ background: #5e696d;
+ color: white;
+}
+.animate-standard {
+ -webkit-animation: standardAnimate 0.3s 1 ease;
+}
+.animate-flyin {
+ -webkit-animation: rotateAnimate 0.5s 1 ease;
+}
+.animate-grow {
+ -webkit-animation: growAnimate 0.4s 1 ease;
+}
+.animate-flip {
+ -webkit-animation: flipAnimate 0.4s 1 ease;
+}
+.animate-bounce {
+ -webkit-animation: bounceAnimate 0.4s 1 ease-out;
+}
+@-webkit-keyframes rotateAnimate {
+ from {
+ transform: rotate(180deg) translate(-120px);
+ opacity: 0;
+ }
+ to {
+ transform: rotate(0deg) translate(0px);
+ opacity: 1;
+ }
+}
+@-webkit-keyframes standardAnimate {
+ from {
+ transform: translateY(20px);
+ opacity: 0;
+ }
+ to {
+ transform: translateY(0px);
+ opacity: 1;
+ }
+}
+@-webkit-keyframes growAnimate {
+ 0% {
+ transform: scale(0) translateY(40px);
+ opacity: 0;
+ }
+ 70% {
+ transform: scale(1.5) translate(0px);
+ }
+ 100% {
+ transform: scale(1) translate(0px);
+ opacity: 1;
+ }
+}
+@-webkit-keyframes rotate2Animate {
+ from {
+ transform: rotate(-90deg);
+ transform-origin: 0% 100%;
+ opacity: 0;
+ }
+ to {
+ transform: rotate(0deg);
+ opacity: 1;
+ }
+}
+@-webkit-keyframes flipAnimate {
+ from {
+ transform: rotate3d(2, 2, 2, 180deg);
+ opacity: 0;
+ }
+ to {
+ transform: rotate3d(0, 0, 0, 0deg);
+ opacity: 1;
+ }
+}
+@-webkit-keyframes bounceAnimate {
+ 0% {
+ transform: translateY(40px);
+ opacity: 0;
+ }
+ 30% {
+ transform: translateY(-40px);
+ }
+ 70% {
+ transform: translateY(20px);
+ }
+ 100% {
+ transform: translateY(0px);
+ opacity: 1;
+ }
+}
+.hidden {
+ display: none;
+}
diff --git a/build/js/include/plugins/toolbar/jquery.toolbar.js b/build/js/include/plugins/toolbar/jquery.toolbar.js
new file mode 100644
index 00000000..56637415
--- /dev/null
+++ b/build/js/include/plugins/toolbar/jquery.toolbar.js
@@ -0,0 +1,307 @@
+/**
+ * Toolbar.js
+ *
+ * @fileoverview jQuery plugin that creates tooltip style toolbars.
+ * @link http://paulkinzett.github.com/toolbar/
+ * @author Paul Kinzett (http://kinzett.co.nz/)
+ * @version 1.1.0
+ * @requires jQuery 1.7+
+ *
+ * @license jQuery Toolbar Plugin v1.1.0
+ * http://paulkinzett.github.com/toolbar/
+ * Copyright 2013 - 2015 Paul Kinzett (http://kinzett.co.nz/)
+ * Released under the MIT license.
+ *
+ */
+
+if ( typeof Object.create !== 'function' ) {
+ Object.create = function( obj ) {
+ function F() {}
+ F.prototype = obj;
+ return new F();
+ };
+}
+
+(function( $, window, document, undefined ) {
+
+ var ToolBar = {
+ init: function( options, elem ) {
+ var self = this;
+ self.elem = elem;
+ self.$elem = $( elem );
+ self.options = $.extend( {}, $.fn.toolbar.options, options );
+ self.metadata = self.$elem.data();
+ self.overrideOptions();
+ self.toolbar = $('')
+ .addClass('tool-'+self.options.position)
+ .addClass('toolbar-'+self.options.style)
+ .append('')
+ .append('')
+ .appendTo('body')
+ .css('opacity', 0)
+ .hide();
+ self.toolbar_arrow = self.toolbar.find('.arrow');
+ self.initializeToolbar();
+ },
+
+ overrideOptions: function() {
+ var self = this;
+ $.each( self.options, function( $option ) {
+ if (typeof(self.$elem.data('toolbar-'+$option)) != "undefined") {
+ self.options[$option] = self.$elem.data('toolbar-'+$option);
+ }
+ });
+ },
+
+ initializeToolbar: function() {
+ var self = this;
+ self.populateContent();
+ self.setTrigger();
+ self.toolbarWidth = self.toolbar.width();
+ },
+
+ setTrigger: function() {
+ var self = this;
+
+ if (self.options.event != 'click') {
+
+ var moveTime;
+ function decideTimeout () {
+ if (self.$elem.hasClass('pressed')) {
+ moveTime = setTimeout(function() {
+ self.hide();
+ }, 150);
+ } else {
+ clearTimeout(moveTime);
+ };
+ };
+
+ self.$elem.on({
+ mouseenter: function(event) {
+ if (self.$elem.hasClass('pressed')) {
+ clearTimeout(moveTime);
+ } else {
+ self.show();
+ }
+ }
+ });
+
+ self.$elem.parent().on({
+ mouseleave: function(event){ decideTimeout(); }
+ });
+
+ $('.tool-container').on({
+ mouseenter: function(event){ clearTimeout(moveTime); },
+ mouseleave: function(event){ decideTimeout(); }
+ });
+ }
+
+ if (self.options.event == 'click') {
+ self.$elem.on('click', function(event) {
+ event.preventDefault();
+ if(self.$elem.hasClass('pressed')) {
+ self.hide();
+ } else {
+ self.show();
+ }
+ });
+
+ if (self.options.hideOnClick) {
+ $('html').on("click.toolbar", function ( event ) {
+ if (event.target != self.elem &&
+ self.$elem.has(event.target).length === 0 &&
+ self.toolbar.has(event.target).length === 0 &&
+ self.toolbar.is(":visible")) {
+ self.hide();
+ }
+ });
+ }
+ }
+
+ if (self.options.hover) {
+ var moveTime;
+
+ function decideTimeout () {
+ if (self.$elem.hasClass('pressed')) {
+ moveTime = setTimeout(function() {
+ self.hide();
+ }, 150);
+ } else {
+ clearTimeout(moveTime);
+ };
+ };
+
+ self.$elem.on({
+ mouseenter: function(event) {
+ if (self.$elem.hasClass('pressed')) {
+ clearTimeout(moveTime);
+ } else {
+ self.show();
+ }
+ }
+ });
+
+ self.$elem.parent().on({
+ mouseleave: function(event){ decideTimeout(); }
+ });
+
+ $('.tool-container').on({
+ mouseenter: function(event){ clearTimeout(moveTime); },
+ mouseleave: function(event){ decideTimeout(); }
+ });
+ }
+
+ $(window).resize(function( event ) {
+ event.stopPropagation();
+ if ( self.toolbar.is(":visible") ) {
+ self.toolbarCss = self.getCoordinates(self.options.position, 20);
+ self.collisionDetection();
+ self.toolbar.css( self.toolbarCss );
+ self.toolbar_arrow.css( self.arrowCss );
+ }
+ });
+ },
+
+ populateContent: function() {
+ var self = this;
+ var location = self.toolbar.find('.tool-items');
+ var content = $(self.options.content).clone( true ).find('a').addClass('tool-item');
+ location.html(content);
+ location.find('.tool-item').on('click', function(event) {
+ event.preventDefault();
+ self.$elem.trigger('toolbarItemClick', this);
+ });
+ },
+
+ calculatePosition: function() {
+ var self = this;
+ self.arrowCss = {};
+ self.toolbarCss = self.getCoordinates(self.options.position, self.options.adjustment);
+ self.toolbarCss.position = 'absolute';
+ self.toolbarCss.zIndex = self.options.zIndex;
+ self.collisionDetection();
+ self.toolbar.css(self.toolbarCss);
+ self.toolbar_arrow.css(self.arrowCss);
+ },
+
+ getCoordinates: function( position, adjustment ) {
+ var self = this;
+ self.coordinates = self.$elem.offset();
+
+ if (self.options.adjustment && self.options.adjustment[self.options.position]) {
+ adjustment = self.options.adjustment[self.options.position] + adjustment;
+ }
+
+ switch(self.options.position) {
+ case 'top':
+ return {
+ left: self.coordinates.left-(self.toolbar.width()/2)+(self.$elem.outerWidth()/2),
+ top: self.coordinates.top-self.$elem.outerHeight()-adjustment,
+ right: 'auto'
+ };
+ case 'left':
+ return {
+ left: self.coordinates.left-(self.toolbar.width()/2)-(self.$elem.outerWidth()/2)-adjustment,
+ top: self.coordinates.top-(self.toolbar.height()/2)+(self.$elem.outerHeight()/2),
+ right: 'auto'
+ };
+ case 'right':
+ return {
+ left: self.coordinates.left+(self.toolbar.width()/2)+(self.$elem.outerWidth()/2)+adjustment,
+ top: self.coordinates.top-(self.toolbar.height()/2)+(self.$elem.outerHeight()/2),
+ right: 'auto'
+ };
+ case 'bottom':
+ return {
+ left: self.coordinates.left-(self.toolbar.width()/2)+(self.$elem.outerWidth()/2),
+ top: self.coordinates.top+self.$elem.outerHeight()+adjustment,
+ right: 'auto'
+ };
+ }
+ },
+
+ collisionDetection: function() {
+ var self = this;
+ var edgeOffset = 20;
+ if(self.options.position == 'top' || self.options.position == 'bottom') {
+ self.arrowCss = {left: '50%', right: '50%'};
+ if( self.toolbarCss.left < edgeOffset ) {
+ self.toolbarCss.left = edgeOffset;
+ self.arrowCss.left = self.$elem.offset().left + self.$elem.width()/2-(edgeOffset);
+ }
+ else if(($(window).width() - (self.toolbarCss.left + self.toolbarWidth)) < edgeOffset) {
+ self.toolbarCss.right = edgeOffset;
+ self.toolbarCss.left = 'auto';
+ self.arrowCss.left = 'auto';
+ self.arrowCss.right = ($(window).width()-self.$elem.offset().left)-(self.$elem.width()/2)-(edgeOffset)-5;
+ }
+ }
+ },
+
+ show: function() {
+ var self = this;
+ self.$elem.addClass('pressed');
+ self.calculatePosition();
+ self.toolbar.show().css({'opacity': 1}).addClass('animate-'+self.options.animation);
+ self.$elem.trigger('toolbarShown');
+ },
+
+ hide: function() {
+ var self = this;
+ var animation = {'opacity': 0};
+
+ self.$elem.removeClass('pressed');
+
+ switch(self.options.position) {
+ case 'top':
+ animation.top = '+=20';
+ break;
+ case 'left':
+ animation.left = '+=20';
+ break;
+ case 'right':
+ animation.left = '-=20';
+ break;
+ case 'bottom':
+ animation.top = '-=20';
+ break;
+ }
+
+ self.toolbar.animate(animation, 200, function() {
+ self.toolbar.hide();
+ });
+
+ self.$elem.trigger('toolbarHidden');
+ },
+
+ getToolbarElement: function () {
+ return this.toolbar.find('.tool-items');
+ }
+ };
+
+ $.fn.toolbar = function( options ) {
+ if ($.isPlainObject( options )) {
+ return this.each(function() {
+ var toolbarObj = Object.create( ToolBar );
+ toolbarObj.init( options, this );
+ $(this).data('toolbarObj', toolbarObj);
+ });
+ } else if ( typeof options === 'string' && options.indexOf('_') !== 0 ) {
+ var toolbarObj = $(this).data('toolbarObj');
+ var method = toolbarObj[options];
+ return method.apply(toolbarObj, $.makeArray(arguments).slice(1));
+ }
+ };
+
+ $.fn.toolbar.options = {
+ content: '#myContent',
+ position: 'top',
+ hideOnClick: false,
+ zIndex: 120,
+ hover: false,
+ style: 'default',
+ animation: 'standard',
+ adjustment: 10
+ };
+
+}) ( jQuery, window, document );
diff --git a/composer.json b/composer.json
index a55186d5..99da0832 100644
--- a/composer.json
+++ b/composer.json
@@ -130,7 +130,8 @@
"prefer-stable": true,
"scripts": {
"post-autoload-dump": [
- "@php artisan package:discover --ansi"
+ "@php artisan package:discover --ansi",
+ "@php artisan vendor:publish --provider=\"Sebastienheyd\\Boilerplate\\BoilerplateServiceProvider\" --tag=public --force -q"
],
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
diff --git a/config/boilerplate/auth.php b/config/boilerplate/auth.php
index 74b9cd02..55703669 100644
--- a/config/boilerplate/auth.php
+++ b/config/boilerplate/auth.php
@@ -2,7 +2,7 @@
return [
'register' => false, // Allow to register new users on backend login page
- 'register_role' => 'backend_user', // Given role to new users (except the first one who is admin)
+ 'register_role' => 'customer', // Given role to new users (except the first one who is admin)
'providers' => [
'users' => [
'driver' => 'eloquent',
diff --git a/config/boilerplate/mediamanager.php b/config/boilerplate/mediamanager.php
index bc78cf3b..ea3d3503 100644
--- a/config/boilerplate/mediamanager.php
+++ b/config/boilerplate/mediamanager.php
@@ -6,7 +6,7 @@ return [
'thumbs_dir' => 'thumbs',
'hide_thumbs_dir' => true,
'authorized' => [
- 'size' => '2048',
+ 'size' => '32768',
'mimes' => [// @see https://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types)
'jpg',
'jpeg',
diff --git a/package.json b/package.json
index 505b7990..2e5cbbcc 100644
--- a/package.json
+++ b/package.json
@@ -34,6 +34,7 @@
},
"dependencies": {
"@activix/bootstrap-datetimepicker": "^2.0.7",
+ "@ciar4n/izmir": "^1.0.0",
"@claviska/jquery-minicolors": "^2.3.4",
"admin-lte": "^3.0.2",
"animate.css": "^3.7.0",
@@ -90,6 +91,7 @@
"imports-loader": "^0.8.0",
"input-switch": "^1.1.0",
"inputmask": "^4.0.8",
+ "ionicons": "^5.0.1",
"isotope-layout": "^3.0.6",
"izimodal": "^1.5.1",
"jQuery-QueryBuilder": "^2.5.2",
diff --git a/resources/lang/fr/shop.php b/resources/lang/fr/shop.php
index 22ac9199..ab85d430 100644
--- a/resources/lang/fr/shop.php
+++ b/resources/lang/fr/shop.php
@@ -1,7 +1,6 @@
'Résidences',
'name' => 'Référence',
'parameters' => 'Paramètres',
'label' => 'Libellé',
@@ -24,13 +23,25 @@ return [
'description' => 'Gérer les articles',
'add' => 'Ajouter un article',
'edit' => 'Editer un article',
- 'del' => 'Effacer u article',
+ 'del' => 'Effacer un article',
'list' => 'Liste des articles',
'successadd' => 'L\'article été correctement ajouté',
'successmod' => 'L\'article a été correctement modifié',
'successdel' => 'L\'article a été correctement effacé',
'confirmdelete' => 'Confirmez-vous la suppression de l\'article ?',
],
+ 'tags' => [
+ 'title' => 'Tags',
+ 'description' => 'Gérer les tags',
+ 'add' => 'Ajouter un tag',
+ 'edit' => 'Editer un tag',
+ 'del' => 'Effacer un tag',
+ 'list' => 'Liste des tags',
+ 'successadd' => 'Le tag été correctement ajouté',
+ 'successmod' => 'Le tag a été correctement modifié',
+ 'successdel' => 'Le tag a été correctement effacé',
+ 'confirmdelete' => 'Confirmez-vous la suppression du tag ?',
+ ],
'customers' => [
'title' => "Clients",
'description' => 'Gérer les clients',
diff --git a/resources/views/Botanic/Admin/Varieties/edit.blade.php b/resources/views/Botanic/Admin/Varieties/edit.blade.php
index a2a9e37b..ecf6e1d8 100644
--- a/resources/views/Botanic/Admin/Varieties/edit.blade.php
+++ b/resources/views/Botanic/Admin/Varieties/edit.blade.php
@@ -1,12 +1,12 @@
@extends('layout.index', [
'title' => __('Botanic.varieties.title'),
'subtitle' => __('Botanic.varieties.edit'),
- 'breadcrumb' => ['Familles']
+ 'breadcrumb' => [__('Botanic.varieties.title'), __('Botanic.varieties.edit')]
])
@section('content')
- {{ Form::open(['route' => 'Botanic.Admin.Varieties.store', 'id' => 'form', 'autocomplete' => 'off']) }}
+ {{ Form::open(['route' => 'Botanic.Admin.Varieties.store', 'id' => 'form', 'autocomplete' => 'off', 'files' => true]) }}
@include('Botanic.Admin.Varieties.form')
diff --git a/resources/views/Botanic/Admin/Varieties/form.blade.php b/resources/views/Botanic/Admin/Varieties/form.blade.php
index 322e0fba..16552da3 100644
--- a/resources/views/Botanic/Admin/Varieties/form.blade.php
+++ b/resources/views/Botanic/Admin/Varieties/form.blade.php
@@ -1,3 +1,7 @@
+@include('boilerplate::load.fileinput')
+@include('boilerplate::load.select2')
+@include('boilerplate::load.tinymce')
+
+ {{ Form::label('tags', 'Tags') }}
+ @include('components.select-tree', ['name' => 'tags', 'list' => $tags_list, 'value' => isset($tags) ? $tags : null, 'class' => 'select2 form-control', 'multiple' => true])
+
{{ Form::label('description', 'Description') }}
@include('components.textarea', ['name' => 'description', 'value' => isset($description) ? $description : null, 'class' => 'editor', 'rows' => 5, 'required' => false])
-
+
+
+
+ @include('components.uploader.widget', ['images' => $media])
+
+
-
-
-
- @include('components.button-save')
-
-
-
+@include('components.save')
+@push('js')
+
+@endpush
\ No newline at end of file
diff --git a/resources/views/Shop/Admin/Articles/partials/block_price_new.blade.php b/resources/views/Shop/Admin/Articles/partials/block_price_new.blade.php
index fbced1b4..ff784056 100644
--- a/resources/views/Shop/Admin/Articles/partials/block_price_new.blade.php
+++ b/resources/views/Shop/Admin/Articles/partials/block_price_new.blade.php
@@ -7,23 +7,23 @@
- {{ 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])
+ {{ 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-sm'])
{{ Form::label('price', 'Prix HT') }}
- @include('components.money', ['name' => 'prices[][price}', 'value' => (isset($price)) ? $price : 0, 'required' => true])
+ @include('components.money', ['name' => 'prices[][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])
+ @include('components.money', ['name' => 'prices[][price_taxed]', 'value' => (isset($price_ht)) ? $price_ht : 0, 'required' => true, 'class' => 'form-control-sm'])
-
-
+
+
-
+
+
+
+
+
- {{ Form::label('quantity', 'Quantité') }}
- @include('components.input', ['name' => 'prices[][quantity][]', 'value' => (isset($quantity)) ? $quantity : 1, 'required' => true])
+ {{ 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])
+ {{ 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-sm'])
- {{ 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])
+ {{ 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-sm'])
diff --git a/resources/views/Shop/Admin/Articles/partials/characteristics.blade.php b/resources/views/Shop/Admin/Articles/partials/characteristics.blade.php
index 689eed3a..5e81c7de 100644
--- a/resources/views/Shop/Admin/Articles/partials/characteristics.blade.php
+++ b/resources/views/Shop/Admin/Articles/partials/characteristics.blade.php
@@ -33,7 +33,7 @@
{{ Form::label('tags', 'Tags') }}
- @include('components.select', ['name' => 'tags', 'value' => isset($tags) ? $tags : null, 'class' => 'select2 form-control', 'multiple' => true])
+ @include('components.select-tree', ['name' => 'tags', 'list' => $tags_list, 'value' => isset($tags) ? $tags : null, 'class' => 'select2 form-control', 'multiple' => true])
@@ -46,7 +46,6 @@
- {{ Form::label('photo', 'Photos') }}
- @include('components.file', ['name' => 'photo', 'value' => isset($photo) ? $photo : null, 'required' => true])
+ @include('components.uploader.widget', ['images' => isset($media) ? $media : null])
diff --git a/resources/views/Shop/Admin/Articles/partials/prices.blade.php b/resources/views/Shop/Admin/Articles/partials/prices.blade.php
index 6eb25536..cd85287c 100644
--- a/resources/views/Shop/Admin/Articles/partials/prices.blade.php
+++ b/resources/views/Shop/Admin/Articles/partials/prices.blade.php
@@ -1,5 +1,4 @@
@include('Shop.Admin.Articles.partials.block_price_new')
-
@include('Shop.Admin.Articles.partials.list-prices')
@@ -26,5 +25,22 @@
hideSection: true
});
+ function append_attribute() {
+ }
+
+ $("#append_attribute").appender({
+ rowSection: '.row-new-attribute',
+ type: '.row-attribute',
+ addBtn: '.add-new-attribute',
+ appendEffect: 'slide',
+ addClass: 'animated bounceInLeft',
+ rowNumber: '.row-attribute-number',
+ deleteBtn: '.delete-new-attribute-btn',
+ callback: append_attribute,
+ rowNumberStart: 2,
+ hideSection: true
+ });
+
+
@endpush
diff --git a/resources/views/Shop/Admin/Categories/form.blade.php b/resources/views/Shop/Admin/Categories/form.blade.php
index bb4df39d..9acce629 100644
--- a/resources/views/Shop/Admin/Categories/form.blade.php
+++ b/resources/views/Shop/Admin/Categories/form.blade.php
@@ -2,16 +2,18 @@
@include('boilerplate::load.select2')
@include('boilerplate::load.tinymce')
+
+
-
+
{{ Form::label('name', 'Nom') }}
@include('components.input', ['name' => 'name', 'value' => isset($name) ? $name : null, 'required' => true])
-
- {{ Form::label('category_id', 'Catégorie parente') }}
- @include('components.select', ['name' => 'category_id', 'list' => $categories, 'value' => isset($category_id) ? $category_id : null, 'class' => 'select2 form-control'])
+
+ {{ Form::label('visible', 'Visible') }}
+ @include('components.toggle', ['name' => 'visible', 'value' => isset($visible) ? $visible : null])
@@ -33,19 +35,13 @@
-
-
-
- @include('components.button-save')
-
-
-
+@include('components.save')
@push('js')
-
+
@endpush
\ No newline at end of file
diff --git a/resources/views/Shop/Admin/Dashboard/_partials/counter.blade.php b/resources/views/Shop/Admin/Dashboard/_partials/counter.blade.php
index 25add858..e7e35ea8 100644
--- a/resources/views/Shop/Admin/Dashboard/_partials/counter.blade.php
+++ b/resources/views/Shop/Admin/Dashboard/_partials/counter.blade.php
@@ -1,7 +1,7 @@
@@ -17,7 +17,7 @@
diff --git a/resources/views/Shop/Admin/Dashboard/_partials/latestOrders.blade.php b/resources/views/Shop/Admin/Dashboard/_partials/latestOrders.blade.php
new file mode 100644
index 00000000..b41f0664
--- /dev/null
+++ b/resources/views/Shop/Admin/Dashboard/_partials/latestOrders.blade.php
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+
+ | Nom |
+ Localisation |
+ Date |
+ Montant |
+
+
+
+
+ | Ludovic CANDELLIER |
+ Amiens (80) |
+ 14/05/2020 |
+ 300.53 € |
+
+
+
+
+
+
+
+
+
+
+
diff --git a/resources/views/Shop/Admin/Dashboard/_partials/latest_orders.blade.php b/resources/views/Shop/Admin/Dashboard/_partials/latest_orders.blade.php
deleted file mode 100644
index 67f90070..00000000
--- a/resources/views/Shop/Admin/Dashboard/_partials/latest_orders.blade.php
+++ /dev/null
@@ -1,43 +0,0 @@
-
-
-
-
-
-
-
-
-
- | Résidence |
- Lot |
- Prix |
- Vendeur |
-
-
-
-
- | Résidence |
- Lot |
- Prix |
- Vendeur |
-
-
-
-
-
-
-
-
-
-
-
diff --git a/resources/views/Shop/Admin/Dashboard/_partials/stats_sections.blade.php b/resources/views/Shop/Admin/Dashboard/_partials/ordersByTypes.blade.php
similarity index 54%
rename from resources/views/Shop/Admin/Dashboard/_partials/stats_sections.blade.php
rename to resources/views/Shop/Admin/Dashboard/_partials/ordersByTypes.blade.php
index f3c6db70..cedd7682 100644
--- a/resources/views/Shop/Admin/Dashboard/_partials/stats_sections.blade.php
+++ b/resources/views/Shop/Admin/Dashboard/_partials/ordersByTypes.blade.php
@@ -1,15 +1,15 @@
-
-