From 31805a7c8cf1fa2fdcf4f48d187f9efd3d1d005e Mon Sep 17 00:00:00 2001 From: lLefevre Date: Fri, 16 Mar 2012 09:21:01 +0000 Subject: [PATCH] [-] BO : #PSTEST-1033 : Fix bug Toolbar for coordonate and stores --- controllers/admin/AdminStoresController.php | 29 +++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/controllers/admin/AdminStoresController.php b/controllers/admin/AdminStoresController.php index de1dd7f97..ae0ad3a1b 100644 --- a/controllers/admin/AdminStoresController.php +++ b/controllers/admin/AdminStoresController.php @@ -33,6 +33,7 @@ class AdminStoresControllerCore extends AdminController $this->className = 'Store'; $this->lang = false; $this->requiredDatabase = true; + $this->toolbar_scroll = false; $this->context = Context::getContext(); @@ -106,8 +107,7 @@ class AdminStoresControllerCore extends AdminController 'type' => 'text', 'size' => '10' ) - ), - 'submit' => array() + ) ) ); @@ -116,8 +116,33 @@ class AdminStoresControllerCore extends AdminController $this->_buildOrderedFieldsShop($this->_getDefaultFieldsContent()); } + public function renderOptions() + { + // Set toolbar options + $this->display = 'options'; + $this->show_toolbar = true; + $this->toolbar_scroll = true; + $this->initToolbar(); + + return parent::renderOptions(); + } + + public function initToolbar() + { + parent::initToolbar(); + + if ($this->display == 'options') + unset($this->toolbar_btn['new']); + else + unset($this->toolbar_btn['save']); + } + public function renderList() { + // Set toolbar options + $this->display = null; + $this->initToolbar(); + $this->addRowAction('edit'); $this->addRowAction('delete');