@extends('layouts.dashboard') @section('content') @php /** * Contact-form enquiries: read, answer, remove. * * @var array $messages enquiry rows for this page * @var int $unread unanswered-or-unopened count across the whole list * @var array $pager pagination metadata * @var array $replied ids that already have an answer on record * @var bool $canSend whether outbound mail is configured */ $replied = $replied ?? []; $canSend = $canSend ?? false; @endphp @php /* .qm-d2: the dashboard density standard (app.css ยง35) */ @endphp
{{ t_raw('admin.messages.mail_off_hint') }} {{ t_raw('admin.messages.mail_off_link') }}
@endif @if ($messages)| {{ t_raw('admin.messages.col_from') }} | {{ t_raw('admin.messages.col_subject') }} | {{ t_raw('admin.messages.col_received') }} | {{ t_raw('common.actions') }} |
|---|---|---|---|
|
{!! brandmark_html(null, (string) ($m['name'] ?? t_raw('admin.messages.fallback_sender_name')), 'md', 'qm-brandmark--round') !!}
{{ $m['name'] }}
@if (!empty($m['email'])){{ $m['email'] }}@endif
|
@if (!empty($m['subject'])) {{ $m['subject'] }} @endif
{{ $m['message'] }}
@if ($hasReply){{ t_raw('admin.messages.badge_answered') }}@endif
|
{!! fmt_datetime($m['created_at']) !!} | @partial('row-actions', ['actions' => [ [ 'label' => t_raw('admin.messages.action_reply'), 'icon' => 'fa-reply', 'primary' => true, 'disabled' => !$canSend || empty($m['email']), 'attrs' => [ 'data-bs-toggle' => 'modal', 'data-bs-target' => '#messageReplyModal', 'data-reply-open' => '1', 'data-id' => (string) $mid, 'data-name' => (string) ($m['name'] ?? ''), 'data-email' => (string) ($m['email'] ?? ''), 'data-subject' => (string) ($m['subject'] ?? ''), 'data-message' => (string) $m['message'], ], ], (int) $m['is_read'] === 0 ? [ 'label' => t_raw('admin.messages.action_mark_read'), 'icon' => 'fa-envelope-open', 'form' => ['action' => '/admin/messages/read', 'fields' => ['id' => $mid]], ] : null, [ 'label' => t_raw('common.delete'), 'icon' => 'fa-trash-alt', 'danger' => true, 'form' => ['action' => '/admin/messages/delete', 'fields' => ['id' => $mid], 'confirm' => t_raw('admin.messages.confirm_delete')], ], ]]) |
{{ t_raw('admin.messages.empty') }}