From fc1bc450801e2cfbb0675884990675f844f82838 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Fri, 10 Jun 2022 17:47:27 +0300 Subject: [PATCH] styling.. --- .../documents/template/classic.blade.php | 165 +++++++++++----- .../documents/template/default.blade.php | 130 +++++++----- .../documents/template/modern.blade.php | 187 ++++++++++++------ 3 files changed, 327 insertions(+), 155 deletions(-) diff --git a/resources/views/components/documents/template/classic.blade.php b/resources/views/components/documents/template/classic.blade.php index 004f07041..5b8bab05b 100644 --- a/resources/views/components/documents/template/classic.blade.php +++ b/resources/views/components/documents/template/classic.blade.php @@ -12,7 +12,7 @@
@stack('company_logo_start') - @if (!$hideCompanyLogo) + @if (! $hideCompanyLogo) @if (!empty($document->contact->logo) && !empty($document->contact->logo->id)) @else @@ -31,19 +31,20 @@ {{ $textDocumentSubheading }}

@endif - @if (!$hideCompanyDetails) - @if (!$hideCompanyName) + + @if (! $hideCompanyDetails) + @if (! $hideCompanyName)

{{ setting('company.name') }}

@endif - @if (!$hideCompanyAddress) + @if (! $hideCompanyAddress)

{!! nl2br(setting('company.address')) !!} {!! $document->company->location !!}

@endif - @if (!$hideCompanyTaxNumber) + @if (! $hideCompanyTaxNumber) @if (setting('company.tax_number'))

@@ -54,7 +55,7 @@ @endif @endif - @if (!$hideCompanyPhone) + @if (! $hideCompanyPhone) @if (setting('company.phone'))

{{ setting('company.phone') }} @@ -62,8 +63,10 @@ @endif @endif - @if (!$hideCompanyEmail) -

{{ setting('company.email') }}

+ @if (! $hideCompanyEmail) +

+ {{ setting('company.email') }} +

@endif @endif @stack('company_details_end') @@ -81,9 +84,14 @@
@stack('invoice_number_input_start') - @if (!$hideDocumentNumber) + @if (! $hideDocumentNumber)
- {{ trans($textDocumentNumber) }}:
+ + {{ trans($textDocumentNumber) }}: + + +
+ {{ $document->document_number }}
@endif @@ -102,17 +110,21 @@
@if (! $hideContactInfo) -

{{ trans($textContactInfo) }}

+

+ {{ trans($textContactInfo) }} +

@endif @stack('name_input_start') - @if (!$hideContactName) -

{{ $document->contact_name }}

+ @if (! $hideContactName) +

+ {{ $document->contact_name }} +

@endif @stack('name_input_end') @stack('address_input_start') - @if (!$hideContactAddress) + @if (! $hideContactAddress)

{!! nl2br($document->contact_address) !!}
@@ -122,7 +134,7 @@ @stack('address_input_end') @stack('tax_number_input_start') - @if (!$hideContactTaxNumber) + @if (! $hideContactTaxNumber) @if ($document->contact_tax_number)

@@ -135,7 +147,7 @@ @stack('tax_number_input_end') @stack('phone_input_start') - @if (!$hideContactPhone) + @if (! $hideContactPhone) @if ($document->contact_phone)

{{ $document->contact_phone }} @@ -145,8 +157,10 @@ @stack('phone_input_end') @stack('email_start') - @if (!$hideContactEmail) -

{{ $document->contact_email }}

+ @if (! $hideContactEmail) +

+ {{ $document->contact_email }} +

@endif @stack('email_input_end')
@@ -155,30 +169,45 @@
@stack('order_number_input_start') - @if (!$hideOrderNumber) + @if (! $hideOrderNumber) @if ($document->order_number)

- {{ trans($textOrderNumber) }}: - {{ $document->order_number }} + + {{ trans($textOrderNumber) }}: + + + + {{ $document->order_number }} +

@endif @endif @stack('order_number_input_end') @stack('issued_at_input_start') - @if (!$hideIssuedAt) + @if (! $hideIssuedAt)

- {{ trans($textIssuedAt) }}: - @date($document->issued_at) + + {{ trans($textIssuedAt) }}: + + + + @date($document->issued_at) +

@endif @stack('issued_at_input_end') @stack('due_at_input_start') - @if (!$hideDueAt) + @if (! $hideDueAt)

- {{ trans($textDueAt) }}: - @date($document->due_at) + + {{ trans($textDueAt) }}: + + + + @date($document->due_at) +

@endif @stack('due_at_input_end') @@ -186,8 +215,13 @@ @foreach ($document->totals_sorted as $total) @if ($total->code == 'total')

- {{ trans($total->name) }}: - @money($total->amount - $document->paid, $document->currency_code, true) + + {{ trans($total->name) }}: + + + + @money($total->amount - $document->paid, $document->currency_code, true) +

@endif @endforeach @@ -195,7 +229,7 @@
-@if (!$hideItems) +@if (! $hideItems)
@@ -203,34 +237,44 @@ @stack('name_th_start') - @if (!$hideItems || (!$hideName && !$hideDescription)) - {{ (trans_choice($textItems, 2) != $textItems) ? trans_choice($textItems, 2) : trans($textItems) }} + @if (! $hideItems || (! $hideName && ! $hideDescription)) + + {{ (trans_choice($textItems, 2) != $textItems) ? trans_choice($textItems, 2) : trans($textItems) }} + @endif @stack('name_th_end') @stack('quantity_th_start') - @if (!$hideQuantity) - {{ trans($textQuantity) }} + @if (! $hideQuantity) + + {{ trans($textQuantity) }} + @endif @stack('quantity_th_end') @stack('price_th_start') - @if (!$hidePrice) - {{ trans($textPrice) }} + @if (! $hidePrice) + + {{ trans($textPrice) }} + @endif @stack('price_th_end') - @if (!$hideDiscount) + @if (! $hideDiscount) @if (in_array(setting('localisation.discount_location', 'total'), ['item', 'both'])) @stack('discount_td_start') - {{ trans('invoices.discount') }} + + {{ trans('invoices.discount') }} + @stack('discount_td_end') @endif @endif @stack('total_th_start') - @if (!$hideAmount) - {{ trans($textAmount) }} + @if (! $hideAmount) + + {{ trans($textAmount) }} + @endif @stack('total_th_end') @@ -270,9 +314,12 @@
@stack('notes_input_start') - @if($hideNote) + @if ($hideNote) @if ($document->notes) - {{ trans_choice('general.notes', 2) }} + + {{ trans_choice('general.notes', 2) }} + + {!! nl2br($document->notes) !!} @endif @endif @@ -285,23 +332,39 @@ @if ($total->code != 'total') @stack($total->code . '_total_tr_start')
- {{ trans($total->title) }}: - @money($total->amount, $document->currency_code, true) + + {{ trans($total->title) }}: + + + + @money($total->amount, $document->currency_code, true) +
@stack($total->code . '_total_tr_end') @else @if ($document->paid) @stack('paid_total_tr_start')
- {{ trans('invoices.paid') }}: - - @money($document->paid, $document->currency_code, true) + + {{ trans('invoices.paid') }}: + + + + - @money($document->paid, $document->currency_code, true) +
@stack('paid_total_tr_end') @endif + @stack('grand_total_tr_start')
- {{ trans($total->name) }}: - @money($document->amount_due, $document->currency_code, true) + + {{ trans($total->name) }}: + + + + @money($document->amount_due, $document->currency_code, true) +
@stack('grand_total_tr_end') @endif @@ -309,12 +372,14 @@
-@if (!$hideFooter) +@if (! $hideFooter) @if ($document->footer)
- {!! nl2br($document->footer) !!} + + {!! nl2br($document->footer) !!} +
diff --git a/resources/views/components/documents/template/default.blade.php b/resources/views/components/documents/template/default.blade.php index 25e11b115..2e565719a 100644 --- a/resources/views/components/documents/template/default.blade.php +++ b/resources/views/components/documents/template/default.blade.php @@ -12,8 +12,8 @@
@stack('company_logo_start') - @if (!$hideCompanyLogo) - @if (!empty($document->contact->logo) && !empty($document->contact->logo->id)) + @if (! $hideCompanyLogo) + @if (! empty($document->contact->logo) && ! empty($document->contact->logo->id)) @else @@ -31,19 +31,20 @@ {{ $textDocumentSubheading }}

@endif - @if (!$hideCompanyDetails) - @if (!$hideCompanyName) + + @if (! $hideCompanyDetails) + @if (! $hideCompanyName)

{{ setting('company.name') }}

@endif - @if (!$hideCompanyAddress) + @if (! $hideCompanyAddress)

{!! nl2br(setting('company.address')) !!} {!! $document->company->location !!}

@endif - @if (!$hideCompanyTaxNumber) + @if (! $hideCompanyTaxNumber) @if (setting('company.tax_number'))

@@ -53,17 +54,15 @@ @endif - @if (!$hideCompanyPhone) - + @if (! $hideCompanyPhone) @if (setting('company.phone'))

{{ setting('company.phone') }}

@endif - @endif - @if (!$hideCompanyEmail) + @if (! $hideCompanyEmail)

{{ setting('company.email') }}

@endif @endif @@ -80,13 +79,13 @@ @endif @stack('name_input_start') - @if (!$hideContactName) + @if (! $hideContactName)

{{ $document->contact_name }}

@endif @stack('name_input_end') @stack('address_input_start') - @if (!$hideContactAddress) + @if (! $hideContactAddress)

{!! nl2br($document->contact_address) !!}
@@ -96,7 +95,7 @@ @stack('address_input_end') @stack('tax_number_input_start') - @if (!$hideContactTaxNumber) + @if (! $hideContactTaxNumber) @if ($document->contact_tax_number)

@@ -109,7 +108,7 @@ @stack('tax_number_input_end') @stack('phone_input_start') - @if (!$hideContactPhone) + @if (! $hideContactPhone) @if ($document->contact_phone)

{{ $document->contact_phone }} @@ -119,7 +118,7 @@ @stack('phone_input_end') @stack('email_start') - @if (!$hideContactEmail) + @if (! $hideContactEmail)

{{ $document->contact_email }}

@@ -131,48 +130,59 @@
@stack('document_number_input_start') - @if (!$hideDocumentNumber) + @if (! $hideDocumentNumber)

{{ trans($textDocumentNumber) }}: - {{ $document->document_number }} + + + {{ $document->document_number }} +

- @endif @stack('document_number_input_end') @stack('order_number_input_start') - @if (!$hideOrderNumber) + @if (! $hideOrderNumber) @if ($document->order_number)

{{ trans($textOrderNumber) }}: - {{ $document->order_number }} + + + {{ $document->order_number }} +

@endif @endif @stack('order_number_input_end') @stack('issued_at_input_start') - @if (!$hideIssuedAt) + @if (! $hideIssuedAt)

{{ trans($textIssuedAt) }}: - @date($document->issued_at) + + + @date($document->issued_at) +

@endif @stack('issued_at_input_end') @stack('due_at_input_start') - @if (!$hideDueAt) + @if (! $hideDueAt)

{{ trans($textDueAt) }}: - @date($document->due_at) + + + @date($document->due_at) +

@endif @stack('due_at_input_end') @@ -180,7 +190,7 @@
-@if (!$hideItems) +@if (! $hideItems)
@@ -188,38 +198,49 @@ @stack('name_th_start') - @if (!$hideItems || (!$hideName && !$hideDescription)) - {{ (trans_choice($textItems, 2) != $textItems) ? trans_choice($textItems, 2) : trans($textItems) }} + @if (! $hideItems || (! $hideName && ! $hideDescription)) + + {{ (trans_choice($textItems, 2) != $textItems) ? trans_choice($textItems, 2) : trans($textItems) }} + @endif @stack('name_th_end') @stack('quantity_th_start') - @if (!$hideQuantity) - {{ trans($textQuantity) }} + @if (! $hideQuantity) + + {{ trans($textQuantity) }} + @endif @stack('quantity_th_end') @stack('price_th_start') - @if (!$hidePrice) - {{ trans($textPrice) }} + @if (! $hidePrice) + + {{ trans($textPrice) }} + @endif @stack('price_th_end') - @if (!$hideDiscount) + @if (! $hideDiscount) @if (in_array(setting('localisation.discount_location', 'total'), ['item', 'both'])) @stack('discount_td_start') - {{ trans('invoices.discount') }} + + {{ trans('invoices.discount') }} + @stack('discount_td_end') @endif @endif @stack('total_th_start') - @if (!$hideAmount) - {{ trans($textAmount) }} + @if (! $hideAmount) + + {{ trans($textAmount) }} + @endif @stack('total_th_end') + @if ($document->items->count()) @foreach($document->items as $item) @@ -255,7 +276,10 @@
@stack('notes_input_start') @if ($document->notes) -

{{ trans_choice('general.notes', 2) }}

+

+ {{ trans_choice('general.notes', 2) }} +

+ {!! nl2br($document->notes) !!} @endif @stack('notes_input_end') @@ -267,23 +291,39 @@ @if ($total->code != 'total') @stack($total->code . '_total_tr_start')
- {{ trans($total->title) }}: - @money($total->amount, $document->currency_code, true) + + {{ trans($total->title) }}: + + + + @money($total->amount, $document->currency_code, true) +
@stack($total->code . '_total_tr_end') @else @if ($document->paid) @stack('paid_total_tr_start')
- {{ trans('invoices.paid') }}: - - @money($document->paid, $document->currency_code, true) + + {{ trans('invoices.paid') }}: + + + + - @money($document->paid, $document->currency_code, true) +
@stack('paid_total_tr_end') @endif + @stack('grand_total_tr_start')
- {{ trans($total->name) }}: - @money($document->amount_due, $document->currency_code, true) + + {{ trans($total->name) }}: + + + + @money($document->amount_due, $document->currency_code, true) +
@stack('grand_total_tr_end') @endif @@ -291,12 +331,14 @@
-@if (!$hideFooter) +@if (! $hideFooter) @if ($document->footer)
- {!! nl2br($document->footer) !!} + + {!! nl2br($document->footer) !!} +
diff --git a/resources/views/components/documents/template/modern.blade.php b/resources/views/components/documents/template/modern.blade.php index 6c9a3ea96..8fc0191cf 100644 --- a/resources/views/components/documents/template/modern.blade.php +++ b/resources/views/components/documents/template/modern.blade.php @@ -12,8 +12,8 @@
@stack('company_logo_start') - @if (!$hideCompanyLogo) - @if (!empty($document->contact->logo) && !empty($document->contact->logo->id)) + @if (! $hideCompanyLogo) + @if (! empty($document->contact->logo) && ! empty($document->contact->logo->id)) {{ $document->contact_name }} @else {{ setting('company.name') }} @@ -31,24 +31,29 @@ {{ $textDocumentSubheading }}

@endif - @if (!$hideCompanyName) -

{{ setting('company.name') }}

+ + @if (! $hideCompanyName) +

+ {{ setting('company.name') }} +

@endif - @if (!$hideCompanyDetails) - @if (!$hideCompanyAddress) + + @if (! $hideCompanyDetails) + @if (! $hideCompanyAddress)

{!! nl2br(setting('company.address')) !!} {!! $document->company->location !!}

@endif - @if (!$hideCompanyTaxNumber) + @if (! $hideCompanyTaxNumber)

@if (setting('company.tax_number')) - - {{ trans('general.tax_number') }}: - - {{ setting('company.tax_number') }} + + {{ trans('general.tax_number') }}: + + + {{ setting('company.tax_number') }} @endif

@endif @@ -62,7 +67,9 @@ @endif @if (!$hideCompanyEmail) -

{{ setting('company.email') }}

+

+ {{ setting('company.email') }} +

@endif @endif @stack('company_details_end') @@ -74,31 +81,37 @@
@if (! $hideContactInfo) -

{{ trans($textContactInfo) }}

+

+ {{ trans($textContactInfo) }} +

@endif @stack('name_input_start') - @if (!$hideContactName) -

{{ $document->contact_name }}

+ @if (! $hideContactName) +

+ {{ $document->contact_name }} +

@endif @stack('name_input_end') @stack('address_input_start') - @if (!$hideContactAddress) + @if (! $hideContactAddress)

- {!! nl2br($document->contact_address) !!}
+ {!! nl2br($document->contact_address) !!} +
{!! $document->contact_location !!}

@endif @stack('address_input_end') @stack('tax_number_input_start') - @if (!$hideContactTaxNumber) + @if (! $hideContactTaxNumber) @if ($document->contact_tax_number)

{{ trans('general.tax_number') }}: + {{ $document->contact_tax_number }}

@endif @@ -106,7 +119,7 @@ @stack('tax_number_input_end') @stack('phone_input_start') - @if (!$hideContactPhone) + @if (! $hideContactPhone) @if ($document->contact_phone)

{{ $document->contact_phone }} @@ -116,9 +129,9 @@ @stack('phone_input_end') @stack('email_start') - @if (!$hideContactEmail) + @if (! $hideContactEmail)

- {{ $document->contact_email }} + {{ $document->contact_email }}

@endif @stack('email_input_end') @@ -128,47 +141,67 @@
@stack('order_number_input_start') - @if (!$hideOrderNumber) + @if (! $hideOrderNumber) @if ($document->order_number) -

- {{ trans($textOrderNumber) }}: - {{ $document->order_number }} -

+

+ + {{ trans($textOrderNumber) }}: + + + + {{ $document->order_number }} + +

@endif @endif @stack('order_number_input_end') @stack('invoice_number_input_start') - @if (!$hideDocumentNumber) -

- {{ trans($textDocumentNumber) }}: - {{ $document->document_number }} -

+ @if (! $hideDocumentNumber) +

+ + {{ trans($textDocumentNumber) }}: + + + + {{ $document->document_number }} + +

@endif @stack('invoice_number_input_end') @stack('issued_at_input_start') - @if (!$hideIssuedAt) -

- {{ trans($textIssuedAt) }}: - @date($document->issued_at) -

+ @if (! $hideIssuedAt) +

+ + {{ trans($textIssuedAt) }}: + + + + @date($document->issued_at) + +

@endif @stack('issued_at_input_end') @stack('due_at_input_start') - @if (!$hideDueAt) -

- {{ trans($textDueAt) }}: - @date($document->due_at) -

+ @if (! $hideDueAt) +

+ + {{ trans($textDueAt) }}: + + + + @date($document->due_at) + +

@endif @stack('due_at_input_end')
-@if (!$hideItems) +@if (! $hideItems)
@@ -176,38 +209,49 @@ @stack('name_th_start') - @if (!$hideItems || (!$hideName && !$hideDescription)) - {{ (trans_choice($textItems, 2) != $textItems) ? trans_choice($textItems, 2) : trans($textItems) }} + @if (! $hideItems || (! $hideName && ! $hideDescription)) + + {{ (trans_choice($textItems, 2) != $textItems) ? trans_choice($textItems, 2) : trans($textItems) }} + @endif @stack('name_th_end') @stack('quantity_th_start') - @if (!$hideQuantity) - {{ trans($textQuantity) }} + @if (! $hideQuantity) + + {{ trans($textQuantity) }} + @endif @stack('quantity_th_end') @stack('price_th_start') - @if (!$hidePrice) - {{ trans($textPrice) }} + @if (! $hidePrice) + + {{ trans($textPrice) }} + @endif @stack('price_th_end') - @if (!$hideDiscount) + @if (! $hideDiscount) @if (in_array(setting('localisation.discount_location', 'total'), ['item', 'both'])) @stack('discount_td_start') - {{ trans('invoices.discount') }} + + {{ trans('invoices.discount') }} + @stack('discount_td_end') @endif @endif @stack('total_th_start') - @if (!$hideAmount) - {{ trans($textAmount) }} + @if (! $hideAmount) + + {{ trans($textAmount) }} + @endif @stack('total_th_end') + @if ($document->items->count()) @foreach($document->items as $item) @@ -243,7 +287,10 @@
@stack('notes_input_start') @if ($document->notes) -

{{ trans_choice('general.notes', 2) }}

+

+ {{ trans_choice('general.notes', 2) }} +

+ {!! nl2br($document->notes) !!} @endif @stack('notes_input_end') @@ -255,23 +302,39 @@ @if ($total->code != 'total') @stack($total->code . '_total_tr_start')
- {{ trans($total->title) }}: - @money($total->amount, $document->currency_code, true) + + {{ trans($total->title) }}: + + + + @money($total->amount, $document->currency_code, true) +
@stack($total->code . '_total_tr_end') @else @if ($document->paid) @stack('paid_total_tr_start')
- {{ trans('invoices.paid') }}: - - @money($document->paid, $document->currency_code, true) + + {{ trans('invoices.paid') }}: + + + + - @money($document->paid, $document->currency_code, true) +
@stack('paid_total_tr_end') @endif + @stack('grand_total_tr_start')
- {{ trans($total->name) }}: - @money($document->amount_due, $document->currency_code, true) + + {{ trans($total->name) }}: + + + + @money($document->amount_due, $document->currency_code, true) +
@stack('grand_total_tr_end') @endif @@ -279,12 +342,14 @@
-@if (!$hideFooter) +@if (! $hideFooter) @if ($document->footer)
- {!! nl2br($document->footer) !!} + + {!! nl2br($document->footer) !!} +