diff --git a/sources/Application/UI/Links/Direct/BlockDirectLinksEditTable.php b/sources/Application/UI/Links/Direct/BlockDirectLinksEditTable.php index 62b02e7ad..da8ae25d8 100644 --- a/sources/Application/UI/Links/Direct/BlockDirectLinksEditTable.php +++ b/sources/Application/UI/Links/Direct/BlockDirectLinksEditTable.php @@ -114,12 +114,7 @@ class BlockDirectLinksEditTable extends UIContentBlock */ private function InitUI() { - // Linkset description as an informative alert - $sDescription = $this->oAttributeLinkedSet->GetDescription(); - if (utils::IsNotNullOrEmptyString($sDescription)) { - $oAlert = AlertUIBlockFactory::MakeForInformation('', $sDescription); - $this->AddSubBlock($oAlert); - } + } /** @@ -148,6 +143,15 @@ class BlockDirectLinksEditTable extends UIContentBlock ->SetIcon(MetaModel::GetClassIcon($this->oUILinksDirectWidget->GetLinkedClass(), false)) ->AddCSSClass('ibo-datatable-panel'); + // - Panel description + $sDescription = $this->oAttributeLinkedSet->GetDescription(); + if (utils::IsNotNullOrEmptyString($sDescription)) { + $oTitleBlock = $aTablePanel->GetTitleBlock() + ->AddDataAttribute('tooltip-content', $sDescription) + ->AddDataAttribute('tooltip-max-width', 'min(600px, 90vw)') // Allow big description to be wide enough while shrinking on small screens + ->AddCSSClass('ibo-has-description'); + } + // Toolbar and actions $oToolbar = ToolbarUIBlockFactory::MakeForButton(); $oActionButtonUnlink = ButtonUIBlockFactory::MakeNeutral('Unlink'); diff --git a/sources/Application/UI/Links/Indirect/BlockIndirectLinksEditTable.php b/sources/Application/UI/Links/Indirect/BlockIndirectLinksEditTable.php index eef39cd5b..d512abe7a 100644 --- a/sources/Application/UI/Links/Indirect/BlockIndirectLinksEditTable.php +++ b/sources/Application/UI/Links/Indirect/BlockIndirectLinksEditTable.php @@ -107,13 +107,6 @@ class BlockIndirectLinksEditTable extends UIContentBlock // To prevent adding forms inside the main form $oDeferredBlock = new UIContentBlock("dlg_{$this->oUILinksWidget->GetLinkedSetId()}", ['ibo-block-indirect-links--edit--dialog']); $this->AddDeferredBlock($oDeferredBlock); - - // Linkset description as an informative alert - $sDescription = $this->oAttributeLinkedSetIndirect->GetDescription(); - if (utils::IsNotNullOrEmptyString($sDescription)) { - $oAlert = AlertUIBlockFactory::MakeForInformation('', $sDescription); - $this->AddSubBlock($oAlert); - } } /** @@ -204,6 +197,15 @@ class BlockIndirectLinksEditTable extends UIContentBlock ->SetIcon(MetaModel::GetClassIcon($this->oUILinksWidget->GetRemoteClass(), false)) ->AddCSSClass('ibo-datatable-panel'); + // - Panel description + $sDescription = $this->oAttributeLinkedSetIndirect->GetDescription(); + if (utils::IsNotNullOrEmptyString($sDescription)) { + $oTitleBlock = $aTablePanel->GetTitleBlock() + ->AddDataAttribute('tooltip-content', $sDescription) + ->AddDataAttribute('tooltip-max-width', 'min(600px, 90vw)') // Allow big description to be wide enough while shrinking on small screens + ->AddCSSClass('ibo-has-description'); + } + // Toolbar and actions $oToolbar = ToolbarUIBlockFactory::MakeForButton(); $oActionButtonUnlink = ButtonUIBlockFactory::MakeNeutral('Unlink');