ActivityLogInfo: show remarks

refs #2471
This commit is contained in:
Thomas Gelf 2022-02-15 21:13:24 +01:00
parent aeef51ffa6
commit 1cfc0c427c

View File

@ -522,6 +522,13 @@ class ActivityLogInfo extends HtmlDocument
);
}
if ($comment = $this->getOptionalRangeComment()) {
$table->addNameValueRow(
$this->translate('Remark'),
$comment
);
}
if ($this->hasBeenEnabled()) {
$table->addNameValueRow(
$this->translate('Rendering'),
@ -584,6 +591,21 @@ class ActivityLogInfo extends HtmlDocument
return sprintf($msg, $this->typeName, $this->entry->object_name);
}
protected function getOptionalRangeComment()
{
if ($this->id) {
$db = $this->db->getDbAdapter();
return $db->fetchOne(
$db->select()
->from('director_activity_log_remark', 'remark')
->where('first_related_activity <= ?', $this->id)
->where('last_related_activity >= ?', $this->id)
);
}
return null;
}
/**
* @param $type
* @param $props