From b5f606df470f15806e61d2074590ed3ea7ae60e5 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Mon, 4 Jul 2016 21:47:05 +0300 Subject: [PATCH] Added and as email template variables --- app/Ninja/Mailers/ContactMailer.php | 2 ++ app/Services/TemplateService.php | 2 ++ resources/lang/en/texts.php | 4 +++- resources/views/accounts/templates_and_reminders.blade.php | 2 ++ resources/views/clients/show.blade.php | 4 +++- 5 files changed, 12 insertions(+), 2 deletions(-) diff --git a/app/Ninja/Mailers/ContactMailer.php b/app/Ninja/Mailers/ContactMailer.php index 61610187e9..1845582ae2 100644 --- a/app/Ninja/Mailers/ContactMailer.php +++ b/app/Ninja/Mailers/ContactMailer.php @@ -33,6 +33,8 @@ class ContactMailer extends Mailer 'paymentLink', 'paymentButton', 'autoBill', + 'portalLink', + 'portalButton', ]; /** diff --git a/app/Services/TemplateService.php b/app/Services/TemplateService.php index d6a3f12ea2..bcc371304e 100644 --- a/app/Services/TemplateService.php +++ b/app/Services/TemplateService.php @@ -63,6 +63,8 @@ class TemplateService '$customInvoice2' => $account->custom_invoice_text_label2, '$documents' => $documentsHTML, '$autoBill' => empty($data['autobill'])?'':$data['autobill'], + '$portalLink' => $invitation->contact->link, + '$portalButton' => Form::emailViewButton($invitation->contact->link, 'portal'), ]; // Add variables for available payment types diff --git a/resources/lang/en/texts.php b/resources/lang/en/texts.php index eb6ed3fd03..ceaa077b14 100644 --- a/resources/lang/en/texts.php +++ b/resources/lang/en/texts.php @@ -1692,7 +1692,7 @@ $LANG = array( 'lang_Spanish' => 'Spanish', 'lang_Spanish - Spain' => 'Spanish - Spain', 'lang_Swedish' => 'Swedish', - + // Frequencies 'freq_weekly' => 'Weekly', 'freq_two_weeks' => 'Two weeks', @@ -2004,6 +2004,8 @@ $LANG = array( 'country_Yemen' => 'Yemen', 'country_Zambi' => 'Zambi', + 'view_client_portal' => 'View client portal', + 'view_portal' => 'View Portal', ); return $LANG; diff --git a/resources/views/accounts/templates_and_reminders.blade.php b/resources/views/accounts/templates_and_reminders.blade.php index f6412ffcab..a54d23440b 100644 --- a/resources/views/accounts/templates_and_reminders.blade.php +++ b/resources/views/accounts/templates_and_reminders.blade.php @@ -267,6 +267,8 @@ "{{ URL::to('/payment/...') }}$password", '{!! Form::flatButton('pay_now', '#36c157') !!}$password', '{{ trans('texts.auto_bill_notification_placeholder') }}', + "{{ URL::to('/client/portal/...') }}", + '{!! Form::flatButton('view_portal', '#36c157') !!}', ]; // Add blanks for custom values diff --git a/resources/views/clients/show.blade.php b/resources/views/clients/show.blade.php index cf03276e3f..bbff7eec5e 100644 --- a/resources/views/clients/show.blade.php +++ b/resources/views/clients/show.blade.php @@ -148,7 +148,9 @@ @if ($contact->phone) {{ $contact->phone }}
@endif - {{ trans('texts.view_dashboard') }}
+ @if ($client->account->enable_client_portal) + {{ trans('texts.view_client_portal') }}
+ @endif @endforeach