mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Shared footer elements
This commit is contained in:
parent
e99bd59aa0
commit
9c1cfd2e86
@ -45,7 +45,7 @@ class Playful extends BaseDesign
|
|||||||
public function elements(array $context, string $type = 'product'): array
|
public function elements(array $context, string $type = 'product'): array
|
||||||
{
|
{
|
||||||
$this->context = $context;
|
$this->context = $context;
|
||||||
|
|
||||||
$this->type = $type;
|
$this->type = $type;
|
||||||
|
|
||||||
$this->setup();
|
$this->setup();
|
||||||
@ -71,6 +71,12 @@ class Playful extends BaseDesign
|
|||||||
'id' => 'product-table',
|
'id' => 'product-table',
|
||||||
'elements' => $this->productTable(),
|
'elements' => $this->productTable(),
|
||||||
],
|
],
|
||||||
|
'footer-elements' => [
|
||||||
|
'id' => 'footer',
|
||||||
|
'elements' => [
|
||||||
|
$this->sharedFooterElements(),
|
||||||
|
],
|
||||||
|
],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -156,4 +156,12 @@ trait DesignHelpers
|
|||||||
|
|
||||||
return 'true';
|
return 'true';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function sharedFooterElements()
|
||||||
|
{
|
||||||
|
return ['element' => 'div', 'properties' => ['class' => 'flex items-center justify-between mt-10'], 'content' => '', 'elements' => [
|
||||||
|
['element' => 'img', 'content' => '', 'properties' => ['src' => '$contact.signature', 'class' => 'h-40']],
|
||||||
|
['element' => 'img', 'content' => '', 'properties' => ['src' => '$app_url/images/created-by-invoiceninja-new.png', 'class' => 'h-32', 'hidden' => $this->entity->user->account->isPaid() ? 'true' : 'false']],
|
||||||
|
]];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -128,7 +128,7 @@ trait PdfMakerUtilities
|
|||||||
|
|
||||||
$html = strtr($html, $variables['values']);
|
$html = strtr($html, $variables['values']);
|
||||||
|
|
||||||
$this->document->loadHTML($html);
|
@$this->document->loadHTML($html);
|
||||||
|
|
||||||
$this->document->saveHTML();
|
$this->document->saveHTML();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user