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>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
<div class="entry-info">
|
||||
<h1 class="entry-title">
|
||||
{{ $entry->title }}
|
||||
{{ $entry->title ?? $entry->complete_title }}
|
||||
@if( $entry->state === 'pending' )
|
||||
<div style="display:inline;color:var(--rhpz-orange);">
|
||||
-
|
||||
@@ -53,17 +53,7 @@
|
||||
@endif
|
||||
</h1>
|
||||
<div class="entry-authors">
|
||||
@forelse( $entry->authors as $author)
|
||||
@if($loop->first)
|
||||
By
|
||||
@endif
|
||||
{{ $author->name }}
|
||||
@if( !$loop->last )
|
||||
,
|
||||
@endif
|
||||
@empty
|
||||
No authors
|
||||
@endforelse
|
||||
By <a href="{!! databaseRoute( [ 'authors' => $entry->authors->pluck('id')->toArray() ] ) !!}">{{ $entry->authors->pluck('name')->implode(', ') }}</a>
|
||||
</div>
|
||||
<div class="entry-submission-byline">
|
||||
@if($entry->user_id)
|
||||
@@ -223,7 +213,7 @@
|
||||
@if( $entry->description )
|
||||
<x-entry-section-title label="Description" icon="file-text"/>
|
||||
<div class="entry-description">
|
||||
{{ $entry->description }}
|
||||
{!! $entry->description_html !!}
|
||||
</div>
|
||||
@endif
|
||||
@if( $entry->hashes->isNotEmpty() )
|
||||
|
||||
Reference in New Issue
Block a user