N°2677 - Add style definition for classes

This commit is contained in:
Eric
2021-01-06 13:57:46 +01:00
parent fca123e127
commit d4aeb4b157
31 changed files with 1105 additions and 372 deletions

View File

@@ -15,6 +15,19 @@ class UIHelper
{
public static function GetColorFromStatus(string $sClass, ?string $sStateCode): string
{
// Example on how to get the color for the current status of a class
// $sStatusColor = 'neutral';
// $sStateAttCode = MetaModel::GetStateAttributeCode($sClass);
// if (strlen($sStateAttCode) == 0) {
// return $sStatusColor;
// }
//
// $oStyle = MetaModel::GetEnumStyle($sClass, $sStateAttCode, $sStateCode);
// if ($oStyle) {
// $sStatusColor = $oStyle->GetMainColor();
// }
// return $sStatusColor;
$sRootClass = MetaModel::GetRootClass($sClass);
switch ($sRootClass) {
case 'Ticket':