2026-06-23 19:24:38 +02:00
|
|
|
<?php /** @var \App\Models\EntryReview $review */ ?>
|
2026-06-16 16:21:43 +02:00
|
|
|
@php if( !isset($entry) && isset($news) ){ $entry = $news; $newsMode = true; } else { $newsMode = false; } @endphp
|
|
|
|
|
<div class="{{ !$newsMode ? 'grid-c2' : '' }}" style="margin-top:1%;">
|
|
|
|
|
@if( !$newsMode )
|
2026-06-23 19:24:38 +02:00
|
|
|
<div id="reviews-section" x-data="{reviewModalOpen: false}">
|
2026-06-16 16:21:43 +02:00
|
|
|
<div class="entry-content">
|
|
|
|
|
<x-entry-section-title label="Reviews" icon="star" />
|
2026-06-23 19:24:38 +02:00
|
|
|
|
|
|
|
|
<div class="review-header-right">
|
|
|
|
|
@if($entry->reviews_count_cached > 0)
|
|
|
|
|
<div class="review-avg-badge">
|
|
|
|
|
<i data-lucide="star" size="13"></i>
|
|
|
|
|
{{ $entry->average_rating }}
|
|
|
|
|
<span class="review-avg-count">({{ $entry->reviews_count_cached }})</span>
|
|
|
|
|
</div>
|
|
|
|
|
@endif
|
|
|
|
|
|
|
|
|
|
@auth
|
|
|
|
|
<button @click="reviewModalOpen = true" class="btn primary">
|
|
|
|
|
<i data-lucide="pen-line" size="13"></i> Write a review
|
|
|
|
|
</button>
|
|
|
|
|
@endauth
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
@forelse( $reviews as $review )
|
|
|
|
|
<x-review-card :review="$review" />
|
|
|
|
|
@empty
|
|
|
|
|
<span style="text-align:center" class="whisper">Be the first to post a review</span>
|
|
|
|
|
@endforelse
|
|
|
|
|
<a href="{!! reviewsRoute( ['entryId' => $entry->id ]) !!}" class="modcp-list-see-all">
|
|
|
|
|
See all {{ $entry->reviews_count_cached }} reviews
|
|
|
|
|
</a>
|
|
|
|
|
@include('reviews.submit')
|
2026-06-16 16:21:43 +02:00
|
|
|
</div>
|
2026-05-27 21:24:38 +02:00
|
|
|
</div>
|
2026-06-16 16:21:43 +02:00
|
|
|
@endif
|
2026-05-27 21:24:38 +02:00
|
|
|
<div id="comments-section">
|
|
|
|
|
<div class="entry-content">
|
|
|
|
|
<x-entry-section-title label="Last comments" icon="message-circle" />
|
|
|
|
|
@forelse( $comments as $comment )
|
2026-06-23 19:24:38 +02:00
|
|
|
@if(( $comment['user_id'] === config('xenforo.bot_user_id') || $comment['username'] === 'Romhack Plaza' ) && $comment['position'] == 0)
|
2026-05-27 21:24:38 +02:00
|
|
|
@continue
|
|
|
|
|
@else
|
|
|
|
|
<div class="comment-block">
|
2026-06-28 14:07:20 +02:00
|
|
|
<div class="comment-avatar">
|
2026-05-27 21:24:38 +02:00
|
|
|
<x-xen-foro-avatar :user="$comment['user_id']" />
|
2026-06-28 14:07:20 +02:00
|
|
|
</div>
|
2026-05-27 21:24:38 +02:00
|
|
|
|
|
|
|
|
<div class="comment-content">
|
|
|
|
|
<div class="comment-meta">
|
2026-06-23 19:24:38 +02:00
|
|
|
<span class="comment-author">{{ $comment['User']['username'] ?? $comment['username'] ?? 'Guest' }}</span>
|
2026-05-27 21:24:38 +02:00
|
|
|
<span class="comment-separator"></span>
|
|
|
|
|
<span class="comment-date">{{ date('Y-m-d', $comment['post_date']) }}</span>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="comment-body">
|
2026-07-01 11:51:30 +02:00
|
|
|
{!! \App\Helpers\EntryHelpers::stripBbCode($comment['message']) !!}
|
2026-05-27 21:24:38 +02:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
@endif
|
|
|
|
|
@empty
|
|
|
|
|
<span class="whisper">Be the first to post a comment</span>
|
|
|
|
|
@endforelse
|
|
|
|
|
<a href="{{ xfRoute("threads/{$entry->comments_thread_id}/latest") }}" class="btn primary" style="margin-top: 1%;">
|
|
|
|
|
<i data-lucide="pen"></i> Post a comment
|
|
|
|
|
</a>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|