N°985 - AttributeEnumSet (portal support)

This commit is contained in:
Eric
2020-01-28 17:21:36 +01:00
parent b58356c42e
commit da6a55504e
3 changed files with 26 additions and 3 deletions

View File

@@ -25,6 +25,7 @@ use AttributeDateTime;
use AttributeDefinition;
use AttributeExternalKey;
use AttributeImage;
use AttributeSet;
use AttributeTagSet;
use BinaryExpression;
use CMDBSource;
@@ -686,6 +687,12 @@ class ManageBrickController extends BrickController
$sValue = $oAttDef->GenerateViewHtmlForValues($aCodes, '', false);
$sSortValue = implode(' ', $aCodes);
}
elseif ($oAttDef instanceof AttributeSet)
{
$oAttDef->SetDisplayLink(false);
$sValue = $oAttDef->GetAsHTML($oCurrentRow->Get($sItemAttr));
$sSortValue = "".$oCurrentRow->Get($sItemAttr);
}
else
{
$sValue = $oAttDef->GetAsHTML($oCurrentRow->Get($sItemAttr));

View File

@@ -23,6 +23,7 @@ namespace Combodo\iTop\Portal\Helper;
use AttributeImage;
use AttributeSet;
use AttributeTagSet;
use Combodo\iTop\Portal\Brick\BrowseBrick;
use DBSearch;
@@ -399,6 +400,11 @@ class BrowseBrickHelper
$sHtmlForFieldValue = $oAttDef->GenerateViewHtmlForValues($aCodes, '', false);
break;
case $oAttDef instanceof AttributeSet:
$oAttDef->SetDisplayLink(false);
$sHtmlForFieldValue = $value->Get($aField['code']);
break;
case $oAttDef instanceof AttributeImage:
// Todo: This should be refactored, it has been seen multiple times in the portal
$oOrmDoc = $value->Get($aField['code']);
@@ -553,4 +559,4 @@ class BrowseBrickHelper
$this->AddToTreeItems($aItems[$sCurrentIndex]['subitems'], $aCurrentRowSliced, $aLevelsProperties, $aCurrentRowObjects);
}
}
}
}