mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-29 21:48:45 +02:00
N°2847 - Activity panel: Display only necessary toolbar actions in the "Activity" tab
This commit is contained in:
@@ -54,6 +54,8 @@ class ActivityPanel extends UIBlock
|
||||
protected $aEntries;
|
||||
/** @var bool $bAreEntriedSorted True if the entries have been sorted by date */
|
||||
protected $bAreEntriedSorted;
|
||||
/** @var bool $bHasLifecycle True if the host object has a lifecycle */
|
||||
protected $bHasLifecycle;
|
||||
|
||||
/**
|
||||
* ActivityPanel constructor.
|
||||
@@ -97,6 +99,9 @@ class ActivityPanel extends UIBlock
|
||||
$this->AddCaseLogTab($sCaseLogAttCode);
|
||||
}
|
||||
|
||||
// Check if object has a lifecycle
|
||||
$this->bHasLifecycle = !empty(MetaModel::GetStateAttributeCode($sObjectClass));
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -387,6 +392,16 @@ class ActivityPanel extends UIBlock
|
||||
return !empty($this->aCaseLogs);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if the host object has a lifecycle
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function HasLifecycle()
|
||||
{
|
||||
return $this->bHasLifecycle;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the formatted (user-friendly) date time format for the JS widget.
|
||||
* Will be used by moment.js for instance.
|
||||
|
||||
Reference in New Issue
Block a user