mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-25 11:38:44 +02:00
N°2847 - Activity panel: Add highlight color on case log entries
This commit is contained in:
@@ -40,8 +40,13 @@ class CaseLogEntry extends ActivityEntry
|
||||
const BLOCK_CODE = 'ibo-caselog-entry';
|
||||
const HTML_TEMPLATE_REL_PATH = 'layouts/activity-panel/activity-entry/caselog-entry';
|
||||
|
||||
// Specific constants
|
||||
public const DEFAULT_CASELOG_RANK = 0;
|
||||
|
||||
/** @var string $sAttCode Code of the corresponding case log attribute */
|
||||
protected $sAttCode;
|
||||
/** @var int $iCaseLogRank Rank of its case log in the host panel, can be used for highlight purposes for example */
|
||||
protected $iCaseLogRank;
|
||||
|
||||
/**
|
||||
* CaseLogEntry constructor.
|
||||
@@ -59,6 +64,7 @@ class CaseLogEntry extends ActivityEntry
|
||||
parent::__construct($sContent, $oDateTime, $sAuthorLogin, $sId);
|
||||
|
||||
$this->sAttCode = $sAttCode;
|
||||
$this->SetCaseLogRank(static::DEFAULT_CASELOG_RANK);
|
||||
$this->SetOrigin('caselog:'.$this->sAttCode);
|
||||
}
|
||||
|
||||
@@ -71,4 +77,27 @@ class CaseLogEntry extends ActivityEntry
|
||||
{
|
||||
return $this->sAttCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the rank of the case log in the host panel
|
||||
*
|
||||
* @param int $iCaseLogRank
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function SetCaseLogRank($iCaseLogRank)
|
||||
{
|
||||
$this->iCaseLogRank = $iCaseLogRank;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the rank of the case log in the host panel
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function GetCaseLogRank()
|
||||
{
|
||||
return $this->iCaseLogRank;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user