mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
Update templates with new check for entity variables
This commit is contained in:
parent
da3a86381e
commit
f42c76d8a8
@ -130,7 +130,7 @@ class Bold extends BaseDesign
|
|||||||
$elements = [];
|
$elements = [];
|
||||||
|
|
||||||
foreach ($variables as $variable) {
|
foreach ($variables as $variable) {
|
||||||
$elements[] = ['element' => 'tr', 'content' => '', 'elements' => [
|
$elements[] = ['element' => 'tr', 'properties' => ['hidden' => $this->entityVariableCheck($variable)], 'content' => '', 'elements' => [
|
||||||
['element' => 'th', 'content' => $variable . '_label', 'properties' => ['class' => 'text-left pr-4 font-normal']],
|
['element' => 'th', 'content' => $variable . '_label', 'properties' => ['class' => 'text-left pr-4 font-normal']],
|
||||||
['element' => 'th', 'content' => $variable, 'properties' => ['class' => 'text-left pr-4 font-normal']],
|
['element' => 'th', 'content' => $variable, 'properties' => ['class' => 'text-left pr-4 font-normal']],
|
||||||
]];
|
]];
|
||||||
|
@ -130,7 +130,7 @@ class Business extends BaseDesign
|
|||||||
$elements = [];
|
$elements = [];
|
||||||
|
|
||||||
foreach ($variables as $variable) {
|
foreach ($variables as $variable) {
|
||||||
$elements[] = ['element' => 'tr', 'content' => '', 'elements' => [
|
$elements[] = ['element' => 'tr', 'properties' => ['hidden' => $this->entityVariableCheck($variable)], 'content' => '', 'elements' => [
|
||||||
['element' => 'th', 'content' => $variable . '_label', 'properties' => ['class' => 'text-left pr-4 font-normal']],
|
['element' => 'th', 'content' => $variable . '_label', 'properties' => ['class' => 'text-left pr-4 font-normal']],
|
||||||
['element' => 'th', 'content' => $variable, 'properties' => ['class' => 'text-left pr-4 font-normal']],
|
['element' => 'th', 'content' => $variable, 'properties' => ['class' => 'text-left pr-4 font-normal']],
|
||||||
]];
|
]];
|
||||||
|
@ -117,7 +117,7 @@ class Clean extends BaseDesign
|
|||||||
$elements = [];
|
$elements = [];
|
||||||
|
|
||||||
foreach ($variables as $variable) {
|
foreach ($variables as $variable) {
|
||||||
$elements[] = ['element' => 'tr', 'content' => '', 'elements' => [
|
$elements[] = ['element' => 'tr', 'properties' => ['hidden' => $this->entityVariableCheck($variable)], 'content' => '', 'elements' => [
|
||||||
['element' => 'th', 'content' => $variable . '_label', 'properties' => ['class' => 'text-left pr-4 font-normal']],
|
['element' => 'th', 'content' => $variable . '_label', 'properties' => ['class' => 'text-left pr-4 font-normal']],
|
||||||
['element' => 'th', 'content' => $variable, 'properties' => ['class' => 'text-left pr-4 font-normal']],
|
['element' => 'th', 'content' => $variable, 'properties' => ['class' => 'text-left pr-4 font-normal']],
|
||||||
]];
|
]];
|
||||||
|
@ -130,7 +130,7 @@ class Creative extends BaseDesign
|
|||||||
$elements = [];
|
$elements = [];
|
||||||
|
|
||||||
foreach ($variables as $variable) {
|
foreach ($variables as $variable) {
|
||||||
$elements[] = ['element' => 'tr', 'content' => '', 'elements' => [
|
$elements[] = ['element' => 'tr', 'properties' => ['hidden' => $this->entityVariableCheck($variable)], 'content' => '', 'elements' => [
|
||||||
['element' => 'th', 'content' => $variable . '_label', 'properties' => ['class' => 'text-left pr-4 font-normal']],
|
['element' => 'th', 'content' => $variable . '_label', 'properties' => ['class' => 'text-left pr-4 font-normal']],
|
||||||
['element' => 'th', 'content' => $variable, 'properties' => ['class' => 'text-left pr-4 font-normal']],
|
['element' => 'th', 'content' => $variable, 'properties' => ['class' => 'text-left pr-4 font-normal']],
|
||||||
]];
|
]];
|
||||||
|
@ -91,7 +91,7 @@ class Elegant extends BaseDesign
|
|||||||
$elements = [];
|
$elements = [];
|
||||||
|
|
||||||
foreach ($variables as $variable) {
|
foreach ($variables as $variable) {
|
||||||
$elements[] = ['element' => 'tr', 'content' => '', 'elements' => [
|
$elements[] = ['element' => 'tr', 'properties' => ['hidden' => $this->entityVariableCheck($variable)], 'content' => '', 'elements' => [
|
||||||
['element' => 'th', 'content' => $variable . '_label', 'properties' => ['class' => 'text-left pr-4 font-normal']],
|
['element' => 'th', 'content' => $variable . '_label', 'properties' => ['class' => 'text-left pr-4 font-normal']],
|
||||||
['element' => 'th', 'content' => $variable, 'properties' => ['class' => 'text-left pr-4 font-normal']],
|
['element' => 'th', 'content' => $variable, 'properties' => ['class' => 'text-left pr-4 font-normal']],
|
||||||
]];
|
]];
|
||||||
|
@ -130,7 +130,7 @@ class Hipster extends BaseDesign
|
|||||||
$elements = [];
|
$elements = [];
|
||||||
|
|
||||||
foreach ($variables as $variable) {
|
foreach ($variables as $variable) {
|
||||||
$elements[] = ['element' => 'div', 'properties' => ['class' => 'space-x-4'], 'content' => '', 'elements' => [
|
$elements[] = ['element' => 'div', 'properties' => ['hidden' => $this->entityVariableCheck($variable), 'class' => 'space-x-4'], 'content' => '', 'elements' => [
|
||||||
['element' => 'span', 'content' => $variable . '_label', 'properties' => ['class' => 'font-semibold uppercase text-yellow-600']],
|
['element' => 'span', 'content' => $variable . '_label', 'properties' => ['class' => 'font-semibold uppercase text-yellow-600']],
|
||||||
['element' => 'span', 'content' => $variable, 'properties' => ['class' => 'uppercase']],
|
['element' => 'span', 'content' => $variable, 'properties' => ['class' => 'uppercase']],
|
||||||
]];
|
]];
|
||||||
|
@ -91,7 +91,7 @@ class Modern extends BaseDesign
|
|||||||
$elements = [];
|
$elements = [];
|
||||||
|
|
||||||
foreach ($variables as $variable) {
|
foreach ($variables as $variable) {
|
||||||
$elements[] = ['element' => 'tr', 'content' => '', 'elements' => [
|
$elements[] = ['element' => 'tr', 'properties' => ['hidden' => $this->entityVariableCheck($variable)], 'content' => '', 'elements' => [
|
||||||
['element' => 'th', 'content' => $variable . '_label', 'properties' => ['class' => 'text-left pr-16 lg:pr-24 font-normal']],
|
['element' => 'th', 'content' => $variable . '_label', 'properties' => ['class' => 'text-left pr-16 lg:pr-24 font-normal']],
|
||||||
['element' => 'th', 'content' => $variable, 'properties' => ['class' => 'text-left pr-16 lg:pr-24 font-normal']],
|
['element' => 'th', 'content' => $variable, 'properties' => ['class' => 'text-left pr-16 lg:pr-24 font-normal']],
|
||||||
]];
|
]];
|
||||||
|
@ -1,45 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
|
||||||
*
|
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
|
||||||
*
|
|
||||||
* @copyright Copyright (c) 2020. Invoice Ninja LLC (https://invoiceninja.com)
|
|
||||||
*
|
|
||||||
* @license https://opensource.org/licenses/AAL
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace App\Services\PdfMaker\Designs;
|
|
||||||
|
|
||||||
use App\Services\PdfMaker\Designs\Utilities\BaseDesign;
|
|
||||||
use App\Services\PdfMaker\Designs\Utilities\DesignHelpers;
|
|
||||||
use App\Utils\Traits\MakesInvoiceValues;
|
|
||||||
|
|
||||||
/** @deprecated */
|
|
||||||
class Photo extends BaseDesign
|
|
||||||
{
|
|
||||||
use MakesInvoiceValues, DesignHelpers;
|
|
||||||
|
|
||||||
/** Global list of table elements, @var array */
|
|
||||||
public $elements;
|
|
||||||
|
|
||||||
/** @var App\Models\Client */
|
|
||||||
public $client;
|
|
||||||
|
|
||||||
/** @var App\Models\Invoice || @var App\Models\Quote */
|
|
||||||
public $entity;
|
|
||||||
|
|
||||||
/** Global state of the design, @var array */
|
|
||||||
public $context;
|
|
||||||
|
|
||||||
/** Type of entity => product||task */
|
|
||||||
public $type;
|
|
||||||
|
|
||||||
public function html()
|
|
||||||
{
|
|
||||||
return file_get_contents(
|
|
||||||
base_path('resources/views/pdf-designs/bold.html')
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
@ -100,10 +100,12 @@ class Plain extends BaseDesign
|
|||||||
$elements = [];
|
$elements = [];
|
||||||
|
|
||||||
foreach ($variables as $variable) {
|
foreach ($variables as $variable) {
|
||||||
$elements[] = ['element' => 'tr', 'content' => '', 'elements' => [
|
$element = ['element' => 'tr', 'properties' => ['hidden' => $this->entityVariableCheck($variable)], 'content' => '', 'elements' => [
|
||||||
['element' => 'th', 'content' => $variable . '_label', 'properties' => ['class' => 'text-left pr-4 font-normal']],
|
['element' => 'th', 'content' => $variable . '_label', 'properties' => ['class' => 'text-left pr-4 font-normal']],
|
||||||
['element' => 'th', 'content' => $variable, 'properties' => ['class' => 'text-left pr-4 font-medium']],
|
['element' => 'th', 'content' => $variable, 'properties' => ['class' => 'text-left pr-4 font-medium']],
|
||||||
]];
|
]];
|
||||||
|
|
||||||
|
$elements[] = $element;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $elements;
|
return $elements;
|
||||||
|
@ -91,7 +91,7 @@ class Playful extends BaseDesign
|
|||||||
$elements = [];
|
$elements = [];
|
||||||
|
|
||||||
foreach ($variables as $variable) {
|
foreach ($variables as $variable) {
|
||||||
$elements[] = ['element' => 'tr', 'content' => '', 'elements' => [
|
$elements[] = ['element' => 'tr', 'properties' => ['hidden' => $this->entityVariableCheck($variable)], 'content' => '', 'elements' => [
|
||||||
['element' => 'th', 'content' => $variable . '_label', 'properties' => ['class' => 'text-left pr-4 font-normal']],
|
['element' => 'th', 'content' => $variable . '_label', 'properties' => ['class' => 'text-left pr-4 font-normal']],
|
||||||
['element' => 'th', 'content' => $variable, 'properties' => ['class' => 'text-left pr-4 font-medium']],
|
['element' => 'th', 'content' => $variable, 'properties' => ['class' => 'text-left pr-4 font-medium']],
|
||||||
]];
|
]];
|
||||||
|
Loading…
Reference in New Issue
Block a user