diff --git a/controllers/admin/AdminAddressesController.php b/controllers/admin/AdminAddressesController.php index 40c5b8b18..afc8f587b 100644 --- a/controllers/admin/AdminAddressesController.php +++ b/controllers/admin/AdminAddressesController.php @@ -99,7 +99,7 @@ class AdminAddressesControllerCore extends AdminController public function initPageHeaderToolbar() { - if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { + if (empty($this->display)) { $this->page_header_toolbar_btn['new_address'] = array( 'href' => self::$currentIndex.'&addaddress&token='.$this->token, 'desc' => $this->l('Add new address', null, null, false), diff --git a/controllers/admin/AdminAttachmentsController.php b/controllers/admin/AdminAttachmentsController.php index 5547e8817..8ded2eca2 100644 --- a/controllers/admin/AdminAttachmentsController.php +++ b/controllers/admin/AdminAttachmentsController.php @@ -96,7 +96,7 @@ class AdminAttachmentsControllerCore extends AdminController public function initPageHeaderToolbar() { - if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { + if (empty($this->display)) { $this->page_header_toolbar_btn['new_attachment'] = array( 'href' => self::$currentIndex.'&addattachment&token='.$this->token, 'desc' => $this->l('Add new attachment', null, null, false), diff --git a/controllers/admin/AdminAttributesGroupsController.php b/controllers/admin/AdminAttributesGroupsController.php index 87de868f5..c47cb31e3 100644 --- a/controllers/admin/AdminAttributesGroupsController.php +++ b/controllers/admin/AdminAttributesGroupsController.php @@ -506,7 +506,7 @@ class AdminAttributesGroupsControllerCore extends AdminController public function initPageHeaderToolbar() { - if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { + if (empty($this->display)) { $this->page_header_toolbar_btn['new_attribute_group'] = array( 'href' => self::$currentIndex.'&addattribute_group&token='.$this->token, 'desc' => $this->l('Add new attribute', null, null, false), diff --git a/controllers/admin/AdminCartRulesController.php b/controllers/admin/AdminCartRulesController.php index faba740df..a09ffc12b 100644 --- a/controllers/admin/AdminCartRulesController.php +++ b/controllers/admin/AdminCartRulesController.php @@ -260,7 +260,7 @@ class AdminCartRulesControllerCore extends AdminController public function initPageHeaderToolbar() { - if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { + if (empty($this->display)) { $this->page_header_toolbar_btn['new_cart_rule'] = array( 'href' => self::$currentIndex.'&addcart_rule&token='.$this->token, 'desc' => $this->l('Add new cart rule', null, null, false), diff --git a/controllers/admin/AdminCartsController.php b/controllers/admin/AdminCartsController.php index 81add9744..2ce84593f 100644 --- a/controllers/admin/AdminCartsController.php +++ b/controllers/admin/AdminCartsController.php @@ -168,7 +168,7 @@ class AdminCartsControllerCore extends AdminController public function initPageHeaderToolbar() { - if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { + if (empty($this->display)) { $this->page_header_toolbar_btn['export_cart'] = array( 'href' => self::$currentIndex.'&exportcart&token='.$this->token, 'desc' => $this->l('Export carts', null, null, false), diff --git a/controllers/admin/AdminCategoriesController.php b/controllers/admin/AdminCategoriesController.php index 119e8354a..5576d3de6 100644 --- a/controllers/admin/AdminCategoriesController.php +++ b/controllers/admin/AdminCategoriesController.php @@ -278,7 +278,7 @@ class AdminCategoriesControllerCore extends AdminController public function initToolbar() { - if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { + if (empty($this->display)) { $this->toolbar_btn['new'] = array( 'href' => self::$currentIndex.'&add'.$this->table.'&token='.$this->token, 'desc' => $this->l('Add New') @@ -317,7 +317,7 @@ class AdminCategoriesControllerCore extends AdminController unset($this->toolbar_btn['new']); } // after adding a category - if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { + if (empty($this->display)) { $id_category = (Tools::isSubmit('id_category')) ? '&id_parent='.(int)Tools::getValue('id_category') : ''; $this->toolbar_btn['new'] = array( 'href' => self::$currentIndex.'&add'.$this->table.'&token='.$this->token.$id_category, diff --git a/controllers/admin/AdminContactsController.php b/controllers/admin/AdminContactsController.php index 7136dac08..3d7ae5b25 100644 --- a/controllers/admin/AdminContactsController.php +++ b/controllers/admin/AdminContactsController.php @@ -139,7 +139,7 @@ class AdminContactsControllerCore extends AdminController public function initPageHeaderToolbar() { $this->initToolbar(); - if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { + if (empty($this->display)) { $this->page_header_toolbar_btn['new_contact'] = array( 'href' => self::$currentIndex.'&addcontact&token='.$this->token, 'desc' => $this->l('Add new contact', null, null, false), diff --git a/controllers/admin/AdminCountriesController.php b/controllers/admin/AdminCountriesController.php index f4b7e1e4f..becf523cb 100644 --- a/controllers/admin/AdminCountriesController.php +++ b/controllers/admin/AdminCountriesController.php @@ -120,7 +120,7 @@ class AdminCountriesControllerCore extends AdminController public function initPageHeaderToolbar() { - if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { + if (empty($this->display)) { $this->page_header_toolbar_btn['new_country'] = array( 'href' => self::$currentIndex.'&addcountry&token='.$this->token, 'desc' => $this->l('Add new country', null, null, false), diff --git a/controllers/admin/AdminCurrenciesController.php b/controllers/admin/AdminCurrenciesController.php index ba3bed966..6f6e1ded2 100644 --- a/controllers/admin/AdminCurrenciesController.php +++ b/controllers/admin/AdminCurrenciesController.php @@ -361,7 +361,7 @@ class AdminCurrenciesControllerCore extends AdminController public function initPageHeaderToolbar() { - if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { + if (empty($this->display)) { $this->page_header_toolbar_btn['new_currency'] = array( 'href' => self::$currentIndex.'&addcurrency&token='.$this->token, 'desc' => $this->l('Add new currency', null, null, false), diff --git a/controllers/admin/AdminEmployeesController.php b/controllers/admin/AdminEmployeesController.php index 1a5decb74..a6e770a54 100644 --- a/controllers/admin/AdminEmployeesController.php +++ b/controllers/admin/AdminEmployeesController.php @@ -177,7 +177,7 @@ class AdminEmployeesControllerCore extends AdminController { parent::initPageHeaderToolbar(); - if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { + if (empty($this->display) || $this->display == 'list') { $this->page_header_toolbar_btn['new_employee'] = array( 'href' => self::$currentIndex.'&addemployee&token='.$this->token, 'desc' => $this->l('Add new employee', null, null, false), diff --git a/controllers/admin/AdminFeaturesController.php b/controllers/admin/AdminFeaturesController.php index c94266099..c57d5d807 100644 --- a/controllers/admin/AdminFeaturesController.php +++ b/controllers/admin/AdminFeaturesController.php @@ -231,7 +231,7 @@ class AdminFeaturesControllerCore extends AdminController public function initPageHeaderToolbar() { - if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { + if (empty($this->display)) { $this->page_header_toolbar_btn['new_feature'] = array( 'href' => self::$currentIndex.'&addfeature&token='.$this->token, 'desc' => $this->l('Add new room feature', null, null, false), diff --git a/controllers/admin/AdminGendersController.php b/controllers/admin/AdminGendersController.php index 894df14ef..7331a9c4c 100644 --- a/controllers/admin/AdminGendersController.php +++ b/controllers/admin/AdminGendersController.php @@ -97,7 +97,7 @@ class AdminGendersControllerCore extends AdminController public function initPageHeaderToolbar() { - if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { + if (empty($this->display)) { $this->page_header_toolbar_btn['new_gender'] = array( 'href' => self::$currentIndex.'&addgender&token='.$this->token, 'desc' => $this->l('Add new title', null, null, false), diff --git a/controllers/admin/AdminImagesController.php b/controllers/admin/AdminImagesController.php index 6f9dc7f32..fd13096c9 100644 --- a/controllers/admin/AdminImagesController.php +++ b/controllers/admin/AdminImagesController.php @@ -823,7 +823,7 @@ class AdminImagesControllerCore extends AdminController public function initPageHeaderToolbar() { - if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { + if (empty($this->display) || $this->display == 'list') { $this->page_header_toolbar_btn['new_image_type'] = array( 'href' => self::$currentIndex.'&addimage_type&token='.$this->token, 'desc' => $this->l('Add new image type', null, null, false), diff --git a/controllers/admin/AdminLanguagesController.php b/controllers/admin/AdminLanguagesController.php index 0f5f60f51..f655284a7 100644 --- a/controllers/admin/AdminLanguagesController.php +++ b/controllers/admin/AdminLanguagesController.php @@ -107,7 +107,7 @@ class AdminLanguagesControllerCore extends AdminController public function initPageHeaderToolbar() { - if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { + if (empty($this->display)) { $this->page_header_toolbar_btn['new_language'] = array( 'href' => self::$currentIndex.'&addlang&token='.$this->token, 'desc' => $this->l('Add new language', null, null, false), diff --git a/controllers/admin/AdminManufacturersController.php b/controllers/admin/AdminManufacturersController.php index ea594419e..68718fc3d 100644 --- a/controllers/admin/AdminManufacturersController.php +++ b/controllers/admin/AdminManufacturersController.php @@ -109,7 +109,7 @@ class AdminManufacturersControllerCore extends AdminController public function initPageHeaderToolbar() { - if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { + if (empty($this->display)) { $this->page_header_toolbar_btn['new_manufacturer'] = array( 'href' => self::$currentIndex.'&addmanufacturer&token='.$this->token, 'desc' => $this->l('Add new manufacturer', null, null, false), diff --git a/controllers/admin/AdminMetaController.php b/controllers/admin/AdminMetaController.php index af5a251a6..49e2cd99c 100644 --- a/controllers/admin/AdminMetaController.php +++ b/controllers/admin/AdminMetaController.php @@ -229,7 +229,7 @@ class AdminMetaControllerCore extends AdminController public function initPageHeaderToolbar() { - if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { + if (empty($this->display) || $this->display == 'list') { $this->page_header_toolbar_btn['new_meta'] = array( 'href' => self::$currentIndex.'&addmeta&token='.$this->token, 'desc' => $this->l('Add a new page', null, null, false), diff --git a/controllers/admin/AdminNormalProductsController.php b/controllers/admin/AdminNormalProductsController.php index 738fbebc5..c584a46b6 100644 --- a/controllers/admin/AdminNormalProductsController.php +++ b/controllers/admin/AdminNormalProductsController.php @@ -2610,7 +2610,7 @@ class AdminNormalProductsControllerCore extends AdminController public function initPageHeaderToolbar() { - if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { + if (empty($this->display)) { $this->page_header_toolbar_btn['new_product'] = array( 'href' => self::$currentIndex.'&addproduct&token='.$this->token, // 'desc' => $this->l('Add new room type', null, null, false), diff --git a/controllers/admin/AdminOrderMessageController.php b/controllers/admin/AdminOrderMessageController.php index 23e4c144c..b6eb07604 100644 --- a/controllers/admin/AdminOrderMessageController.php +++ b/controllers/admin/AdminOrderMessageController.php @@ -108,7 +108,7 @@ class AdminOrderMessageControllerCore extends AdminController public function initPageHeaderToolbar() { - if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { + if (empty($this->display)) { $this->page_header_toolbar_btn['new_order_message'] = array( 'href' => self::$currentIndex.'&addorder_message&token='.$this->token, 'desc' => $this->l('Add new order message'), diff --git a/controllers/admin/AdminOrdersController.php b/controllers/admin/AdminOrdersController.php index 66084f050..0027eb0bb 100644 --- a/controllers/admin/AdminOrdersController.php +++ b/controllers/admin/AdminOrdersController.php @@ -360,7 +360,7 @@ class AdminOrdersControllerCore extends AdminController public function initPageHeaderToolbar() { - if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { + if (empty($this->display)) { $this->page_header_toolbar_btn['new_order'] = array( 'href' => self::$currentIndex.'&addorder&token='.$this->token, 'desc' => $this->l('Add new order', null, null, false), diff --git a/controllers/admin/AdminProductsController.php b/controllers/admin/AdminProductsController.php index 819333ea5..cf55c7d7f 100644 --- a/controllers/admin/AdminProductsController.php +++ b/controllers/admin/AdminProductsController.php @@ -2649,7 +2649,7 @@ class AdminProductsControllerCore extends AdminController public function initPageHeaderToolbar() { - if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { + if (empty($this->display)) { $this->page_header_toolbar_btn['new_product'] = array( 'href' => self::$currentIndex.'&addproduct&token='.$this->token, // 'desc' => $this->l('Add new room type', null, null, false), diff --git a/controllers/admin/AdminProfilesController.php b/controllers/admin/AdminProfilesController.php index 57bdca16d..56d9f04d3 100644 --- a/controllers/admin/AdminProfilesController.php +++ b/controllers/admin/AdminProfilesController.php @@ -114,7 +114,7 @@ class AdminProfilesControllerCore extends AdminController public function initPageHeaderToolbar() { - if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { + if (empty($this->display)) { $this->page_header_toolbar_btn['new_profile'] = array( 'href' => self::$currentIndex.'&addprofile&token='.$this->token, 'desc' => $this->l('Add new profile', null, null, false), diff --git a/controllers/admin/AdminQuickAccessesController.php b/controllers/admin/AdminQuickAccessesController.php index ecd8d5d0d..1f4b5bab9 100644 --- a/controllers/admin/AdminQuickAccessesController.php +++ b/controllers/admin/AdminQuickAccessesController.php @@ -135,7 +135,7 @@ class AdminQuickAccessesControllerCore extends AdminController public function initPageHeaderToolbar() { - if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { + if (empty($this->display)) { $this->page_header_toolbar_btn['new_quick_access'] = array( 'href' => self::$currentIndex.'&addquick_access&token='.$this->token, 'desc' => $this->l('Add new quick access', null, null, false), diff --git a/controllers/admin/AdminReferrersController.php b/controllers/admin/AdminReferrersController.php index 17e143c25..bed1574e2 100644 --- a/controllers/admin/AdminReferrersController.php +++ b/controllers/admin/AdminReferrersController.php @@ -168,7 +168,7 @@ class AdminReferrersControllerCore extends AdminController public function initPageHeaderToolbar() { - if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { + if (empty($this->display)) { $this->page_header_toolbar_btn['new_referrer'] = array( 'href' => self::$currentIndex.'&addreferrer&token='.$this->token, 'desc' => $this->l('Add new referrer', null, null, false), diff --git a/controllers/admin/AdminRequestSqlController.php b/controllers/admin/AdminRequestSqlController.php index a36151e9e..e8c431aa1 100644 --- a/controllers/admin/AdminRequestSqlController.php +++ b/controllers/admin/AdminRequestSqlController.php @@ -310,7 +310,7 @@ class AdminRequestSqlControllerCore extends AdminController public function initPageHeaderToolbar() { - if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { + if (empty($this->display) || $this->display == 'list') { $this->page_header_toolbar_btn['new_request'] = array( 'href' => self::$currentIndex.'&addrequest_sql&token='.$this->token, 'desc' => $this->l('Add new SQL query', null, null, false), diff --git a/controllers/admin/AdminScenesController.php b/controllers/admin/AdminScenesController.php index eed625718..ccd3f2793 100644 --- a/controllers/admin/AdminScenesController.php +++ b/controllers/admin/AdminScenesController.php @@ -120,7 +120,7 @@ class AdminScenesControllerCore extends AdminController public function initPageHeaderToolbar() { - if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { + if (empty($this->display)) { $this->page_header_toolbar_btn['new_scene'] = array( 'href' => self::$currentIndex.'&addscene&token='.$this->token, 'desc' => $this->l('Add new image map', null, null, false), diff --git a/controllers/admin/AdminSearchConfController.php b/controllers/admin/AdminSearchConfController.php index aafb69f1b..e07881d2c 100644 --- a/controllers/admin/AdminSearchConfController.php +++ b/controllers/admin/AdminSearchConfController.php @@ -242,7 +242,7 @@ class AdminSearchConfControllerCore extends AdminController public function initPageHeaderToolbar() { - if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { + if (empty($this->display) || $this->display == 'list') { $this->page_header_toolbar_btn['new_alias'] = array( 'href' => self::$currentIndex.'&addalias&token='.$this->token, 'desc' => $this->l('Add new alias', null, null, false), diff --git a/controllers/admin/AdminSearchEnginesController.php b/controllers/admin/AdminSearchEnginesController.php index 266eb1756..92d4c1929 100644 --- a/controllers/admin/AdminSearchEnginesController.php +++ b/controllers/admin/AdminSearchEnginesController.php @@ -92,7 +92,7 @@ class AdminSearchEnginesControllerCore extends AdminController public function initPageHeaderToolbar() { - if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { + if (empty($this->display)) { $this->page_header_toolbar_btn['new_search_engine'] = array( 'href' => self::$currentIndex.'&addsearch_engine&token='.$this->token, 'desc' => $this->l('Add new search engine', null, null, false), diff --git a/controllers/admin/AdminSpecificPriceRuleController.php b/controllers/admin/AdminSpecificPriceRuleController.php index e6e2de668..783aced1d 100644 --- a/controllers/admin/AdminSpecificPriceRuleController.php +++ b/controllers/admin/AdminSpecificPriceRuleController.php @@ -130,7 +130,7 @@ class AdminSpecificPriceRuleControllerCore extends AdminController public function initPageHeaderToolbar() { - if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { + if (empty($this->display)) { $this->page_header_toolbar_btn['new_specific_price_rule'] = array( 'href' => self::$currentIndex.'&addspecific_price_rule&token='.$this->token, 'desc' => $this->l('Add new catalog price rule', null, null, false), diff --git a/controllers/admin/AdminStatesController.php b/controllers/admin/AdminStatesController.php index b4a3fb717..6c549289f 100644 --- a/controllers/admin/AdminStatesController.php +++ b/controllers/admin/AdminStatesController.php @@ -114,7 +114,7 @@ class AdminStatesControllerCore extends AdminController public function initPageHeaderToolbar() { - if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { + if (empty($this->display)) { $this->page_header_toolbar_btn['new_state'] = array( 'href' => self::$currentIndex.'&addstate&token='.$this->token, 'desc' => $this->l('Add new state', null, null, false), diff --git a/controllers/admin/AdminStatusesController.php b/controllers/admin/AdminStatusesController.php index ab0e269a9..aadb4ee44 100644 --- a/controllers/admin/AdminStatusesController.php +++ b/controllers/admin/AdminStatusesController.php @@ -242,7 +242,7 @@ class AdminStatusesControllerCore extends AdminController public function initPageHeaderToolbar() { - if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { + if (empty($this->display)) { $this->page_header_toolbar_btn['new_order_state'] = array( 'href' => self::$currentIndex.'&addorder_state&token='.$this->token, 'desc' => $this->l('Add new order status', null, null, false), diff --git a/controllers/admin/AdminStoresController.php b/controllers/admin/AdminStoresController.php index 8f73711ed..6e56fee02 100644 --- a/controllers/admin/AdminStoresController.php +++ b/controllers/admin/AdminStoresController.php @@ -139,7 +139,7 @@ class AdminStoresControllerCore extends AdminController public function initPageHeaderToolbar() { - if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { + if (empty($this->display)) { $this->page_header_toolbar_btn['new_store'] = array( 'href' => self::$currentIndex.'&addstore&token='.$this->token, 'desc' => $this->l('Add new store', null, null, false), diff --git a/controllers/admin/AdminSuppliersController.php b/controllers/admin/AdminSuppliersController.php index 15408bdf9..12d994703 100644 --- a/controllers/admin/AdminSuppliersController.php +++ b/controllers/admin/AdminSuppliersController.php @@ -78,7 +78,7 @@ class AdminSuppliersControllerCore extends AdminController public function initPageHeaderToolbar() { - if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { + if (empty($this->display)) { $this->page_header_toolbar_btn['new_supplier'] = array( 'href' => self::$currentIndex.'&addsupplier&token='.$this->token, 'desc' => $this->l('Add new supplier', null, null, false), diff --git a/controllers/admin/AdminSupplyOrdersController.php b/controllers/admin/AdminSupplyOrdersController.php index dc8ae73bb..485bf6d90 100644 --- a/controllers/admin/AdminSupplyOrdersController.php +++ b/controllers/admin/AdminSupplyOrdersController.php @@ -161,7 +161,7 @@ class AdminSupplyOrdersControllerCore extends AdminController 'desc' => $this->l('Back to list', null, null, false), 'icon' => 'process-icon-back' ); - } elseif ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { + } elseif (empty($this->display)) { $this->page_header_toolbar_btn['new_supply_order'] = array( 'href' => self::$currentIndex.'&addsupply_order&token='.$this->token, 'desc' => $this->l('Add new supply order', null, null, false), diff --git a/controllers/admin/AdminTabsController.php b/controllers/admin/AdminTabsController.php index 19d0b72df..509a55057 100644 --- a/controllers/admin/AdminTabsController.php +++ b/controllers/admin/AdminTabsController.php @@ -96,7 +96,7 @@ class AdminTabsControllerCore extends AdminController 'desc' => $this->l('Back to list', null, null, false), 'icon' => 'process-icon-back' ); - } elseif ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { + } elseif (empty($this->display)) { $this->page_header_toolbar_btn['new_menu'] = array( 'href' => self::$currentIndex.'&addtab&token='.$this->token, 'desc' => $this->l('Add new menu', null, null, false), diff --git a/controllers/admin/AdminTagsController.php b/controllers/admin/AdminTagsController.php index bf8c850c6..5322e6ea6 100644 --- a/controllers/admin/AdminTagsController.php +++ b/controllers/admin/AdminTagsController.php @@ -71,7 +71,7 @@ class AdminTagsControllerCore extends AdminController public function initPageHeaderToolbar() { - if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { + if (empty($this->display)) { $this->page_header_toolbar_btn['new_tag'] = array( 'href' => self::$currentIndex.'&addtag&token='.$this->token, 'desc' => $this->l('Add new tag', null, null, false), diff --git a/controllers/admin/AdminTaxRulesGroupController.php b/controllers/admin/AdminTaxRulesGroupController.php index 878b1c4e7..ba62da512 100644 --- a/controllers/admin/AdminTaxRulesGroupController.php +++ b/controllers/admin/AdminTaxRulesGroupController.php @@ -77,7 +77,7 @@ class AdminTaxRulesGroupControllerCore extends AdminController public function initPageHeaderToolbar() { - if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { + if (empty($this->display)) { $this->page_header_toolbar_btn['new_tax_rules_group'] = array( 'href' => self::$currentIndex.'&addtax_rules_group&token='.$this->token, 'desc' => $this->l('Add new tax rules group', null, null, false), diff --git a/controllers/admin/AdminTaxesController.php b/controllers/admin/AdminTaxesController.php index 38c8da23e..65bf9275a 100644 --- a/controllers/admin/AdminTaxesController.php +++ b/controllers/admin/AdminTaxesController.php @@ -117,7 +117,7 @@ class AdminTaxesControllerCore extends AdminController public function initPageHeaderToolbar() { - if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { + if (empty($this->display) || $this->display == 'list') { $this->page_header_toolbar_btn['new_tax'] = array( 'href' => self::$currentIndex.'&addtax&token='.$this->token, 'desc' => $this->l('Add new tax', null, null, false), diff --git a/controllers/admin/AdminThemesController.php b/controllers/admin/AdminThemesController.php index 61105c518..09470ad22 100644 --- a/controllers/admin/AdminThemesController.php +++ b/controllers/admin/AdminThemesController.php @@ -734,7 +734,7 @@ class AdminThemesControllerCore extends AdminController { parent::initPageHeaderToolbar(); - if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { + if (empty($this->display)) { $this->page_header_toolbar_btn['import_theme'] = array( 'href' => self::$currentIndex.'&action=importtheme&token='.$this->token, 'desc' => $this->l('Add new theme', null, null, false), diff --git a/controllers/admin/AdminWarehousesController.php b/controllers/admin/AdminWarehousesController.php index 4011597eb..0ae0e5ae8 100644 --- a/controllers/admin/AdminWarehousesController.php +++ b/controllers/admin/AdminWarehousesController.php @@ -85,7 +85,7 @@ class AdminWarehousesControllerCore extends AdminController public function initPageHeaderToolbar() { - if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { + if (empty($this->display)) { $this->page_header_toolbar_btn['new_warehouse'] = array( 'href' => self::$currentIndex.'&addwarehouse&token='.$this->token, 'desc' => $this->l('Add new warehouse', null, null, false), diff --git a/controllers/admin/AdminWebserviceController.php b/controllers/admin/AdminWebserviceController.php index f7ca60f65..f44c412cb 100644 --- a/controllers/admin/AdminWebserviceController.php +++ b/controllers/admin/AdminWebserviceController.php @@ -102,7 +102,7 @@ class AdminWebserviceControllerCore extends AdminController public function initPageHeaderToolbar() { - if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { + if (empty($this->display)) { $this->page_header_toolbar_btn['new_webservice'] = array( 'href' => self::$currentIndex.'&addwebservice_account&token='.$this->token, 'desc' => $this->l('Add new webservice key', null, null, false), diff --git a/controllers/admin/AdminZonesController.php b/controllers/admin/AdminZonesController.php index b215ee276..925e92170 100644 --- a/controllers/admin/AdminZonesController.php +++ b/controllers/admin/AdminZonesController.php @@ -69,7 +69,7 @@ class AdminZonesControllerCore extends AdminController public function initPageHeaderToolbar() { - if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { + if (empty($this->display)) { $this->page_header_toolbar_btn['new_zone'] = array( 'href' => self::$currentIndex.'&addzone&token='.$this->token, 'desc' => $this->l('Add new zone', null, null, false),