Merge pull request #1230 from vishal-singh-webkul/gli-2280

Fixed: The add new button disappears when the controller display type is not empty in admin controllers in the back-office.
This commit is contained in:
Rohit Jain
2024-10-03 19:17:05 +05:30
committed by GitHub
6 changed files with 6 additions and 6 deletions

View File

@@ -177,7 +177,7 @@ class AdminEmployeesControllerCore extends AdminController
{
parent::initPageHeaderToolbar();
if (empty($this->display)) {
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),

View File

@@ -823,7 +823,7 @@ class AdminImagesControllerCore extends AdminController
public function initPageHeaderToolbar()
{
if (empty($this->display)) {
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),

View File

@@ -229,7 +229,7 @@ class AdminMetaControllerCore extends AdminController
public function initPageHeaderToolbar()
{
if (empty($this->display)) {
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),

View File

@@ -310,7 +310,7 @@ class AdminRequestSqlControllerCore extends AdminController
public function initPageHeaderToolbar()
{
if (empty($this->display)) {
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),

View File

@@ -242,7 +242,7 @@ class AdminSearchConfControllerCore extends AdminController
public function initPageHeaderToolbar()
{
if (empty($this->display)) {
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),

View File

@@ -117,7 +117,7 @@ class AdminTaxesControllerCore extends AdminController
public function initPageHeaderToolbar()
{
if (empty($this->display)) {
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),