mirror of
https://git.code.sf.net/p/seeddms/code
synced 2026-05-08 13:31:24 +00:00
fix output of categories
This commit is contained in:
parent
37e7cf2753
commit
1e78d54b2c
|
|
@ -3603,7 +3603,7 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
|
|||
*
|
||||
* @param object $document
|
||||
* @param object $previewer
|
||||
* @param boolean $skipcont set to true if embrasing tr shall be skipped
|
||||
* @param boolean $skipcont set to true if embrasing tr shall be skipped.
|
||||
* @param integer $version set to a value != 0 for a specific version, otherwise
|
||||
* the latest version will be used
|
||||
* @param integer $context specifies the type of list. Can be any value
|
||||
|
|
@ -3694,15 +3694,6 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
|
|||
if($comment) {
|
||||
$content .= "<br /><span style=\"font-size: 85%;\">".htmlspecialchars($comment)."</span>";
|
||||
}
|
||||
if($categories = $document->getCategories()) {
|
||||
$content .= "<br />";
|
||||
foreach($categories as $category) {
|
||||
$color = substr(md5($category->getName()), 0, 6);
|
||||
$content .= "<span class=\"badge\" style=\"background-color: #".$color."; color: #".self::getContrastColor($color).";\">".htmlspecialchars($category->getName())."</span> ";
|
||||
}
|
||||
}
|
||||
if(!empty($extracontent['bottom_title']))
|
||||
$content .= $extracontent['bottom_title'];
|
||||
|
||||
if($context) {
|
||||
$attrdefgrps = $document->getParent()->getAttributeDefintionGroupList(true);
|
||||
|
|
@ -3733,7 +3724,8 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
|
|||
if($categories = $document->getCategories()) {
|
||||
$content .= "<br />";
|
||||
foreach($categories as $category) {
|
||||
$content .= "<span class=\"badge bg-secondary\"".($category->getColor() ? ' style="background-color: '.$category->getColor().' !important; color: '.(getColorBrightness($category->getColor()) < 0.8 ? 'white' : 'black').';"' : '').">".$category->getName()."</span> ";
|
||||
$color = $category->getColor() ? $category->getColor() : substr(md5($category->getName()), 0, 6);
|
||||
$content .= "<span class=\"badge\" style=\"background-color: #".$color."; color: #".self::getContrastColor($color).";\">".htmlspecialchars($category->getName())."</span> ";
|
||||
}
|
||||
}
|
||||
if(!empty($extracontent['bottom_title']))
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user