fix(main): Separate slide tpl from banner tpl
also added a toggle column for active in the group view
This commit is contained in:
@@ -9,6 +9,7 @@ use PrestaShop\PrestaShop\Core\Grid\Action\Type\SimpleGridAction;
|
||||
use PrestaShop\PrestaShop\Core\Grid\Column\ColumnCollection;
|
||||
use PrestaShop\PrestaShop\Core\Grid\Column\Type\Common\ActionColumn;
|
||||
use PrestaShop\PrestaShop\Core\Grid\Column\Type\Common\PositionColumn;
|
||||
use PrestaShop\PrestaShop\Core\Grid\Column\Type\Common\ToggleColumn;
|
||||
use PrestaShop\PrestaShop\Core\Grid\Column\Type\DataColumn;
|
||||
use PrestaShop\PrestaShop\Core\Grid\Definition\Factory\AbstractGridDefinitionFactory;
|
||||
use PrestaShop\PrestaShop\Core\Grid\Definition\Factory\DeleteActionTrait;
|
||||
@@ -78,9 +79,14 @@ final class CustomHtmlGroupGridDefinitionFactory extends AbstractGridDefinitionF
|
||||
->setOptions(['field' => 'blocks_count', 'sortable' => false])
|
||||
)
|
||||
->add(
|
||||
(new DataColumn('active'))
|
||||
(new ToggleColumn('active'))
|
||||
->setName($this->trans('Active', [], 'Admin.Global'))
|
||||
->setOptions(['field' => 'active'])
|
||||
->setOptions([
|
||||
'field' => 'active',
|
||||
'primary_field' => 'id_ws_customhtml_group',
|
||||
'route' => 'customhtmlgroup_toggle',
|
||||
'route_param_name' => 'idCustomHtmlGroup',
|
||||
])
|
||||
)
|
||||
->add(
|
||||
(new PositionColumn('position'))
|
||||
|
||||
Reference in New Issue
Block a user