|
@@ -65,6 +65,7 @@ class ImportProductController extends AdminController
|
|
|
protected function grid()
|
|
|
{
|
|
|
return Grid::make(new RpcAlbum(), function (Grid $grid) {
|
|
|
+ $lang = config('app.locale');
|
|
|
$grid->view('admin.grid.table');
|
|
|
$grid->column('id')->display(function () {
|
|
|
return $this->_index+1;
|
|
@@ -75,7 +76,11 @@ class ImportProductController extends AdminController
|
|
|
$dataImages = array_slice($images, 0, 1);
|
|
|
return CommonHelper::displayImage($dataImages,100);
|
|
|
});
|
|
|
- $grid->column('title');
|
|
|
+ if ($lang == 'en') {
|
|
|
+ $grid->column('title_en');
|
|
|
+ } else {
|
|
|
+ $grid->column('title');
|
|
|
+ }
|
|
|
$grid->column('model');
|
|
|
$grid->column('missing_content')->display(function ($missing_content) {
|
|
|
$missing_content = [];
|
|
@@ -129,7 +134,13 @@ class ImportProductController extends AdminController
|
|
|
protected function detail($id)
|
|
|
{
|
|
|
return Show::make($id, new RpcAlbum(), function (Show $show) {
|
|
|
- $show->field('title');
|
|
|
+ $lang = config('app.locale');
|
|
|
+ if ($lang == 'en') {
|
|
|
+ $show->field('title_en');
|
|
|
+ } else {
|
|
|
+ $show->field('title');
|
|
|
+ }
|
|
|
+
|
|
|
$show->field('model');
|
|
|
$show->field('parameters',admin_trans_label('attribute'))->as(function ($items) {
|
|
|
$items = json_decode($items);
|