Migration complete
This commit is contained in:
@@ -1,9 +1,36 @@
|
||||
<?php /** @var \App\Models\EntryReview $review */ ?>
|
||||
@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 )
|
||||
<div id="reviews-section">
|
||||
<div id="reviews-section" x-data="{reviewModalOpen: false}">
|
||||
<div class="entry-content">
|
||||
<x-entry-section-title label="Reviews" icon="star" />
|
||||
|
||||
<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')
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@@ -11,7 +38,7 @@
|
||||
<div class="entry-content">
|
||||
<x-entry-section-title label="Last comments" icon="message-circle" />
|
||||
@forelse( $comments as $comment )
|
||||
@if($comment['user_id'] === config('xenforo.bot_user_id') && $comment['position'] == 0)
|
||||
@if(( $comment['user_id'] === config('xenforo.bot_user_id') || $comment['username'] === 'Romhack Plaza' ) && $comment['position'] == 0)
|
||||
@continue
|
||||
@else
|
||||
<div class="comment-block">
|
||||
@@ -19,7 +46,7 @@
|
||||
|
||||
<div class="comment-content">
|
||||
<div class="comment-meta">
|
||||
<span class="comment-author">{{ $comment['User']['username'] }}</span>
|
||||
<span class="comment-author">{{ $comment['User']['username'] ?? $comment['username'] ?? 'Guest' }}</span>
|
||||
<span class="comment-separator"></span>
|
||||
<span class="comment-date">{{ date('Y-m-d', $comment['post_date']) }}</span>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user