mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-21 17:48:43 +02:00
N°2847 - Activity panel: Fix filtering on CMDBChangeOp entries
This commit is contained in:
@@ -43,9 +43,13 @@ class ActivityEntry extends UIBlock
|
||||
// Specific constants
|
||||
/** @var string DEFAULT_ORIGIN */
|
||||
const DEFAULT_ORIGIN = 'unknown';
|
||||
/** @var string DEFAULT_TYPE */
|
||||
const DEFAULT_TYPE = 'generic';
|
||||
/** @var string DEFAULT_DECORATION_CLASSES */
|
||||
const DEFAULT_DECORATION_CLASSES = 'fas fa-fw fa-mortar-pestle';
|
||||
|
||||
/** @var string $sType Type of entry, used for filtering (eg. caselog, edits, transition, ...) */
|
||||
protected $sType;
|
||||
/** @var string $sDecorationClasses CSS classes to use to decorate the entry */
|
||||
protected $sDecorationClasses;
|
||||
/** @var string $sContent Raw content of the entry itself (should not have been processed / escaped) */
|
||||
@@ -79,6 +83,7 @@ class ActivityEntry extends UIBlock
|
||||
{
|
||||
parent::__construct($sIdCode);
|
||||
|
||||
$this->SetType(static::DEFAULT_TYPE);
|
||||
$this->SetDecorationClasses(static::DEFAULT_DECORATION_CLASSES);
|
||||
$this->SetContent($sContent);
|
||||
$this->SetDateTime($oDateTime);
|
||||
@@ -86,6 +91,30 @@ class ActivityEntry extends UIBlock
|
||||
$this->SetOrigin(static::DEFAULT_ORIGIN);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the type of the entry (eg. case log, edits, transition, ...)
|
||||
*
|
||||
* @param string $sType
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function SetType($sType)
|
||||
{
|
||||
$this->sType = $sType;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the type of the entry (eg. caselog, edits, transition, ...)
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function GetType()
|
||||
{
|
||||
return $this->sType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the CSS decoration classes
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user