N°5957 - Relations: Refactor \DisplayBlock to correctly handle 'listInObject' style

This commit is contained in:
Molkobain
2023-04-21 23:45:08 +02:00
parent 58b230cd74
commit f308d9b478
3 changed files with 74 additions and 46 deletions

View File

@@ -71,6 +71,10 @@ class DataTableUIBlockFactory extends AbstractUIBlockFactory
public static function MakeForResult(WebPage $oPage, string $sListId, DBObjectSet $oSet, $aExtraParams = array())
{
$oDataTable = DataTableUIBlockFactory::MakeForRendering($sListId, $oSet, $aExtraParams);
if ($oPage->IsPrintableVersion()) {
$oDataTable->AddOption('printVersion', true);
}
return self::RenderDataTable($oDataTable, 'list', $oPage, $sListId, $oSet, $aExtraParams);
}

View File

@@ -146,7 +146,7 @@ abstract class AbstractBlockLinkSetViewTable extends UIContentBlock
$oLinkSet = $oOrmLinkSet->ToDBObjectSet(utils::ShowObsoleteData());
// add list block
$oBlock = new \DisplayBlock($oLinkSet->GetFilter(), 'list', false);
$oBlock = new DisplayBlock($oLinkSet->GetFilter(), 'listInObject', false);
$this->AddSubBlock($oBlock->GetRenderContent($oPage, $this->GetExtraParam(), $this->sTableId));
}