Club System
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
<?php /** @var \App\Models\EntryGallery $galleryItem */ ?>
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('page-title', $entry->title . " - " . config('app.name') )
|
||||
@@ -19,6 +20,37 @@
|
||||
<div class="entry-info">
|
||||
<h1 class="entry-title">
|
||||
{{ $entry->title }}
|
||||
@if( $entry->state === 'pending' )
|
||||
<div style="display:inline;color:var(--rhpz-orange);">
|
||||
-
|
||||
<i data-lucide="clock" size="24"></i>
|
||||
Pending approval
|
||||
</div>
|
||||
@elseif( $entry->state === 'rejected' )
|
||||
<div style="display:inline;color:var(--error);">
|
||||
-
|
||||
<i data-lucide="x-circle" size="24"></i>
|
||||
Rejected
|
||||
</div>
|
||||
@elseif( $entry->state === 'locked' )
|
||||
<div style="display:inline;color:var(--error);">
|
||||
-
|
||||
<i data-lucide="lock" size="24"></i>
|
||||
Locked
|
||||
</div>
|
||||
@elseif( $entry->state === 'draft' )
|
||||
<div style="display:inline;color:var(--rhpz-orange);">
|
||||
-
|
||||
<i data-lucide="scissors" size="24"></i>
|
||||
Draft
|
||||
</div>
|
||||
@elseif( $entry->state === 'hidden' )
|
||||
<div style="display:inline;color:var(--rhpz-orange);">
|
||||
-
|
||||
<i data-lucide="hide" size="24"></i>
|
||||
Hidden
|
||||
</div>
|
||||
@endif
|
||||
</h1>
|
||||
<div class="entry-authors">
|
||||
@forelse( $entry->authors as $author)
|
||||
@@ -29,6 +61,26 @@
|
||||
No authors
|
||||
@endforelse
|
||||
</div>
|
||||
<div class="entry-submission-byline">
|
||||
@if($entry->user_id)
|
||||
<span>
|
||||
<i data-lucide="user" size="14"></i>
|
||||
Posted by <x-xf-username-link :user-id="$entry->user_id" />
|
||||
</span>
|
||||
@endif
|
||||
|
||||
<span>
|
||||
<i data-lucide="calendar" size="14"></i>
|
||||
{{ $entry->created_at->format('M d, Y') }}
|
||||
</span>
|
||||
|
||||
@if($entry->updated_at && $entry->updated_at->gt($entry->created_at))
|
||||
<span>
|
||||
<i data-lucide="file-edit" size="14"></i>
|
||||
Updated {{ $entry->updated_at->diffForHumans() }}
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
<div class="entry-meta-grid">
|
||||
@if( $entry->game )
|
||||
<x-entry-meta-item label="Game Name" value="{{ $entry->game->name }}" />
|
||||
@@ -55,18 +107,78 @@
|
||||
<x-entry-meta-item label="Type of hack" value="{{ $entry->modifications->pluck('name')->implode(', ') }}" route="none" />
|
||||
@endif
|
||||
</div>
|
||||
<div class="hack-actions">
|
||||
<div class="hack-actions" style="display:flex;gap:10px;">
|
||||
@if($entry->state === 'pending')
|
||||
@can('approve', $entry)
|
||||
<div x-data="{ rejectOpen: false }">
|
||||
<form action="{{ route('queue.approve', $entry) }}" method="POST" style="display:inline">
|
||||
@csrf
|
||||
@method('PATCH')
|
||||
<button type="submit" class="btn success" onclick="return confirm('Approve this entry?')">
|
||||
<i data-lucide="check-circle" size="14"></i>
|
||||
Approve
|
||||
</button>
|
||||
</form>
|
||||
<button type="button" class="btn danger" style="margin-right:15px;" @click="rejectOpen = !rejectOpen">
|
||||
<i data-lucide="x-circle" size="14"></i>
|
||||
Reject
|
||||
</button>
|
||||
<div
|
||||
class="modal-overlay"
|
||||
x-cloak
|
||||
x-show="rejectOpen"
|
||||
x-transition.opacity
|
||||
@click.self="rejectOpen = false"
|
||||
@keydown.escape.window="rejectOpen = false"
|
||||
@modal:opened.window="refreshIcons($el)"
|
||||
>
|
||||
<div class="modal-window" x-show="rejectOpen" x-transition>
|
||||
<div class="modal-header">
|
||||
<span class="modal-title">Reject entry</span>
|
||||
<button type="button" class="modal-close" @click="rejectOpen = false">
|
||||
<i data-lucide="x" size="20"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<form action="{{ route('queue.reject', $entry) }}" method="POST">
|
||||
@csrf
|
||||
@method('PATCH')
|
||||
<div class="form-group">
|
||||
<x-form-field-title name="Rejection reason" required="true" />
|
||||
<textarea
|
||||
class="form-input"
|
||||
name="reason"
|
||||
rows="4"
|
||||
placeholder="Explain why this entry is being rejected..."
|
||||
required
|
||||
></textarea>
|
||||
</div>
|
||||
<div class="queue-mod-actions">
|
||||
<button type="button" class="btn" @click="rejectOpen = false">
|
||||
Cancel
|
||||
</button>
|
||||
<button type="submit" class="btn danger">
|
||||
<i data-lucide="x-circle" size="14"></i>
|
||||
Confirm rejection
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endcan
|
||||
@endif
|
||||
<button class="btn primary" onclick="Livewire.dispatch('entryOpenFilesModal', { entryId: {{ $entry->id }} })">
|
||||
<i data-lucide="download"></i> Download
|
||||
</button>
|
||||
@can('update',$entry)
|
||||
<a href="{{ route('submit.edit', ['section' => $entry->type, 'entry' => $entry ] ) }}" class="btn primary">
|
||||
<a href="{{ route('submit.edit', ['section' => $entry->type, 'entry' => $entry ] ) }}" class="btn">
|
||||
<i data-lucide="edit"></i> Edit
|
||||
</a>
|
||||
@endcan
|
||||
<button class="btn">
|
||||
<i data-lucide="message-square"></i> Comments
|
||||
</button>
|
||||
@auth
|
||||
<a href="{{ xfRoute("romhackplaza_entry/{$entry->id}/report") }}" class="btn">
|
||||
<i data-lucide="flag"></i> Report / Claim Ownership
|
||||
@@ -95,11 +207,55 @@
|
||||
</div>
|
||||
@endif
|
||||
@if( $entry->staff_credits )
|
||||
<h2 class="entry-section-title">
|
||||
<i data-lucide="users-round"></i> Staff credits
|
||||
</h2>
|
||||
<x-entry-section-title label="Staff Credits" icon="users-round" />
|
||||
<div class="entry-description">
|
||||
{{ $entry->staff_credits }}
|
||||
<ul>
|
||||
@foreach( $entry->parseStaffCredits() as $item )
|
||||
<li>{{ $item['name'] }}: {{ $item['description'] }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
@if( $entry->gallery->isNotEmpty() )
|
||||
<div x-data="{ open: false, currentImage: ''}" x-cloak>
|
||||
<x-entry-section-title label="Gallery" icon="images" />
|
||||
<div class="entry-gallery">
|
||||
@foreach( $entry->gallery as $galleryItem )
|
||||
<div class="entry-gallery-item" @click="currentImage = '{{ Storage::url($galleryItem->image) }}'; open = true; "><img src="{{ Storage::url($galleryItem->image) }}"></div>
|
||||
@endforeach
|
||||
</div>
|
||||
<div class="gallery-modal" x-show="open" x-transition.opacity.duration.300ms @click="open = false" @keydown.escape.window="open = false">
|
||||
<span class="gallery-modal-close" @click="open = false;"><i data-lucide="x"></i></span>
|
||||
<div class="gallery-modal-content" @click.stop>
|
||||
<img :src="currentImage">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@if( $entry->relevant_link )
|
||||
<x-entry-section-title label="Relevant Link" icon="link" />
|
||||
<div class="entry-description">
|
||||
<a href="{{ $entry->relevant_link }}" target="_blank">{{ $entry->relevant_link }}</a>
|
||||
</div>
|
||||
@endif
|
||||
@if( $entry->getYoutubeVideoId() )
|
||||
<div x-data="{open: false, src: ''}" x-cloak class="youtube-section">
|
||||
|
||||
<x-entry-section-title label="Youtube Video" icon="play" />
|
||||
|
||||
<div class="video-thumbnail-wrapper" @click="src = 'https://www.youtube.com/embed/{{ $entry->getYoutubeVideoId() }}?autoplay=1'; open = true">
|
||||
<img src="https://img.youtube.com/vi/{{ $entry->youtube_id }}/maxresdefault.jpg">
|
||||
<div class="play-trigger">
|
||||
<i data-lucide="play"></i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="gallery-modal" x-show="open" x-transition.opacity.duration.300ms @click="open = false; src = ''" @keydown.escape.window="open = false; src = ''">
|
||||
<span class="gallery-modal-close" @click="open = false; src = '';"><i data-lucide="x"></i></span>
|
||||
<div class="gallery-modal-video" @click.stop>
|
||||
<iframe :src="src" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user