mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 15:14:58 +00:00
color category batch
This commit is contained in:
parent
05c0f296fc
commit
ac3580aa1c
|
@ -3166,8 +3166,10 @@ $('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->getName()."</span> ";
|
||||
foreach($categories as $category) {
|
||||
$color = substr(md5($category->getName()), 0, 6);
|
||||
$content .= "<span class=\"badge\" style=\"background-color: #".$color."; color: #".self::getContrastColor($color).";\">".$category->getName()."</span> ";
|
||||
}
|
||||
}
|
||||
if(!empty($extracontent['bottom_title']))
|
||||
$content .= $extracontent['bottom_title'];
|
||||
|
|
|
@ -3244,8 +3244,10 @@ $('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->getName()."</span> ";
|
||||
foreach($categories as $category) {
|
||||
$color = substr(md5($category->getName()), 0, 6);
|
||||
$content .= "<span class=\"badge\" style=\"background-color: #".$color."; color: #".self::getContrastColor($color).";\">".$category->getName()."</span> ";
|
||||
}
|
||||
}
|
||||
if(!empty($extracontent['bottom_title']))
|
||||
$content .= $extracontent['bottom_title'];
|
||||
|
|
Loading…
Reference in New Issue
Block a user