152 lines
No EOL
8 KiB
PHP
152 lines
No EOL
8 KiB
PHP
|
|
<div class="card mb-2">
|
|
<!-- Header -->
|
|
<div class="media px-4 pt-4 pb-2">
|
|
<a href="javascript:void(0)" class="messages-sidebox-toggler d-lg-none d-block align-self-center text-muted text-large pr-3 mr-3"><i class="ion ion-md-more"></i></a>
|
|
|
|
<!-- Sender photo -->
|
|
<div class="media-body">
|
|
<!-- Sender & date -->
|
|
<div class="mb-1">
|
|
@if($customer_mail->is_answer)
|
|
Antwort von:<br>
|
|
@else
|
|
@if($customer_mail->send)
|
|
Gesendet an:<br>
|
|
@else
|
|
(nicht gesendet) an:<br>
|
|
@endif
|
|
@endif
|
|
<<a href="mailto:{{$customer_mail->email}}">{{$customer_mail->email}}</a>> {{$customer_mail->sent_at }}
|
|
@if($customer_mail->recipient)
|
|
<div>TO: {{\App\Services\Util::_implodeLines($customer_mail->recipient, ', ')}}</div>
|
|
@endif
|
|
@if($customer_mail->cc)
|
|
<div>CC: {{\App\Services\Util::_implodeLines($customer_mail->cc, ', ')}}</div>
|
|
@endif
|
|
@if($customer_mail->bcc)
|
|
<div>BCC: {{\App\Services\Util::_implodeLines($customer_mail->bcc, ', ')}}</div>
|
|
@endif
|
|
</div>
|
|
|
|
<!-- Subject -->
|
|
<h5 class="line-height-inherit m-0">{{$customer_mail->subject}}</h5>
|
|
</div>
|
|
</div>
|
|
<hr class="border-light m-0">
|
|
<div class="p-4">
|
|
{!! nl2br($customer_mail->message) !!}
|
|
</div>
|
|
<hr class="border-light m-0">
|
|
|
|
<!-- Message infos -->
|
|
<div class="px-4 pt-4 pb-2">
|
|
@if($customer_mail->customer)
|
|
<p><strong>Kunde: </strong>
|
|
{{ $customer_mail->customer->salutation->name }} {{ $customer_mail->customer->title }} {{ $customer_mail->customer->firstname }} {{ $customer_mail->customer->name }}
|
|
@if($customer_mail->booking)
|
|
({{$customer_mail->booking->inquiry_id}})
|
|
@endif
|
|
</p>
|
|
@endif
|
|
|
|
@if($customer_mail->booking)
|
|
<p><strong>Buchung: </strong>
|
|
@if($customer_mail->booking->travel_country_id)
|
|
{{ " | ".$customer_mail->booking->travel_country->name }}
|
|
@endif
|
|
@if($customer_mail->booking->travelagenda_id)
|
|
{{ " | ".$customer_mail->booking->travel_agenda->name }}
|
|
@endif
|
|
({{ $customer_mail->booking_id }})
|
|
</p>
|
|
@endif
|
|
|
|
@if($customer_mail->send)
|
|
<span class="badge badge-success">Mail gesendet</span>
|
|
<p>Datum: {{$customer_mail->sent_at}}</p>
|
|
@endif
|
|
@if($customer_mail->fail)
|
|
<span class="badge badge-danger">Mail Fehler</span>
|
|
<p>{{$customer_mail->error }}</p>
|
|
@endif
|
|
</div>
|
|
<!-- Message attachments -->
|
|
@if($customer_mail->customer_files)
|
|
<hr class="border-light m-0">
|
|
<div class="px-4 pt-4 pb-2">
|
|
<h6 class="small font-weight-semibold mb-4">Datei-Anhänge</h6>
|
|
<div class="row">
|
|
@foreach($customer_mail->customer_files as $file)
|
|
<div class="col-sm-12 col-md-6 col-xl-4">
|
|
<div class="message-attachment ui-bordered p-2 mr-3 mb-3">
|
|
<div class="message-attachment-file display-4"><i class="{{$file->getIconExt()}}"></i></div>
|
|
<div class="media-body ml-3">
|
|
<strong class="message-attachment-filename">{{$file->original_name}}</strong>
|
|
<div class="text-muted small">{{$file->formatBytes()}}</div>
|
|
<div>
|
|
<a href="{{$file->getURL()}}" target="_blank" class="mail-att-show">Vorschau</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@endforeach
|
|
</div>
|
|
</div>
|
|
@endif
|
|
@if(isset($show_move_dirs) && $show_move_dirs)
|
|
<hr class="border-light m-0">
|
|
<div class="px-4 pt-4 pb-2">
|
|
{!! Form::open(['url' => route('customer_mail_detail', [$customer_mail->id, 'move-mail']), 'class' => 'move-mail-form']) !!}
|
|
{{ Form::hidden('collapse_shows', '') }}
|
|
<div class="form-row">
|
|
<div class="col-sm-6">
|
|
<label for="customer_mail_dir" class="form-label">Ablegen unter:</label>
|
|
<select class="custom-select customer_mail_dir" name="dir" id="customer_mail_dir">
|
|
@foreach(\App\Services\Booking::getCustomerMailDirs() as $customer_mail_dir)
|
|
<option value="{{$customer_mail_dir->pos}}" @if($customer_mail->dir == $customer_mail_dir->pos) selected @endif>{{$customer_mail_dir->name}}</option>
|
|
@endforeach
|
|
</select>
|
|
</div>
|
|
<div class="col-sm-6">
|
|
<button type="submit" class="btn btn-xs btn-default float-right mt-1"><i class="ion ion-ios-redo"></i> verschieben</button>
|
|
<label for="subdir" class="form-label"> </label>
|
|
{{-- TODO load subdirs by pos id --}}
|
|
@if($customer_mail->booking->travel_country)
|
|
@foreach(\App\Services\Booking::getCustomerMailDirs() as $customer_mail_dir)
|
|
@if($customer_mail_dir->pos > 0)
|
|
<select class="custom-select customer_mail_subdir" name="subdir" id="customer_mail_subdir_{{$customer_mail_dir->pos}}">
|
|
<option value="0">keinen Unterordner</option>
|
|
@foreach($customer_mail->booking->travel_country->getMailDirs($customer_mail_dir->pos) as $mail_dir_id)
|
|
@php ($mail_dir_name = \App\Services\Booking::getCustomerMailName($customer_mail_dir, $mail_dir_id))
|
|
<option value="{{$mail_dir_id}}" @if($customer_mail->subdir == $mail_dir_id) selected @endif>{{$mail_dir_name}}</option>
|
|
@endforeach
|
|
</select>
|
|
@endif
|
|
@endforeach
|
|
@endif
|
|
</div>
|
|
</div>
|
|
{!! Form::close() !!}
|
|
<hr>
|
|
{!! Form::open(['url' => route('customer_mail_detail', [$customer_mail->id, 'forward_email']), 'class' => 'forward-mail-form']) !!}
|
|
{{ Form::hidden('collapse_shows', '') }}
|
|
<div class="form-row">
|
|
<div class="col-sm-6">
|
|
<label for="customer_mail_forward_email" class="form-label">E-Mail weiterleiten:</label>
|
|
{{ Form::text('customer_mail_forward_email', $customer_mail->email, array('placeholder'=>'E-Mail', 'id'=>'customer_mail_forward_email', 'class'=>'form-control', 'required')) }}
|
|
</div>
|
|
<div class="col-sm-6">
|
|
<button type="submit" class="btn btn-xs btn-default float-right mt-1" onclick="return confirm('{{__('Wirklich weiterleiten? E-Mail wird erneut gesendet!')}}');"><i class="ion ion-ios-send"></i> weiterleiten</button>
|
|
</div>
|
|
</div>
|
|
{!! Form::close() !!}
|
|
</div>
|
|
@endif
|
|
</div>
|
|
|
|
|
|
@if(isset($customer_mail->customer_mail))
|
|
<hr>
|
|
@include('customer.mail.modal-show-mail-inner', ['customer_mail' => $customer_mail->customer_mail, 'show_move_dirs' => false])
|
|
@endif |