52 lines
2.3 KiB
PHP
52 lines
2.3 KiB
PHP
@extends('admin.layouts.app')
|
|
|
|
@section('title', 'جزئیات نظر')
|
|
|
|
@section('content')
|
|
<div class="container-fluid py-4">
|
|
<div class="d-flex justify-content-between align-items-center mb-4">
|
|
<h4 class="mb-0">جزئیات نظر #{{ $comment->id }}</h4>
|
|
<a href="{{ route('admin.comments.index') }}" class="btn btn-outline-secondary btn-sm">بازگشت</a>
|
|
</div>
|
|
|
|
<div class="card shadow-sm">
|
|
<div class="card-body">
|
|
<dl class="row mb-0">
|
|
<dt class="col-sm-3">کاربر</dt>
|
|
<dd class="col-sm-9">
|
|
{{ $comment->user?->name ?? 'کاربر حذفشده' }}
|
|
<span class="text-muted small">({{ $comment->user?->email ?? '—' }})</span>
|
|
</dd>
|
|
|
|
<dt class="col-sm-3">مرتبط با</dt>
|
|
<dd class="col-sm-9">
|
|
{{ class_basename($comment->commentable_type) }}
|
|
<span class="text-muted small">(شناسه: {{ $comment->commentable_id }})</span>
|
|
</dd>
|
|
|
|
<dt class="col-sm-3">وضعیت</dt>
|
|
<dd class="col-sm-9">@include('admin.comments.status', ['status' => $comment->status])</dd>
|
|
|
|
<dt class="col-sm-3">تاریخ ثبت</dt>
|
|
<dd class="col-sm-9">{{ $comment->created_at->format('Y/m/d H:i') }}</dd>
|
|
|
|
<dt class="col-sm-3">متن نظر</dt>
|
|
<dd class="col-sm-9">
|
|
<div class="p-3 bg-light rounded" style="white-space: pre-wrap;">{{ $comment->body }}</div>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<div class="card-footer bg-white">
|
|
<a href="{{ route('admin.comments.edit', $comment) }}" class="btn btn-primary btn-sm">ویرایش</a>
|
|
<form action="{{ route('admin.comments.destroy', $comment) }}" method="POST" class="d-inline"
|
|
onsubmit="return confirm('نظر حذف شود؟')">
|
|
@csrf
|
|
@method('DELETE')
|
|
<button type="submit" class="btn btn-danger btn-sm">حذف</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@endsection
|
|
|