From 9d991f34742459ce4e8cdff23d543510c927f0e7 Mon Sep 17 00:00:00 2001 From: Jerome Nadaud Date: Wed, 28 Aug 2013 11:16:36 +0200 Subject: [PATCH] [+] BO : Page header toolbar --- controllers/admin/AdminRangePriceController.php | 12 ++++++++++++ controllers/admin/AdminRangeWeightController.php | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/controllers/admin/AdminRangePriceController.php b/controllers/admin/AdminRangePriceController.php index 1cc087515..999a2f522 100644 --- a/controllers/admin/AdminRangePriceController.php +++ b/controllers/admin/AdminRangePriceController.php @@ -50,6 +50,18 @@ class AdminRangePriceControllerCore extends AdminController parent::__construct(); } + public function initPageHeaderToolbar() + { + $this->page_header_toolbar_title = $this->l('Price ranges'); + $this->page_header_toolbar_btn['new_price_range'] = array( + 'href' => self::$currentIndex.'&addrange_price&token='.$this->token, + 'desc' => $this->l('Add new price range'), + 'icon' => 'process-icon-new' + ); + + parent::initPageHeaderToolbar(); + } + public function renderForm() { $currency = $this->context->currency; diff --git a/controllers/admin/AdminRangeWeightController.php b/controllers/admin/AdminRangeWeightController.php index 71d119a14..8db4d57b2 100644 --- a/controllers/admin/AdminRangeWeightController.php +++ b/controllers/admin/AdminRangeWeightController.php @@ -50,6 +50,18 @@ class AdminRangeWeightControllerCore extends AdminController parent::__construct(); } + public function initPageHeaderToolbar() + { + $this->page_header_toolbar_title = $this->l('Weight ranges'); + $this->page_header_toolbar_btn['new_weight_range'] = array( + 'href' => self::$currentIndex.'&addrange_weight&token='.$this->token, + 'desc' => $this->l('Add new weight range'), + 'icon' => 'process-icon-new' + ); + + parent::initPageHeaderToolbar(); + } + public function renderForm() { $carriers = Carrier::getCarriers($this->context->language->id, true, false, false, null, Carrier::PS_CARRIERS_AND_CARRIER_MODULES_NEED_RANGE);