Added Invoice Ninja footer to emails

This commit is contained in:
Hillel Coren 2017-10-22 12:37:24 +03:00
parent 715838d401
commit 938096d50b
10 changed files with 49 additions and 34 deletions

View File

@ -1085,6 +1085,11 @@ class Account extends Eloquent
}
}
public function isPaid()
{
return Utils::isNinja() ? $this->isPro() : Utils::isWhiteLabel();
}
/**
* @param null $plan_details
*

View File

@ -305,7 +305,7 @@ $LANG = array(
'specify_colors' => 'Specify colors',
'specify_colors_label' => 'Select the colors used in the invoice',
'chart_builder' => 'Chart Builder',
'ninja_email_footer' => 'Use :site to invoice your clients and get paid online for free!',
'ninja_email_footer' => 'Created by :site. Create. Send. Get Paid.',
'go_pro' => 'Go Pro',
'quote' => 'Quote',
'quotes' => 'Quotes',

View File

@ -63,10 +63,14 @@
@section('footer')
<p style="color: #A7A6A6; font-size: 13px; line-height: 18px; margin: 0 0 7px; padding: 0;">
{{ $account->present()->address }}
<br />
@if ($account->website)
<strong><a href="{{ $account->present()->website }}" style="color: #A7A6A6; text-decoration: none; font-weight: bold; font-size: 10px;">{{ $account->website }}</a></strong>
@if (! $account->isPaid())
{!! trans('texts.ninja_email_footer', ['site' => link_to(NINJA_WEB_URL . '?utm_source=email_footer', APP_NAME)]) !!}
@else
{{ $account->present()->address }}
<br />
@if ($account->website)
<strong><a href="{{ $account->present()->website }}" style="color: #A7A6A6; text-decoration: none; font-weight: bold; font-size: 10px;">{{ $account->website }}</a></strong>
@endif
@endif
</p>
@stop

View File

@ -63,10 +63,14 @@
@section('footer')
<p style="color: #A7A6A6; font-size: 13px; line-height: 18px; margin: 0 0 7px; padding: 0;">
{{ $account->present()->address }}
<br />
@if ($account->website)
<strong><a href="{{ $account->present()->website }}" style="color: #A7A6A6; text-decoration: none; font-weight: bold; font-size: 10px;">{{ $account->website }}</a></strong>
@if (! $account->isPaid())
{!! trans('texts.ninja_email_footer', ['site' => link_to(NINJA_WEB_URL . '?utm_source=email_footer', APP_NAME)]) !!}
@else
{{ $account->present()->address }}
<br />
@if ($account->website)
<strong><a href="{{ $account->present()->website }}" style="color: #A7A6A6; text-decoration: none; font-weight: bold; font-size: 10px;">{{ $account->website }}</a></strong>
@endif
@endif
</p>
@stop

View File

@ -8,5 +8,9 @@
@include('emails.partials.client_view_action')
@endif
{!! $body !!}
@if (! $account->isPaid())
<br/>
{!! trans('texts.ninja_email_footer', ['site' => link_to(NINJA_WEB_URL . '?utm_source=email_footer', APP_NAME)]) !!}
@endif
</body>
</html>

View File

@ -1 +1,5 @@
{!! strip_tags(str_replace('</div>', "\n\n", $body)) !!}
@if (! $account->isPaid())
{{ trans('texts.ninja_email_footer', ['site' => NINJA_WEB_URL . '?utm_source=email_footer']) }}
@endif

View File

@ -25,17 +25,3 @@
</td>
</tr>
@stop
@section('footer')
@if (Utils::isNinja() || ! Utils::isWhiteLabel())
<p style="color: #A7A6A6; font-size: 13px; line-height: 18px; margin: 0 0 7px; padding: 0;">
<a href="{{ SOCIAL_LINK_FACEBOOK }}" style="color: #A7A6A6; text-decoration: none; font-weight: bold; font-size: 10px;"><img src="{{ $message->embed(public_path('images/emails/icon-facebook.png')) }}" alt="Facebook" /></a>
<a href="{{ SOCIAL_LINK_TWITTER }}" style="color: #A7A6A6; text-decoration: none; font-weight: bold; font-size: 10px;"><img src="{{ $message->embed(public_path('images/emails/icon-twitter.png')) }}" alt="Twitter" /></a>
<a href="{{ SOCIAL_LINK_GITHUB }}" style="color: #A7A6A6; text-decoration: none; font-weight: bold; font-size: 10px;"><img src="{{ $message->embed(public_path('images/emails/icon-github.png')) }}" alt="GitHub" /></a>
</p>
<p style="color: #A7A6A6; font-size: 13px; line-height: 18px; margin: 0 0 7px; padding: 0;">
© {{ date('Y') }} Invoice Ninja<br />
</p>
@endif
@stop

View File

@ -8,5 +8,9 @@
@include('emails.partials.client_view_action', ['link' => $link])
@endif
{!! $body !!}
@if (! $account->isPaid())
<br/>
{!! trans('texts.ninja_email_footer', ['site' => link_to(NINJA_WEB_URL . '?utm_source=email_footer', APP_NAME)]) !!}
@endif
</body>
</html>

View File

@ -1 +1,5 @@
{!! strip_tags(str_replace('</div>', "\n\n", $body)) !!}
@if (! $account->isPaid())
{{ trans('texts.ninja_email_footer', ['site' => NINJA_WEB_URL . '?utm_source=email_footer']) }}
@endif