N°5945 - Fix "menu" option in dashlet list having no effect since relations refactoring

This commit is contained in:
Molkobain
2023-06-28 10:11:51 +02:00
parent b755f65a8a
commit 3c8bea8921
2 changed files with 8 additions and 2 deletions

View File

@@ -1871,7 +1871,13 @@ class MenuBlock extends DisplayBlock
/** @var array $aToolkitActions Any "legacy" toolkit menu item, which are now displayed in the same menu as the $aRegularActions, after them */
$aToolkitActions = [];
if (!isset($aExtraParams['selection_mode']) || ($aExtraParams['selection_mode'] == "")) {
// Display menu actions only if...
if (
// ... NOT in a selection mode
(!isset($aExtraParams['selection_mode']) || ($aExtraParams['selection_mode'] == ""))
// ... "menu" parameter is NOT EXPLICITLY disabled
&& (!isset($aExtraParams['menu']) || $aExtraParams['menu'] === "1" || $aExtraParams['menu'] === true)
) {
$oAppContext = new ApplicationContext();
$sContext = $oAppContext->GetForLink();
if (utils::IsNotNullOrEmptyString($sContext)) {

View File

@@ -43,7 +43,7 @@ class BlockIndirectLinkSetViewTable extends AbstractBlockLinkSetViewTable
'object_id' => $this->oDbObject->GetKey(),
'target_attr' => $this->oAttDef->GetExtKeyToRemote(),
'view_link' => false,
'menu' => false,
'menu' => MetaModel::GetConfig()->Get('allow_menu_on_linkset'),
'display_limit' => true,
'table_id' => $this->GetTableId(),
'zlist' => false,