131 lines
6.9 KiB
PHP
Executable File
131 lines
6.9 KiB
PHP
Executable File
<?php $__env->startSection('title', $message->subject ?: 'Email'); ?>
|
|
<?php $__env->startSection('page_title', 'Visualizza Email'); ?>
|
|
|
|
<?php $__env->startSection('content'); ?>
|
|
<div class="row">
|
|
<div class="col-md-3">
|
|
<div class="card card-primary">
|
|
<div class="card-body p-0">
|
|
<div class="list-group list-group-flush">
|
|
<a href="<?php echo e(route('email.compose')); ?>" class="list-group-item list-group-item-action">
|
|
<i class="fas fa-plus"></i> Nuova Email
|
|
</a>
|
|
<?php $__currentLoopData = $folders; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $f): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
|
<a href="<?php echo e(route('email.index', $f->type)); ?>"
|
|
class="list-group-item list-group-item-action <?php echo e($folder === $f->type ? 'active' : ''); ?>">
|
|
<i class="fas <?php echo e($f->icon); ?>"></i> <?php echo e($f->name); ?>
|
|
|
|
</a>
|
|
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-md-9">
|
|
<div class="card card-primary card-outline">
|
|
<div class="card-header">
|
|
<h3 class="card-title"><?php echo e($message->subject ?: '(senza oggetto)'); ?></h3>
|
|
<div class="card-tools">
|
|
<?php if($message->is_starred): ?>
|
|
<button class="btn btn-xs btn-warning" onclick="toggleStar(<?php echo e($message->id); ?>)">
|
|
<i class="fas fa-star"></i>
|
|
</button>
|
|
<?php else: ?>
|
|
<button class="btn btn-xs btn-default" onclick="toggleStar(<?php echo e($message->id); ?>)">
|
|
<i class="far fa-star"></i>
|
|
</button>
|
|
<?php endif; ?>
|
|
<a href="<?php echo e(route('email.compose', ['reply_to' => $message->id])); ?>" class="btn btn-xs btn-default">
|
|
<i class="fas fa-reply"></i> Rispondi
|
|
</a>
|
|
<a href="<?php echo e(route('email.compose', ['forward' => $message->id])); ?>" class="btn btn-xs btn-default">
|
|
<i class="fas fa-forward"></i> Inoltra
|
|
</a>
|
|
<form method="POST" action="<?php echo e(route('email.destroy', $message->id)); ?>" class="d-inline">
|
|
<?php echo csrf_field(); ?> <?php echo method_field('DELETE'); ?>
|
|
<button type="submit" class="btn btn-xs btn-danger" onclick="return confirm('Sposta nel cestino?')">
|
|
<i class="fas fa-trash"></i>
|
|
</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
<div class="card-body">
|
|
<div class="mailbox-read-info">
|
|
<h6>
|
|
<strong>Da:</strong> <?php echo e($message->from_name); ?> <<?php echo e($message->from_email); ?>>
|
|
<span class="mailbox-read-time float-right">
|
|
<?php if($message->received_at): ?>
|
|
<?php echo e($message->received_at->format('d/m/Y H:i')); ?>
|
|
|
|
<?php elseif($message->sent_at): ?>
|
|
<?php echo e($message->sent_at->format('d/m/Y H:i')); ?>
|
|
|
|
<?php endif; ?>
|
|
</span>
|
|
</h6>
|
|
<h6>
|
|
<strong>A:</strong> <?php echo e($message->to_email); ?>
|
|
|
|
<?php if($message->cc): ?>
|
|
<br><strong>CC:</strong> <?php echo e($message->cc); ?>
|
|
|
|
<?php endif; ?>
|
|
</h6>
|
|
</div>
|
|
<hr>
|
|
<div class="mailbox-read-message">
|
|
<?php echo $message->body_for_display; ?>
|
|
|
|
</div>
|
|
<?php if($message->attachments->count() > 0): ?>
|
|
<hr>
|
|
<div class="mailbox-attachments">
|
|
<h4>Allegati:</h4>
|
|
<ul class="mailbox-attachments-links">
|
|
<?php $__currentLoopData = $message->attachments; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $attachment): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
|
<li>
|
|
<span class="mailbox-attachment-icon">
|
|
<i class="fas <?php echo e($attachment->icon); ?>"></i>
|
|
</span>
|
|
<div class="mailbox-attachment-info">
|
|
<a href="<?php echo e(route('email.attachment.download', $attachment->id)); ?>" class="mailbox-attachment-name">
|
|
<i class="fas fa-paperclip"></i> <?php echo e($attachment->filename); ?>
|
|
|
|
</a>
|
|
<span class="mailbox-attachment-size">
|
|
<?php echo e(number_format($attachment->size / 1024, 1)); ?> KB
|
|
</span>
|
|
<?php if(!$attachment->is_saved_to_documenti): ?>
|
|
<form method="POST" action="<?php echo e(route('email.attachment.save', [$message->id, $attachment->id])); ?>" class="d-inline">
|
|
<?php echo csrf_field(); ?>
|
|
<button type="submit" class="btn btn-xs btn-success" onclick="return confirm('Salvare allegato nei documenti?')">
|
|
<i class="fas fa-save"></i> Salva in Documenti
|
|
</button>
|
|
</form>
|
|
<?php else: ?>
|
|
<span class="badge badge-success"><i class="fas fa-check"></i> Salvato</span>
|
|
<?php endif; ?>
|
|
</div>
|
|
</li>
|
|
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
|
</ul>
|
|
</div>
|
|
<?php endif; ?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php $__env->stopSection(); ?>
|
|
|
|
<?php $__env->startSection('scripts'); ?>
|
|
<script>
|
|
function toggleStar(id) {
|
|
fetch('/email/' + id + '/star', {
|
|
method: 'POST',
|
|
headers: { 'X-CSRF-TOKEN': '<?php echo e(csrf_token()); ?>' }
|
|
}).then(() => location.reload());
|
|
}
|
|
</script>
|
|
<?php $__env->stopSection(); ?>
|
|
<?php echo $__env->make('layouts.adminlte', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /var/www/html/glastree/resources/views/email/show.blade.php ENDPATH**/ ?>
|