mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 02:28:44 +02:00
N°3649 - Activity panel: Add concurrent lock mechanism
This commit is contained in:
@@ -216,6 +216,17 @@ class ActivityPanel extends UIBlock
|
||||
return $this->sTransactionId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool True if the lock mechanism has to be enabled
|
||||
* @uses \cmdbAbstractObject::ENUM_OBJECT_MODE_VIEW
|
||||
* @uses static::HasAnEditableCaseLogTab()
|
||||
* @uses "concurrent_lock_enabled" config. param.
|
||||
*/
|
||||
public function IsLockEnabled(): bool
|
||||
{
|
||||
return (cmdbAbstractObject::ENUM_OBJECT_MODE_VIEW === $this->sObjectMode) && (MetaModel::GetConfig()->Get('concurrent_lock_enabled')) && (true === $this->HasAnEditableCaseLogTab());
|
||||
}
|
||||
|
||||
/**
|
||||
* Set all entries at once.
|
||||
*
|
||||
@@ -645,9 +656,19 @@ class ActivityPanel extends UIBlock
|
||||
public function GetDateTimeFormatForJSWidget()
|
||||
{
|
||||
$oDateTimeFormat = AttributeDateTime::GetFormat();
|
||||
|
||||
return $oDateTimeFormat->ToMomentJS();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string The endpoint for all "lock" related operations
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function GetLockEndpointForJSWidget(): string
|
||||
{
|
||||
return utils::GetAbsoluteUrlAppRoot().'pages/ajax.render.php';
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
@@ -655,7 +676,7 @@ class ActivityPanel extends UIBlock
|
||||
{
|
||||
$aSubBlocks = array();
|
||||
|
||||
foreach($this->GetCaseLogTabsEntryForms() as $sCaseLogId => $oCaseLogEntryForm) {
|
||||
foreach ($this->GetCaseLogTabsEntryForms() as $sCaseLogId => $oCaseLogEntryForm) {
|
||||
$aSubBlocks[$oCaseLogEntryForm->GetId()] = $oCaseLogEntryForm;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user