mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-21 01:28:47 +02:00
N°3520 - HTML metadata: Add object state in object details if present
This commit is contained in:
@@ -61,9 +61,9 @@ class ObjectDetails extends Panel implements iKeyboardShortcut
|
||||
protected $sIconUrl;
|
||||
/** @var string|null Code of the current value of the attribute carrying the state for $sClassName */
|
||||
protected $sStatusCode;
|
||||
/** @var string Label of the current value of the attribute carrying the state for $sClassName */
|
||||
/** @var string|null Label of the current value of the attribute carrying the state for $sClassName */
|
||||
protected $sStatusLabel;
|
||||
/** @var string Color value (eg. #ABCDEF, var(--foo-color), ...) */
|
||||
/** @var string|null Color value (eg. #ABCDEF, var(--foo-color), ...) */
|
||||
protected $sStatusColor;
|
||||
|
||||
/**
|
||||
@@ -166,6 +166,15 @@ class ObjectDetails extends Panel implements iKeyboardShortcut
|
||||
return $this->sStatusCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see static::$sStatusCode
|
||||
* @return bool
|
||||
*/
|
||||
public function HasStatus(): bool
|
||||
{
|
||||
return $this->sStatusCode !== null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see self::$sStatusLabel
|
||||
* @return string
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
data-object-class="{{ oUIBlock.GetClassName() }}"
|
||||
data-object-id="{{ oUIBlock.GetObjectId() }}"
|
||||
data-object-mode="{{ oUIBlock.GetObjectMode() }}"
|
||||
{% if oUIBlock.HasStatus() %}data-object-state="{{ oUIBlock.GetStatusCode() }}"{% endif %}
|
||||
data-role="ibo-object-details"
|
||||
{% endblock %}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user