Merge branch 'feature/b931' of https://github.com/Combodo/iTop into feature/b931

This commit is contained in:
Molkobain
2018-09-21 17:24:56 +02:00
4 changed files with 48 additions and 8 deletions

View File

@@ -6696,7 +6696,6 @@ class AttributeExternalField extends AttributeDefinition
{
return false;
}
}
@@ -7021,7 +7020,7 @@ class AttributeTagSet extends AttributeDBFieldVoid
{
$aValues = $sValue->GetLabels();
return implode(' ', $aValues);
return implode(', ', $aValues);
}
throw new CoreWarning('Expected the attribute value to be a TagSet', array(
'found_type' => gettype($sValue),
@@ -7328,7 +7327,7 @@ class AttributeTagSet extends AttributeDBFieldVoid
public function EnumTemplateVerbs()
{
return array(
'' => 'Plain text (unlocalized) representation',
'' => 'Plain text representation',
'html' => 'HTML representation (unordered list)',
);
}
@@ -7351,16 +7350,18 @@ class AttributeTagSet extends AttributeDBFieldVoid
if ($bLocalize)
{
$aValues = $value->GetLabels();
$sSep = ', ';
}
else
{
$aValues = $value->GetValue();
$sSep = ' ';
}
switch ($sVerb)
{
case '':
return implode(' ', $aValues);
return implode($sSep, $aValues);
case 'html':
return '<ul><li>'.implode("</li><li>", $aValues).'</li></ul>';