mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 18:48:51 +02:00
N°931: Tags Template format
This commit is contained in:
@@ -6980,7 +6980,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),
|
||||
@@ -7287,7 +7287,7 @@ class AttributeTagSet extends AttributeDBFieldVoid
|
||||
public function EnumTemplateVerbs()
|
||||
{
|
||||
return array(
|
||||
'' => 'Plain text (unlocalized) representation',
|
||||
'' => 'Plain text representation',
|
||||
'html' => 'HTML representation (unordered list)',
|
||||
);
|
||||
}
|
||||
@@ -7310,16 +7310,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>';
|
||||
|
||||
Reference in New Issue
Block a user