N°931: Tags Template format

This commit is contained in:
Eric
2018-09-21 16:00:18 +02:00
parent 12a3f1c36c
commit ae6e3b4f17

View File

@@ -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>';