N°2847 - Object details: Preliminary work

- Add ObjectFactory for ObjectDetails, ObjectCard, ...
- Update SCSS files to integrate its components

Note: A big part of the CSS is hardcoded in cmdbAbstract for now as we still need to discuss / work on the migration of the cmdbAbstract APIs (DisplayBareHeader, DisplayBareProperties, ...)
This commit is contained in:
Molkobain
2020-10-02 11:13:25 +02:00
parent 79ad75a2c2
commit 5626da7a5e
9 changed files with 105 additions and 4 deletions

View File

@@ -39,7 +39,8 @@ class PanelFactory
public static function MakeNeutral(string $sTitle)
{
$oPanel = new Panel($sTitle);
$oPanel->SetColor(Panel::ENUM_COLOR_NEUTRAL);
// TODO 2.8.0: Set this back to neutral when object details are done
$oPanel->SetColor(Panel::ENUM_COLOR_BLUE);
return $oPanel;
}
@@ -148,4 +149,21 @@ class PanelFactory
return $oPanel;
}
/**
* Make a Panel component with the specific $sClass color scheme
*
* @param string $sClass Class of the object the panel is for
* @param string $sTitle
*
* @return \Combodo\iTop\Application\UI\Component\Panel\Panel
*/
public static function MakeForClass(string $sClass, string $sTitle)
{
$oPanel = new Panel($sTitle);
// TODO 2.8.0: Change this to clas color when done
$oPanel->SetColor(Panel::ENUM_COLOR_BLUE);
return $oPanel;
}
}