Merge pull request #918 from cachethq/fix-email-snakecase

Fix email templates snakecase
This commit is contained in:
Graham Campbell
2015-08-17 22:06:40 +01:00
8 changed files with 37 additions and 37 deletions

View File

@@ -68,16 +68,16 @@ class SendIncidentEmailNotificationHandler
if ($event->incident->visible === 1) {
foreach ($this->subscriber->all() as $subscriber) {
$mail = [
'email' => $subscriber->email,
'subject' => 'New incident reported.',
'hasComponent' => ($event->incident->component) ? true : false,
'componentName' => $component->name,
'status' => $incident->humanStatus,
'htmlContent' => $incident->formattedMessage,
'textContent' => $incident->message,
'token' => $subscriber->token,
'unsubscribeLink' => route('subscribe.unsubscribe', ['code' => $subscriber->verify_code]),
'appUrl' => env('APP_URL'),
'email' => $subscriber->email,
'subject' => 'New incident reported.',
'has_component' => ($event->incident->component) ? true : false,
'component_name' => $component->name,
'status' => $incident->humanStatus,
'html_content' => $incident->formattedMessage,
'text_content' => $incident->message,
'token' => $subscriber->token,
'unsubscribe_link' => route('subscribe.unsubscribe', ['code' => $subscriber->verify_code]),
'app_url' => env('APP_URL'),
];
$this->mailer->queue([

View File

@@ -65,15 +65,15 @@ class SendMaintenanceEmailNotificationHandler
foreach ($this->subscriber->all() as $subscriber) {
$mail = [
'email' => $subscriber->email,
'subject' => 'Scheduled maintenance.',
'status' => $data->humanStatus,
'htmlContent' => $data->formattedMessage,
'textContent' => $data->message,
'scheduled_at' => $data->scheduled_at_formatted,
'token' => $subscriber->token,
'unsubscribeLink' => route('subscribe.unsubscribe', ['code' => $subscriber->verify_code]),
'appUrl' => env('APP_URL'),
'email' => $subscriber->email,
'subject' => 'Scheduled maintenance.',
'status' => $data->humanStatus,
'html_content' => $data->formattedMessage,
'text_content' => $data->message,
'scheduled_at' => $data->scheduled_at_formatted,
'token' => $subscriber->token,
'unsubscribe_link' => route('subscribe.unsubscribe', ['code' => $subscriber->verify_code]),
'app_url' => env('APP_URL'),
];
$this->mailer->queue([

View File

@@ -42,10 +42,10 @@ class SendSubscriberVerificationEmailHandler
public function handle(CustomerHasSubscribedEvent $event)
{
$mail = [
'email' => $event->subscriber->email,
'subject' => 'Confirm your subscription.',
'link' => route('subscribe.verify', ['code' => $event->subscriber->verify_code]),
'appUrl' => env('APP_URL'),
'email' => $event->subscriber->email,
'subject' => 'Confirm your subscription.',
'link' => route('subscribe.verify', ['code' => $event->subscriber->verify_code]),
'app_url' => env('APP_URL'),
];
$this->mailer->queue([

View File

@@ -14,13 +14,13 @@
</p>
<p>
{!! $htmlContent !!}
{!! $html_content !!}
</p>
@if(Setting::get('show_support'))
<p>{!! trans('cachet.powered_by', ['app' => Setting::get('app_name')]) !!}</p>
@endif
<p>
<small><a href="{{ $unsubscribeLink }}">{!! trans('cachet.subscriber.email.unsubscribe') !!}</a></small>
<small><a href="{{ $unsubscribe_link }}">{!! trans('cachet.subscriber.email.unsubscribe') !!}</a></small>
</p>
@stop

View File

@@ -4,10 +4,10 @@
{!! $status !!}
{!! $textContent !!}
{!! $text_content !!}
@if(Setting::get('show_support'))
{!! trans('cachet.powered_by', ['app' => Setting::get('app_name')]) !!}
@endif
{!! trans('cachet.subscriber.email.unsubscribe') !!} {{ $unsubscribeLink }}
{!! trans('cachet.subscriber.email.unsubscribe') !!} {{ $unsubscribe_link }}

View File

@@ -9,19 +9,19 @@
<p>
{!! $status !!}
@if($hasComponent)
({{ $componentName }})
@if($has_component)
({{ $component_name }})
@endif
</p>
<p>
{!! $htmlContent !!}
{!! $html_content !!}
</p>
@if(Setting::get('show_support'))
<p>{!! trans('cachet.powered_by', ['app' => Setting::get('app_name')]) !!}</p>
@endif
<p>
<small><a href="{{ $unsubscribeLink }}">{!! trans('cachet.subscriber.email.unsubscribe') !!}</a></small>
<small><a href="{{ $unsubscribe_link }}">{!! trans('cachet.subscriber.email.unsubscribe') !!}</a></small>
</p>
@stop

View File

@@ -1,14 +1,14 @@
{!! trans('cachet.subscriber.email.incident.text', ['app_name' => Setting::get('app_name')]) !!}
{!! $status !!}
@if($hasComponent)
({{ $componentName }})
@if($has_component)
({{ $component_name }})
@endif
{!! $textContent !!}
{!! $text_content !!}
@if(Setting::get('show_support'))
{!! trans('cachet.powered_by', ['app' => Setting::get('app_name')]) !!}
@endif
{!! trans('cachet.subscriber.email.unsuscribe') !!} {{ $unsubscribeLink }}
{!! trans('cachet.subscriber.email.unsuscribe') !!} {{ $unsubscribe_link }}

View File

@@ -13,13 +13,13 @@
<tr>
<td align="center" valign="top" class="body-cell">
<table width="544" border="0" cellpadding="0" cellspacing="0" class="box">
@if($bannerImage = Setting::get('app_banner'))
@if($banner_image = Setting::get('app_banner'))
<tr>
<td class="header">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="header-logo">
<a href="{{ $app_url }}"><img src="data:{{ Setting::get('app_banner_type') }};base64, {{ $bannerImage}}"></a>
<a href="{{ $app_url }}"><img src="data:{{ Setting::get('app_banner_type') }};base64, {{ $banner_image}}"></a>
</td>
</tr>
</table>