[-] BO : Bug Fixed #2676 - Missing button in group shop tab
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15871 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -42,6 +42,8 @@ class AdminShopGroupControllerCore extends AdminController
|
||||
if (!Tools::getValue('realedit'))
|
||||
$this->deleted = false;
|
||||
|
||||
$this->show_toolbar = false;
|
||||
|
||||
$this->fields_list = array(
|
||||
'id_shop_group' => array(
|
||||
'title' => $this->l('ID'),
|
||||
@@ -84,20 +86,21 @@ class AdminShopGroupControllerCore extends AdminController
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
public function initToolbar()
|
||||
{
|
||||
parent::initToolbar();
|
||||
|
||||
$this->show_toolbar = false;
|
||||
if (isset($this->toolbar_btn['new']))
|
||||
$this->toolbar_btn['new']['desc'] = $this->l('Add new shop group');
|
||||
}
|
||||
|
||||
public function initContent()
|
||||
{
|
||||
$this->list_simple_header = true;
|
||||
parent::initContent();
|
||||
|
||||
unset($this->toolbar_btn);
|
||||
$this->toolbar_btn['new'] = array(
|
||||
'desc' => $this->l('Add new shop group'),
|
||||
'href' => self::$currentIndex.'&add'.$this->table.'&token='.$this->token, );
|
||||
$this->toolbar_btn['new_2'] = array(
|
||||
'desc' => $this->l('Add new shop'),
|
||||
'href' => $this->context->link->getAdminLink('AdminShop').'&addshop',
|
||||
'imgclass' => 'new'
|
||||
);
|
||||
|
||||
$this->addJqueryPlugin('cooki');
|
||||
$this->addJqueryPlugin('jstree');
|
||||
$this->addCSS(_PS_JS_DIR_.'jquery/plugins/jstree/themes/classic/style.css');
|
||||
@@ -288,6 +291,25 @@ class AdminShopGroupControllerCore extends AdminController
|
||||
//Reset available quantitites
|
||||
StockAvailable::resetProductFromStockAvailableByShopGroup($new_shop_group);
|
||||
}
|
||||
|
||||
public function renderOptions()
|
||||
{
|
||||
if ($this->fields_options && is_array($this->fields_options))
|
||||
{
|
||||
$this->display = 'options';
|
||||
$this->show_toolbar = true;
|
||||
|
||||
unset($this->toolbar_btn);
|
||||
$this->initToolbar();
|
||||
$helper = new HelperOptions($this);
|
||||
$this->setHelperDisplay($helper);
|
||||
$helper->id = $this->id;
|
||||
$helper->tpl_vars = $this->tpl_option_vars;
|
||||
$options = $helper->generateOptions($this->fields_options);
|
||||
|
||||
return $options;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user