// Helper now can uses toolbar
// bugfix in category listing and editing // display fix in adminHome git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9695 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -123,11 +123,28 @@ class AdminCategoriesControllerCore extends AdminController
|
||||
|
||||
public function initView()
|
||||
{
|
||||
$this->initToolbar();
|
||||
$this->content .= $this->initList();
|
||||
}
|
||||
|
||||
public function initToolbar()
|
||||
{
|
||||
if (empty($this->display))
|
||||
$this->toolbar_btn['new'] = array(
|
||||
'href' => self::$currentIndex.'&add'.$this->table.'&token='.$this->token,
|
||||
'desc' => $this->l('Add new')
|
||||
);
|
||||
if ($this->display == 'view')
|
||||
$this->toolbar_btn['new'] = array(
|
||||
'href' => self::$currentIndex.'&add'.$this->table.'&id_parent='.Tools::getValue('id_category').'&token='.$this->token,
|
||||
'desc' => $this->l('Add new')
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
public function initForm()
|
||||
{
|
||||
$obj = $this->loadObject(true);
|
||||
$selected_cat = array(isset($obj->id_parent) ? $obj->id_parent : Tools::getValue('id_parent', 1));
|
||||
if (sizeof($selected_cat) > 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user