Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed: The add new button disappears when the controller display type is not empty in admin controllers in the back-office. #1230

Merged
merged 4 commits into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion controllers/admin/AdminEmployeesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ public function initPageHeaderToolbar()
{
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),
Expand Down
2 changes: 1 addition & 1 deletion controllers/admin/AdminImagesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,7 @@ public function initMoveImages()

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),
Expand Down
2 changes: 1 addition & 1 deletion controllers/admin/AdminMetaController.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ public function __construct()

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),
Expand Down
2 changes: 1 addition & 1 deletion controllers/admin/AdminRequestSqlController.php
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ public function initContent()

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),
Expand Down
2 changes: 1 addition & 1 deletion controllers/admin/AdminSearchConfController.php
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ public function __construct()

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),
Expand Down
2 changes: 1 addition & 1 deletion controllers/admin/AdminTaxesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public function __construct()

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),
Expand Down