Files
Atomcms-edit/resources/themes/atom/views/community/staff-applications.blade.php
T
root f29ba72591 Fix security, performance, and code quality issues across CMS
Security:
- Replace unescaped {!! !!} with Purify::clean() in 15+ Blade templates (XSS)
- Add rate limiting to register (3/hr), upload (10/min), SSE (6/min)
- Add max:5000 validation on article comments
- Remove duplicate exception handler callback

Hardcoded paths:
- Replace ~44 /var/www/ hardcoded paths with env() configs
- CatalogService (13), AutoDetectService (18), Commandocentrum (11), AppServiceProvider (2)

Performance:
- Add 10 missing database indexes (radio_song_requests, help_center_tickets, etc.)
- Replace Cache::flush() with targeted Cache::forget() in RadioSettings
- Cache getCachedCategories() in TicketController (N+1 fix)
- Remove redundant top-3 leaderboard query

Bug fixes:
- Fix undefined $enabled variable → $isOnline in radio index view
- Add getAvatarAttribute() accessor for non-existent avatar column
- Fix User::guilds() from wrong HasMany to HasManyThrough

Code quality:
- Replace file_get_contents with Http::timeout(10) in TraxService
- Remove commented Echo/Pusher boilerplate in bootstrap.js
- Remove TODO/FIXME comments from logo-generator templates
- Replace hardcoded Turnstile CDN URL with config()
- Restore QUEUE_CONNECTION=redis in .env.example files
2026-06-29 18:28:19 +02:00

89 lines
4.8 KiB
PHP
Executable File

<x-app-layout>
@push('title', __('Staff'))
<div class="col-span-12 lg:col-span-9 lg:w-[96%]">
<div class="grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-2">
@forelse($positions as $position)
@continue(!$position->permission)
<div class="rounded-lg overflow-hidden" style="background-color: var(--color-surface); border: 1px solid color-mix(in srgb, var(--color-text-muted) 15%, transparent);">
<div class="flex gap-x-2.5 p-3.5" style="border-bottom: 1px solid color-mix(in srgb, var(--color-primary) 30%, transparent);">
<div class="w-12 h-12 min-w-[3rem] rounded-full flex items-center justify-center" style="background-color: {{ $position->permission->staff_color }}">
<img src="{{ asset(sprintf('%s/%s.gif', setting('badges_path'), $position->permission->badge)) }}" alt="">
</div>
<div class="flex flex-col justify-center text-sm">
<p class="font-semibold" style="color: var(--color-text)">{{ $position->permission->rank_name }}</p>
<p style="color: var(--color-text-muted)">{{ $position->permission->job_description }}</p>
</div>
</div>
<div class="p-3" style="color: var(--color-text)">
<div class="text-center">
<div class="mb-4 text-sm">
{{ \Stevebauman\Purify\Facades\Purify::clean($position->description) }}
</div>
<div class="mb-4 text-sm font-semibold">
{{ __('Application Deadline :date', [
'date' => $position->apply_to ? $position->apply_to->format('F j, Y, g:i A') : __('No deadline set')
]) }}
</div>
</div>
<div class="flex justify-between">
@if (auth()->check() && auth()->user()->hasAppliedForPosition($position->permission->id))
<button type="button" class="rounded-lg px-4 py-2 text-sm font-semibold transition-all duration-200 hover:opacity-90" style="background-color: #dc2626; color: white;">
{{ __('You have already applied for :position', ['position' => $position->permission->rank_name]) }}
</button>
@else
<a href="{{ route('staff-applications.show', $position) }}" class="w-full">
<button type="button" class="rounded-lg px-4 py-2 text-sm font-semibold transition-all duration-200 hover:opacity-90" style="background-color: var(--color-background); color: var(--color-text); border: 1px solid color-mix(in srgb, var(--color-text-muted) 15%, transparent);">
{{ __('Apply for :position', ['position' => $position->permission->rank_name]) }}
</button>
</a>
@endif
</div>
</div>
</div>
@empty
<div class="rounded-lg overflow-hidden col-span-full" style="background-color: var(--color-surface); border: 1px solid color-mix(in srgb, var(--color-text-muted) 15%, transparent);">
<div class="relative w-full" style="background: linear-gradient(140deg, var(--color-primary) 0%, color-mix(in srgb, var(--color-primary) 80%, black) 100%);">
<div class="flex items-center h-full px-4 py-3 gap-3">
<div class="w-8 h-8 rounded-full flex items-center justify-center text-lg shadow-lg" style="background-color: color-mix(in srgb, var(--color-primary) 30%, transparent);">
🏮
</div>
<div>
<p class="text-white font-bold text-sm">{{ __('No positions open') }}</p>
<p class="text-xs" style="color: rgba(255,255,255,0.8)">{{ __('There is currently no positions open') }}</p>
</div>
</div>
</div>
<div class="p-4 text-sm space-y-4" style="color: var(--color-text)">
<p>
{{ __('Please come back at a later time to check if we have any positions open by then! Thank you for your interest.', ['hotel' => setting('hotel_name')]) }}
</p>
</div>
</div>
@endforelse
</div>
</div>
<div class="col-span-12 lg:col-span-3 lg:w-[110%] space-y-4 lg:-ml-[32px]">
<div class="rounded-lg overflow-hidden" style="background-color: var(--color-surface); border: 1px solid color-mix(in srgb, var(--color-text-muted) 15%, transparent);">
<div class="relative w-full" style="background: linear-gradient(140deg, var(--color-primary) 0%, color-mix(in srgb, var(--color-primary) 80%, black) 100%);">
<div class="flex items-center h-full px-4 py-3 gap-3">
<div class="w-8 h-8 rounded-full flex items-center justify-center text-lg shadow-lg" style="background-color: color-mix(in srgb, var(--color-primary) 30%, transparent);">
💬
</div>
<div>
<p class="text-white font-bold text-sm">{{ __('Apply for :hotel staff', ['hotel' => setting('hotel_name')]) }}</p>
<p class="text-xs" style="color: rgba(255,255,255,0.8)">{{ __('Select position to get started', ['hotel' => setting('hotel_name')]) }}</p>
</div>
</div>
</div>
<div class="p-4 text-sm space-y-4" style="color: var(--color-text)">
<p>
{{ __('Here at :hotel we open up for staff applications every now and then. Sometimes you will find this page empty other times it might be filled with positions, if you ever come across a position you feel you would fit perfectly into, then do not hesitate to apply for it.', ['hotel' => setting('hotel_name')]) }}
</p>
</div>
</div>
</div>
</x-app-layout>