chore: finalize project updates
This commit is contained in:
@@ -1,3 +1,139 @@
|
||||
<div>
|
||||
<!-- An unexamined life is not worth living. - Socrates -->
|
||||
</div>
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('title', 'نظرات من')
|
||||
|
||||
@section('content')
|
||||
|
||||
{{-- =====================
|
||||
سربرگ صفحه (Page Header)
|
||||
===================== --}}
|
||||
<div class="account-page-header mb-4 d-flex justify-content-between align-items-center flex-wrap gap-3">
|
||||
<div>
|
||||
<h4 class="mb-1 fw-bold">
|
||||
<i class="fa fa-comments text-primary me-1"></i>
|
||||
نظرات من
|
||||
</h4>
|
||||
<p class="text-muted small mb-0">
|
||||
دیدگاههایی که برای تورها و پروازها ثبت کردهاید
|
||||
</p>
|
||||
</div>
|
||||
<div>
|
||||
<a href="{{ route('tours.index') }}" class="btn btn-sm btn-outline-primary">
|
||||
<i class="fa fa-suitcase me-1"></i>
|
||||
مشاهده تورها
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- نمایش پیام موفقیت --}}
|
||||
@if (session('success'))
|
||||
<div class="alert alert-success alert-dismissible fade show" role="alert">
|
||||
{{ session('success') }}
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="بستن"></button>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{{-- =====================
|
||||
لیست نظرات
|
||||
===================== --}}
|
||||
@forelse ($comments as $comment)
|
||||
|
||||
<div class="card shadow-sm app-comment-card mb-3 border-0 rounded-4">
|
||||
|
||||
<div class="card-body">
|
||||
|
||||
{{-- بالای کارت: عنوان تور/پرواز + وضعیت --}}
|
||||
<div class="d-flex justify-content-between align-items-start flex-wrap gap-2 mb-2">
|
||||
|
||||
<div class="d-flex align-items-center gap-2">
|
||||
|
||||
{{-- آیکون تور یا پرواز بر اساس نوع محتوا --}}
|
||||
@if ($comment->commentable instanceof \App\Models\Tour)
|
||||
<span class="app-icon-circle bg-primary-subtle text-primary">
|
||||
<i class="fa fa-suitcase"></i>
|
||||
</span>
|
||||
@else
|
||||
<span class="app-icon-circle bg-info-subtle text-info">
|
||||
<i class="fa fa-plane"></i>
|
||||
</span>
|
||||
@endif
|
||||
|
||||
<div>
|
||||
<h6 class="mb-0 fw-bold">
|
||||
{{ $comment->commentable?->title ?? 'مورد حذفشده' }}
|
||||
</h6>
|
||||
<small class="text-muted">
|
||||
{{ class_basename($comment->commentable_type) }}
|
||||
</small>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{{-- وضعیت نظر --}}
|
||||
@include('admin.comments.status', ['status' => $comment->status])
|
||||
|
||||
</div>
|
||||
|
||||
{{-- متن نظر --}}
|
||||
<p class="card-text text-muted mb-0">
|
||||
{{ $comment->body }}
|
||||
</p>
|
||||
|
||||
{{-- تاریخ ثبت --}}
|
||||
<div class="d-flex justify-content-between align-items-center mt-3 pt-3 border-top small text-muted">
|
||||
<span>
|
||||
<i class="fa fa-calendar me-1"></i>
|
||||
{{ $comment->created_at->format('Y/m/d H:i') }}
|
||||
</span>
|
||||
|
||||
{{-- دکمه حذف نظر --}}
|
||||
@if (Route::has('account.comments.destroy'))
|
||||
<form action="{{ route('account.comments.destroy', $comment) }}" method="POST"
|
||||
onsubmit="return confirm('نظر شما حذف شود؟')">
|
||||
@csrf
|
||||
@method('DELETE')
|
||||
<button type="submit" class="btn btn-link btn-sm text-danger p-0">
|
||||
<i class="fa fa-trash me-1"></i>
|
||||
حذف
|
||||
</button>
|
||||
</form>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@empty
|
||||
|
||||
<div class="card border-0 shadow-sm rounded-4">
|
||||
<div class="card-body text-center py-5">
|
||||
|
||||
<div class="app-empty-icon mx-auto mb-3">
|
||||
<i class="fa fa-comment-slash"></i>
|
||||
</div>
|
||||
|
||||
<h5 class="fw-bold mb-1">هنوز نظری ثبت نکردهاید</h5>
|
||||
<p class="text-muted mb-3">
|
||||
بعد از خرید یا رزرو تور و پرواز، میتوانید نظر خود را ثبت کنید.
|
||||
</p>
|
||||
|
||||
<a href="{{ route('tours.index') }}" class="btn btn-primary">
|
||||
<i class="fa fa-suitcase me-1"></i>
|
||||
مشاهده تورها
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endforelse
|
||||
|
||||
|
||||
{{-- =====================
|
||||
صفحهبندی
|
||||
===================== --}}
|
||||
<div class="mt-4">
|
||||
{{ $comments->links() }}
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
Reference in New Issue
Block a user