bind title and subheading to the respective document

This commit is contained in:
Hendrik Hagendorn
2023-01-19 20:23:15 +01:00
parent d9d342f9d4
commit 12ca46381a
7 changed files with 111 additions and 38 deletions

View File

@ -482,7 +482,7 @@ abstract class Show extends Component
$this->hideDueAt = $hideDueAt;
$this->textDocumentTitle = $this->getTextDocumentTitle($type, $textDocumentTitle);
$this->textDocumentSubheading = $this->gettextDocumentSubheading($type, $textDocumentSubheading);
$this->textDocumentSubheading = $this->getTextDocumentSubheading($type, $textDocumentSubheading);
$this->textContactInfo = $this->getTextContactInfo($type, $textContactInfo);
$this->textIssuedAt = $this->getTextIssuedAt($type, $textIssuedAt);
$this->textDocumentNumber = $this->getTextDocumentNumber($type, $textDocumentNumber);
@ -994,6 +994,10 @@ abstract class Show extends Component
return $textDocumentTitle;
}
if (! empty($this->document) && $this->document->title !== '') {
return $this->document->title;
}
$key = $this->getSettingKey($type, 'title');
if (! empty(setting($key))) {
@ -1015,6 +1019,10 @@ abstract class Show extends Component
return $textDocumentSubheading;
}
if (! empty($this->document) && $this->document->subheading !== '') {
return $this->document->subheading;
}
$key = $this->getSettingKey($type, 'subheading');
if (!empty(setting($key))) {