mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-25 11:38:44 +02:00
N°3649 - Activity panel: Remove entry form from the activity tab, only case log tabs will have one
This commit is contained in:
@@ -63,8 +63,6 @@ class ActivityPanel extends UIBlock
|
||||
protected $bAreEntriesSorted;
|
||||
/** @var bool $bHasLifecycle True if the host object has a lifecycle */
|
||||
protected $bHasLifecycle;
|
||||
/** @var \Combodo\iTop\Application\UI\Base\Layout\ActivityPanel\CaseLogEntryForm\CaseLogEntryForm $oActivityTabEntryForm New entry form for the activity tab which is different from the case log tabs */
|
||||
protected $oActivityTabEntryForm;
|
||||
/** @var \Combodo\iTop\Application\UI\Base\Layout\ActivityPanel\CaseLogEntryForm\CaseLogEntryForm[] $aCaseLogTabsEntryForms */
|
||||
protected $aCaseLogTabsEntryForms;
|
||||
|
||||
@@ -532,6 +530,23 @@ class ActivityPanel extends UIBlock
|
||||
return !empty($this->aCaseLogTabsEntryForms[$sCaseLogId]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the submission of the case logs present in the activity panel is autonomous or will be handled by another form
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function IsCaseLogsSubmitAutonomous(): bool
|
||||
{
|
||||
$bIsAutonomous = true;
|
||||
|
||||
foreach ($this->GetCaseLogTabsEntryForms() as $oCaseLogEntryForm) {
|
||||
$bIsAutonomous = $oCaseLogEntryForm->IsSubmitAutonomous();
|
||||
break;
|
||||
}
|
||||
|
||||
return $bIsAutonomous;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if the host object has a lifecycle
|
||||
*
|
||||
@@ -554,42 +569,6 @@ class ActivityPanel extends UIBlock
|
||||
return $oDateTimeFormat->ToMomentJS();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the entry form for the activity tab
|
||||
*
|
||||
* @see $oActivityTabEntryForm
|
||||
* @return \Combodo\iTop\Application\UI\Base\Layout\ActivityPanel\CaseLogEntryForm\CaseLogEntryForm
|
||||
*/
|
||||
public function GetActivityTabEntryForm(): CaseLogEntryForm
|
||||
{
|
||||
return $this->oActivityTabEntryForm;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the entry form for the activity tab
|
||||
*
|
||||
* @param \Combodo\iTop\Application\UI\Base\Layout\ActivityPanel\CaseLogEntryForm\CaseLogEntryForm $oCaseLogEntryForm
|
||||
* @see $oActivityTabEntryForm
|
||||
*
|
||||
* @return $this
|
||||
*
|
||||
*/
|
||||
public function SetActivityTabEntryForm(CaseLogEntryForm $oCaseLogEntryForm)
|
||||
{
|
||||
$this->oActivityTabEntryForm = $oCaseLogEntryForm;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true is there is an entry form for the activity tab
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function HasActivityTabEntryForm()
|
||||
{
|
||||
return $this->oActivityTabEntryForm !== null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
@@ -601,11 +580,6 @@ class ActivityPanel extends UIBlock
|
||||
$aSubBlocks[$oCaseLogEntryForm->GetId()] = $oCaseLogEntryForm;
|
||||
}
|
||||
|
||||
if ($this->HasActivityTabEntryForm()) {
|
||||
$oNewEntryForm = $this->GetActivityTabEntryForm();
|
||||
$aSubBlocks[$oNewEntryForm->GetId()] = $oNewEntryForm;
|
||||
}
|
||||
|
||||
return $aSubBlocks;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user