Files
n8n-compose/freescout-templates/reply_fancy.blade.php

144 lines
8.4 KiB
PHP
Raw Normal View History

<html lang="{{ app()->getLocale() }}" @if (\Helper::isLocaleRtl()) dir="rtl" @endif>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
p { margin: 0 0 1.2em 0; }
pre { font-family: Menlo, Monaco, monospace, sans-serif; padding: 0 0 1.2em 0; color: #333; line-height: 1.5; }
img { max-width: 100%; height: auto; }
a { color: #1b6ca8; text-decoration: none; }
blockquote { margin: 8px 0; padding: 8px 16px; border-left: 3px solid #d0d7de; color: #656d76; }
</style>
</head>
<body style="margin:0; padding:0; background:#f0f2f5; -webkit-text-size-adjust:none;">
@php
$reply_separator = \MailHelper::getHashedReplySeparator($headers['Message-ID']);
$is_rtl = \Helper::isLocaleRtl();
$is_forwarded = !empty($threads[0]) ? $threads[0]->isForwarded() : false;
@endphp
{{-- Outer background table --}}
<table width="100%" cellpadding="0" cellspacing="0" border="0" style="background:#f0f2f5; padding:24px 16px;">
<tr><td align="center">
{{-- Email card --}}
<table width="600" cellpadding="0" cellspacing="0" border="0" style="background:#ffffff; border-radius:8px; overflow:hidden; max-width:600px; box-shadow:0 2px 16px rgba(0,0,0,0.09);">
{{-- HEADER BAR --}}
<tr>
<td style="background:#1b6ca8; padding:18px 28px;">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td>
<span style="color:#ffffff; font-size:17px; font-weight:700; font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Arial,sans-serif; letter-spacing:-0.2px;">{{ $mailbox->name }}</span>
</td>
<td align="right">
<span style="background:rgba(255,255,255,0.18); color:#ffffff; font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Arial,sans-serif; font-size:12px; font-weight:500; padding:4px 12px; border-radius:20px; white-space:nowrap; border:1px solid rgba(255,255,255,0.25);">
Ticket #{{ $conversation->number }}
</span>
</td>
</tr>
</table>
</td>
</tr>
{{-- CONTENT with reply separator --}}
<tr>
<td style="padding:0;">
<div id="{{ $reply_separator }}" class="{{ $reply_separator }}" data-fs="{{ $reply_separator }}" style="width:100%!important; margin:0; padding:0;">
@foreach ($threads as $thread)
@if ($loop->index == 1)
{{-- Gmail quoted-message marker --}}
<!-- originalMessage --><div class="gmail_quote" style="height:0; font-size:0px; line-height:0px; color:#ffffff;"></div>
@endif
@if (!$loop->first)
{{-- Quoted thread header --}}
<div style="margin:0 28px 4px; padding:10px 16px; background:#f6f8fa; border-left:3px solid #1b6ca8; border-radius:0 4px 4px 0;">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td>
<span style="font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Arial,sans-serif; color:#24292f; font-size:13px; font-weight:600; @if($is_rtl) direction:rtl; unicode-bidi:plaintext; @endif">
{{ $thread->getFromName($mailbox) }}@if ($is_forwarded && $thread->from) &lt;{{ $thread->from }}&gt;@endif
</span>
@if ($thread->getCcArray())
<span style="font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Arial,sans-serif; color:#9aa0a6; font-size:12px;">
&nbsp;&middot; Cc: {{ implode(', ', $thread->getCcArray()) }}
</span>
@endif
</td>
<td align="right" valign="top" style="white-space:nowrap; padding-left:8px;">
<span style="font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Arial,sans-serif; color:#9aa0a6; font-size:12px;">
{{ App\Customer::dateFormat($thread->created_at, 'M j, H:i') }}
</span>
</td>
</tr>
</table>
</div>
@endif
{{-- Thread body --}}
<div style="padding: {{ $loop->first ? '28px 28px 0' : '12px 28px 0 44px' }};">
<div style="font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Arial,sans-serif; color:{{ $loop->first ? '#1a1a1a' : '#656d76' }}; font-size:14px; line-height:1.7; @if($is_rtl) text-align:right; direction:rtl; unicode-bidi:plaintext; @endif">
@if ($thread->source_via == App\Thread::PERSON_USER && $mailbox->before_reply && $loop->first)
<span style="color:#b5b5b5;">{{ $mailbox->before_reply }}</span><br><br>
@endif
{!! $thread->getCleanBody() !!}
@action('reply_email.before_signature', $thread, $loop, $threads, $conversation, $mailbox, $threads_count)
@if ($thread->source_via == App\Thread::PERSON_USER && \Eventy::filter('reply_email.include_signature', true, $thread))
<br>{!! $conversation->getSignatureProcessed(['thread' => $thread]) !!}
@endif
@action('reply_email.after_signature', $thread, $loop, $threads, $conversation, $mailbox, $threads_count)
<br><br>
</div>
</div>
@if (!$loop->last)
<div style="margin:8px 28px 0; height:1px; background:#e8eaed;"></div>
@endif
@endforeach
{{-- Tracking pixel and message marker (hidden) --}}
<div style="height:0; font-size:0px; line-height:0px; color:#ffffff;">
@if (\App\Option::get('open_tracking'))
<img src="{{ route('open_tracking.set_read', ['conversation_id' => $threads->first()->conversation_id, 'thread_id' => $threads->first()->id, 'otr' => '1']) }}" alt="" />
@endif
<span style="font-size:0px; line-height:0px; color:#ffffff !important;">&zwnj;&zwnj;&zwnj;&zwnj;&zwnj;&zwnj;&zwnj;&zwnj;&zwnj;&zwnj;&zwnj;&zwnj;&zwnj;&zwnj;&zwnj;&zwnj;&zwnj;&zwnj;&zwnj;&zwnj;&zwnj;&zwnj;&zwnj;&zwnj;&zwnj;&zwnj;&zwnj;&zwnj;&zwnj;&zwnj;&zwnj;&zwnj;&zwnj;&zwnj;&zwnj;&zwnj;&zwnj;&zwnj;&zwnj;&zwnj;{{ \MailHelper::getMessageMarker($headers['Message-ID']) }}</span>
</div>
</div>{{-- /reply_separator --}}
</td>
</tr>
{{-- FOOTER --}}
<tr>
<td style="padding:0 28px;">
<div style="height:1px; background:#e8eaed; margin-top:8px;"></div>
</td>
</tr>
<tr>
<td style="padding:14px 28px 20px;">
<span style="font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Arial,sans-serif; font-size:12px; color:#9aa0a6;">
{{ $mailbox->name }} &bull; <a href="mailto:{{ $mailbox->email }}" style="color:#1b6ca8; text-decoration:none;">{{ $mailbox->email }}</a>
</span>
</td>
</tr>
@if (\App\Option::get('email_branding'))
<tr>
<td style="padding:0 28px 16px;">
<span style="font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Arial,sans-serif; font-size:11px; color:#c0c4cc; @if($is_rtl) direction:rtl; unicode-bidi:plaintext; @endif">
{!! __('Support powered by :app_name — Free open source help desk & shared mailbox', ['app_name' => '<a href="https://landing.freescout.net" style="color:#c0c4cc;">'.\Config::get('app.name').'</a>']) !!}
</span>
</td>
</tr>
@endif
</table>{{-- /email card --}}
</td></tr>
</table>{{-- /outer --}}
</body>
</html>