mirror of
https://git.code.sf.net/p/seeddms/code
synced 2026-01-22 09:09:15 +00:00
document categorie may have a color
This commit is contained in:
parent
83dc876ac4
commit
d12ff1eb13
|
|
@ -100,6 +100,11 @@ else if ($action == "editcategory") {
|
|||
if (!$category->setName($name)) {
|
||||
UI::exitError(getMLText("admin_tools"),getMLText("error_occured"));
|
||||
}
|
||||
|
||||
$color = $_POST["color"];
|
||||
if (!$category->setColor($color)) {
|
||||
UI::exitError(getMLText("admin_tools"),getMLText("error_occured"));
|
||||
}
|
||||
}
|
||||
|
||||
else {
|
||||
|
|
|
|||
|
|
@ -125,6 +125,15 @@ $(document).ready( function() {
|
|||
'value'=>($category ? htmlspecialchars($category->getName()) : '')
|
||||
)
|
||||
);
|
||||
$this->formField(
|
||||
getMLText("color"),
|
||||
array(
|
||||
'element'=>'input',
|
||||
'type'=>'text',
|
||||
'name'=>'color',
|
||||
'value'=>($category ? htmlspecialchars($category->getColor()) : '')
|
||||
)
|
||||
);
|
||||
$this->contentContainerEnd();
|
||||
$this->formSubmit("<i class=\"fa fa-save\"></i> ".getMLText('save'));
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -3007,7 +3007,7 @@ $('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> ";
|
||||
$content .= "<span class=\"badge bg-secondary\"".($category->getColor() ? ' style="background-color: #'.$category->getColor().' !important;"' : '').">".$category->getName()."</span> ";
|
||||
}
|
||||
if(!empty($extracontent['bottom_title']))
|
||||
$content .= $extracontent['bottom_title'];
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user