HEX
Server: LiteSpeed
System: Linux sv4.hami.host 5.14.0-611.54.3.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 7 16:31:24 EDT 2026 x86_64
User: armgroup (1008)
PHP: 8.2.32
Disabled: show_source, system, shell_exec, passthru, exec, popen, proc_open, mail, socket_create, socket_create_listen, socket_create_pair, link, dl, openlog, syslog, stream_socket_server, curl_multi_init
Upload Files
File: //home/armgroup/libs/resources/views/admin/comments/show.blade.php
@extends('admin.layouts.app')
@section('title', 'پنل مدیریت | مشاهده نظر')
@section('content')
    <div class="content-wrapper">
        <div class="content-header">
            <div class="container-fluid">
                <div class="row mb-2">
                    <div class="col-sm-6">
                        <h1 class="m-0 text-dark">مشاهده نظر</h1>
                    </div>
                    <div class="col-sm-6">
                        <ol class="breadcrumb float-sm-left">
                            {{ Breadcrumbs::render('comment-show', $comment) }}
                        </ol>
                    </div>
                </div>
            </div>
        </div>
        <section class="content">
            <div class="container-fluid bg-white py-3">
                <div class="post">
                    <div class="user-block">
                        <img class="img-circle img-bordered-sm" src="{{ $comment->avatar }}" alt="user avatar">
                        <span class="username">
                          <a href="#">{{ $comment->name }}</a>
                        </span>
                        <span class="description">ارسال شده در {{ to_persian_numbers(jdate($comment->created_at)->format('Y/m/d ساعت H:i:s')) }}
                            <span class="badge badge-{{ \App\Models\Comment::STATUS_COLOR[$comment->status] }}">
                                {{ __(\App\Models\Comment::STATUS_TRANSLATE[$comment->status]) }}
                            </span>
                        </span>
                    </div>
                    @if($comment->parent_id)
                        <div class="alert alert-info alert-dismissible fade show w-75 mx-auto" role="alert">
                            در جواب نظر {{ $comment->parent?->name }} نوشته شده است.
                            <a href="#" class="alert-link" data-toggle="modal" data-target="#parentModal">
                                مشاهده
                            </a>
                            <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                                <span aria-hidden="true">&times;</span>
                            </button>
                        </div>
                    @endif
                    <div class="text-justify px-5 py-3">
                        <p class="text-justify px-5">{{ $comment->comment }}</p>
                        <div class="container">
                            <div class="row">
                                @if(isset($comment->positive_points[0]))
                                    <div class="col-lg-6 col-12 mb-lg-0 mb-3">
                                        <ul class="list-group">
                                            <li class="list-group-item text-center text-success text-bold">نقاط قوت</li>
                                            @foreach($comment->positive_points as $positivePoint)
                                                <li class="list-group-item"><span
                                                        class="fa fa-arrow-up text-success"></span> {{ $positivePoint }}
                                                </li>
                                            @endforeach
                                        </ul>
                                    </div>
                                @endif
                                @if(isset($comment->negative_points[0]))
                                    <div class="col-lg-6 col-12">
                                        <ul class="list-group">
                                            <li class="list-group-item text-center text-danger text-bold">نقاط ضعف</li>
                                            @foreach($comment->negative_points as $negativePoint)
                                                <li class="list-group-item"><span
                                                        class="fa fa-arrow-down text-danger"></span> {{ $negativePoint }}
                                                </li>
                                            @endforeach
                                        </ul>
                                    </div>
                                @endif
                            </div>
                        </div>
                    </div>
                    @if($comment->email)
                        <p>
                            <a href="mailto:{{ $comment->email }}" class="link-black text-sm">
                                <i class="fa fa-envelope mr-1"></i> {{ $comment->email }}
                            </a>
                        </p>
                    @endif
                    <div class="text-left">
                        {{--                        @unless($comment->parent_id)--}}
                        {{--                            <button type="button" class="btn btn-warning btn-sm" data-toggle="modal" data-target="#replyModal">--}}
                        {{--                                <span class="fa fa-reply"></span>--}}
                        {{--                                پاسخ--}}
                        {{--                            </button>--}}
                        {{--                        @endunless--}}
                        <a href="{{ optional($comment->commentable)->url }}"
                           class="btn btn-default btn-sm"
                           target="_blank">
                            <span class="fa fa-eye"></span> مشاهده {{ $comment->getCommentType()['show-name'] }}
                        </a>
                        <form action="{{ route('admin.comments.update', $comment) }}" method="POST" class="d-inline">
                            @csrf
                            @method('PATCH')
                            @if($comment->status != \App\Models\Comment::STATUS_APPROVED)
                                <button type="submit" name="status" value="{{ \App\Models\Comment::STATUS_APPROVED }}"
                                        class="btn btn-sm btn-success">
                                    <span class="fa fa-check"></span> تایید کردن
                                </button>
                            @endif
                            @if($comment->status != \App\Models\Comment::STATUS_NOT_APPROVED)
                                <button type="submit" name="status"
                                        value="{{ \App\Models\Comment::STATUS_NOT_APPROVED }}"
                                        class="btn btn-sm btn-danger">
                                    <span class="fa fa-remove"></span> رد کردن
                                </button>
                            @endif
                        </form>
                        <form action="{{ route('admin.comments.destroy', $comment) }}" method="POST" class="d-inline">
                            @csrf
                            @method('DELETE')
                            <button type="submit" class="btn btn-sm btn-danger"
                                    onclick="return confirm('آیا از حذف این نظر اطمینان دارید؟');">
                                <span class="fa fa-trash"></span> حذف نظر
                            </button>
                        </form>
                    </div>
                </div>
            </div>
        </section>
        @if($comment->parent_id)
            <div class="modal fade" id="parentModal" style="z-index: 999999999" tabindex="-1" role="dialog"
                 aria-labelledby="parentModalLabel" aria-hidden="true">
                <div class="modal-dialog modal-lg" role="document">
                    <div class="modal-content">
                        <div class="modal-header">
                            <h5 class="modal-title" id="parentModalLabel">{{ $comment->parent?->name }}</h5>
                        </div>
                        <div class="modal-body text-justify">
                            {{ $comment->parent?->comment }}
                        </div>
                        <div class="modal-footer">
                            <a href="{{ route('admin.comments.show', $comment->parent_id) }}" class="btn btn-info ml-2">مشاهده
                                جزئیات</a>
                            <button type="button" class="btn btn-secondary" data-dismiss="modal">بستن</button>
                        </div>
                    </div>
                </div>
            </div>
        @endif
        @unless($comment->parent_id)
            <div class="modal fade" id="replyModal" style="z-index: 999999999" tabindex="-1" role="dialog"
                 aria-labelledby="replyModalLabel" aria-hidden="true">
                <div class="modal-dialog modal-lg" role="document">
                    <div class="modal-content">
                        <div class="modal-header d-block">
                            <h5 class="modal-title" id="replyModalLabel">
                                پاسخ به نظر {{ $comment->name }}
                                <button type="button" class="close float-left" data-dismiss="modal" aria-label="Close">
                                    <span aria-hidden="true">&times;</span>
                                </button>
                            </h5>
                        </div>
                        <form method="POST" action="{{ route('admin.comments.reply', $comment->id) }}">
                            @csrf
                            <div class="modal-body text-justify">
                                @if(is_null(auth()->user()->name))
                                    <div class="form-group">
                                        <label for="name" class="col-form-label">نام *</label>
                                        <input name="name" class="form-control" required id="name"
                                               placeholder="این نام در اطلاعات کاربری شما نیز ذخیره می‌شود"
                                               value="{{ old('name') }}">
                                    </div>
                                @endif
                                <div class="form-group">
                                    <label for="reply" class="col-form-label">متن پاسخ *</label>
                                    <textarea name="reply" class="form-control" required id="reply"
                                              rows="6">{{ old('reply') }}</textarea>
                                </div>
                            </div>
                            <div class="modal-footer">
                                <button type="submit" class="btn btn-success">ذخیره</button>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        @endunless
    </div>
@endsection