From c17893f9a84d2ea3589b6c780e20a7619aa0e359 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Thu, 8 Apr 2021 17:49:28 +0200 Subject: [PATCH] Add $page_size & $page_layout --- app/Utils/HtmlEngine.php | 3 +++ ...update_designs.php => 2021_04_08_115919_update_designs.php} | 0 resources/views/pdf-designs/bold.html | 1 + resources/views/pdf-designs/business.html | 1 + resources/views/pdf-designs/clean.html | 1 + resources/views/pdf-designs/creative.html | 1 + resources/views/pdf-designs/elegant.html | 1 + resources/views/pdf-designs/hipster.html | 1 + resources/views/pdf-designs/modern.html | 1 + resources/views/pdf-designs/plain.html | 1 + resources/views/pdf-designs/playful.html | 1 + 11 files changed, 12 insertions(+) rename database/migrations/{2021_03_18_115919_update_designs.php => 2021_04_08_115919_update_designs.php} (100%) diff --git a/app/Utils/HtmlEngine.php b/app/Utils/HtmlEngine.php index 6c0cb23fc1..f39912640a 100644 --- a/app/Utils/HtmlEngine.php +++ b/app/Utils/HtmlEngine.php @@ -370,6 +370,9 @@ class HtmlEngine //$data['$entity_footer'] = ['value' => $this->client->getSetting("{$this->entity_string}_footer"), 'label' => '']; $data['$entity_footer'] = ['value' => $this->entity->footer, 'label' => '']; + $data['$page_size'] = ['value' => $this->settings->page_size, 'label' => '']; + $data['$page_layout'] = ['value' => $this->settings->page_layout, 'label' => '']; + $arrKeysLength = array_map('strlen', array_keys($data)); array_multisort($arrKeysLength, SORT_DESC, $data); diff --git a/database/migrations/2021_03_18_115919_update_designs.php b/database/migrations/2021_04_08_115919_update_designs.php similarity index 100% rename from database/migrations/2021_03_18_115919_update_designs.php rename to database/migrations/2021_04_08_115919_update_designs.php diff --git a/resources/views/pdf-designs/bold.html b/resources/views/pdf-designs/bold.html index c45aed83da..0dfb07b611 100644 --- a/resources/views/pdf-designs/bold.html +++ b/resources/views/pdf-designs/bold.html @@ -14,6 +14,7 @@ @page { margin: -0.25cm !important; + size: $page_size $page_layout; } p { diff --git a/resources/views/pdf-designs/business.html b/resources/views/pdf-designs/business.html index d8407354df..0f8eaa1fc6 100644 --- a/resources/views/pdf-designs/business.html +++ b/resources/views/pdf-designs/business.html @@ -14,6 +14,7 @@ @page { margin: $global_margin; + size: $page_size $page_layout; } p { diff --git a/resources/views/pdf-designs/clean.html b/resources/views/pdf-designs/clean.html index da5106f208..1c35ed8716 100644 --- a/resources/views/pdf-designs/clean.html +++ b/resources/views/pdf-designs/clean.html @@ -14,6 +14,7 @@ @page { margin: $global_margin; + size: $page_size $page_layout; } p { diff --git a/resources/views/pdf-designs/creative.html b/resources/views/pdf-designs/creative.html index 7a316f2146..10454b16f5 100644 --- a/resources/views/pdf-designs/creative.html +++ b/resources/views/pdf-designs/creative.html @@ -14,6 +14,7 @@ @page { margin: $global_margin; + size: $page_size $page_layout; } p { diff --git a/resources/views/pdf-designs/elegant.html b/resources/views/pdf-designs/elegant.html index 1ac6a8b8e7..bdcfd88d13 100644 --- a/resources/views/pdf-designs/elegant.html +++ b/resources/views/pdf-designs/elegant.html @@ -14,6 +14,7 @@ @page { margin: $global_margin; + size: $page_size $page_layout; } p { diff --git a/resources/views/pdf-designs/hipster.html b/resources/views/pdf-designs/hipster.html index 0c61a239bc..9520301868 100644 --- a/resources/views/pdf-designs/hipster.html +++ b/resources/views/pdf-designs/hipster.html @@ -14,6 +14,7 @@ @page { margin: $global_margin; + size: $page_size $page_layout; } p { diff --git a/resources/views/pdf-designs/modern.html b/resources/views/pdf-designs/modern.html index d4aace1f9f..c30c020068 100644 --- a/resources/views/pdf-designs/modern.html +++ b/resources/views/pdf-designs/modern.html @@ -16,6 +16,7 @@ @page { margin: -0.22cm; + size: $page_size $page_layout; } p { diff --git a/resources/views/pdf-designs/plain.html b/resources/views/pdf-designs/plain.html index 9d6ae5c30a..edfaded7ed 100644 --- a/resources/views/pdf-designs/plain.html +++ b/resources/views/pdf-designs/plain.html @@ -14,6 +14,7 @@ @page { margin: $global_margin; + size: $page_size $page_layout; } p { diff --git a/resources/views/pdf-designs/playful.html b/resources/views/pdf-designs/playful.html index cf18653fb9..0081c1a5a8 100644 --- a/resources/views/pdf-designs/playful.html +++ b/resources/views/pdf-designs/playful.html @@ -14,6 +14,7 @@ @page { margin: -0.25cm !important; + size: $page_size $page_layout; } p {