Fix color of tags

This commit is contained in:
Laurent Destailleur 2020-06-18 15:33:52 +02:00
parent 531bfe217b
commit c1a9826455

View File

@ -1381,17 +1381,16 @@ class Categorie extends CommonObject
} }
} }
if ($url == '') if ($url == '') {
{
$link = '<a href="'.DOL_URL_ROOT.'/categories/viewcat.php?id='.$cat->id.'&type='.$cat->type.'" class="'.$forced_color.'">'; $link = '<a href="'.DOL_URL_ROOT.'/categories/viewcat.php?id='.$cat->id.'&type='.$cat->type.'" class="'.$forced_color.'">';
$linkend = '</a>'; $linkend = '</a>';
$w[] = $link.($addpicto ? img_object('', 'category', 'class="paddingright"') : '').$cat->label.$linkend; $w[] = $link.($addpicto ? img_object('', 'category', 'class="paddingright"') : '').$cat->label.$linkend;
} elseif ($url == 'none') { } elseif ($url == 'none') {
$link = ''; $link = '<span class="'.$forced_color.'">';
$linkend = ''; $linkend = '</span>';
$w[] = $link.($addpicto ? img_object('', 'category', 'class="paddingright"') : '').$cat->label.$linkend; $w[] = $link.($addpicto ? img_object('', 'category', 'class="paddingright"') : '').$cat->label.$linkend;
} else { } else {
$w[] = "<a href='".DOL_URL_ROOT."/".$url."?catid=".$cat->id."'>".($addpicto ? img_object('', 'category') : '').$cat->label."</a>"; $w[] = '<a class="'.$forced_color.'" href="'.DOL_URL_ROOT.'/'.$url.'?catid='.$cat->id.'">'.($addpicto ? img_object('', 'category') : '').$cat->label.'</a>';
} }
} }
$newcategwithpath = preg_replace('/toreplace/', $forced_color, implode($sep, $w)); $newcategwithpath = preg_replace('/toreplace/', $forced_color, implode($sep, $w));