From 4f022c48f8459f89c4dd93a348308d31341b903e Mon Sep 17 00:00:00 2001 From: Jerome Nadaud Date: Tue, 27 Aug 2013 18:23:38 +0200 Subject: [PATCH] [+] BO : Products page header toolbar --- .../admin/AdminAttributesGroupsController.php | 17 +++++++++++++++++ controllers/admin/AdminCategoriesController.php | 12 ++++++++++++ controllers/admin/AdminProductsController.php | 12 ++++++++++++ 3 files changed, 41 insertions(+) diff --git a/controllers/admin/AdminAttributesGroupsController.php b/controllers/admin/AdminAttributesGroupsController.php index 967d9cca3..43ac6eebc 100644 --- a/controllers/admin/AdminAttributesGroupsController.php +++ b/controllers/admin/AdminAttributesGroupsController.php @@ -467,6 +467,23 @@ class AdminAttributesGroupsControllerCore extends AdminController )); } + public function initPageHeaderToolbar() + { + $this->page_header_toolbar_title = $this->l('Products'); + $this->page_header_toolbar_btn['new_attribute_group'] = array( + 'href' => self::$currentIndex.'&addattribute_group&token='.$this->token, + 'desc' => $this->l('Add new attribute'), + 'icon' => 'process-icon-new' + ); + $this->page_header_toolbar_btn['new_value'] = array( + 'href' => self::$currentIndex.'&updateattribute&token='.$this->token, + 'desc' => $this->l('Add new value'), + 'icon' => 'process-icon-new' + ); + + parent::initPageHeaderToolbar(); + } + public function initToolbar() { switch ($this->display) diff --git a/controllers/admin/AdminCategoriesController.php b/controllers/admin/AdminCategoriesController.php index 12825f7d9..bed3450e3 100644 --- a/controllers/admin/AdminCategoriesController.php +++ b/controllers/admin/AdminCategoriesController.php @@ -154,6 +154,18 @@ class AdminCategoriesControllerCore extends AdminController $this->redirect(); } } + + public function initPageHeaderToolbar() + { + $this->page_header_toolbar_title = $this->l('Categories'); + $this->page_header_toolbar_btn['new_category'] = array( + 'href' => self::$currentIndex.'&addcategory&token='.$this->token, + 'desc' => $this->l('Add new category'), + 'icon' => 'process-icon-new' + ); + + parent::initPageHeaderToolbar(); + } public function initContent() { diff --git a/controllers/admin/AdminProductsController.php b/controllers/admin/AdminProductsController.php index ccc1e840a..8aba06710 100644 --- a/controllers/admin/AdminProductsController.php +++ b/controllers/admin/AdminProductsController.php @@ -2400,6 +2400,18 @@ class AdminProductsControllerCore extends AdminController $this->tpl_form_vars['draft_warning'] = $content; } + public function initPageHeaderToolbar() + { + $this->page_header_toolbar_title = $this->l('Products'); + $this->page_header_toolbar_btn['new_product'] = array( + 'href' => self::$currentIndex.'&addproduct&token='.$this->token, + 'desc' => $this->l('Add new product'), + 'icon' => 'process-icon-new' + ); + + parent::initPageHeaderToolbar(); + } + public function initToolbar() { parent::initToolbar();