624 lines
32 KiB
PHP
624 lines
32 KiB
PHP
<?php
|
||
|
||
use App\Models\PressRelease;
|
||
use App\Services\PressRelease\BlacklistViolationException;
|
||
use App\Services\PressRelease\PressReleaseCoverImage;
|
||
use App\Services\PressRelease\PressReleaseService;
|
||
use Flux\Flux;
|
||
use Livewire\Attributes\Layout;
|
||
use Livewire\Attributes\Locked;
|
||
use Livewire\Attributes\Title;
|
||
use Livewire\Volt\Component;
|
||
|
||
new #[Layout('components.layouts.app'), Title('Pressemitteilung')] class extends Component
|
||
{
|
||
#[Locked]
|
||
public int $id;
|
||
|
||
public string $rejectReason = '';
|
||
|
||
public function mount(int $id): void
|
||
{
|
||
$this->id = $id;
|
||
}
|
||
|
||
public function publish(): void
|
||
{
|
||
$pr = PressRelease::withoutGlobalScopes()->findOrFail($this->id);
|
||
|
||
try {
|
||
app(PressReleaseService::class)->publish($pr);
|
||
} catch (BlacklistViolationException $e) {
|
||
Flux::toast(
|
||
heading: __('Automatisch abgelehnt'),
|
||
text: __('Unzulässiges Wort gefunden: ":word".', ['word' => $e->word]),
|
||
variant: 'danger',
|
||
duration: 8000,
|
||
);
|
||
Flux::modal('confirm-show-publish')->close();
|
||
|
||
return;
|
||
}
|
||
|
||
Flux::toast(text: __('Pressemitteilung veröffentlicht. Autor wurde benachrichtigt.'), variant: 'success');
|
||
Flux::modal('confirm-show-publish')->close();
|
||
}
|
||
|
||
public function reject(): void
|
||
{
|
||
$this->validate([
|
||
'rejectReason' => ['required', 'string', 'min:5', 'max:2000'],
|
||
]);
|
||
|
||
$pr = PressRelease::withoutGlobalScopes()->findOrFail($this->id);
|
||
app(PressReleaseService::class)->reject($pr, trim($this->rejectReason));
|
||
|
||
$this->rejectReason = '';
|
||
|
||
Flux::toast(text: __('Pressemitteilung abgelehnt. Autor wurde benachrichtigt.'), variant: 'warning');
|
||
Flux::modal('confirm-show-reject')->close();
|
||
}
|
||
|
||
public function archive(): void
|
||
{
|
||
$pr = PressRelease::withoutGlobalScopes()->findOrFail($this->id);
|
||
app(PressReleaseService::class)->archive($pr);
|
||
Flux::toast(text: __('Archiviert.'), variant: 'success');
|
||
Flux::modal('confirm-show-archive')->close();
|
||
}
|
||
|
||
public function with(): array
|
||
{
|
||
$pr = PressRelease::withoutGlobalScopes()
|
||
->with([
|
||
'company:id,name,email,phone,slug',
|
||
'category.translations',
|
||
'user:id,name,email',
|
||
'images',
|
||
'attachments',
|
||
'contacts' => fn ($query) => $query
|
||
->withoutGlobalScopes()
|
||
->orderBy('last_name')
|
||
->orderBy('first_name')
|
||
->select(['contacts.id', 'contacts.company_id', 'contacts.first_name', 'contacts.last_name', 'contacts.responsibility', 'contacts.email', 'contacts.phone']),
|
||
'statusLogs.changedBy:id,name',
|
||
'kiAudits',
|
||
])
|
||
->findOrFail($this->id);
|
||
|
||
$latestClassification = $pr->kiAudits
|
||
->firstWhere('type', \App\Models\KiAudit::TYPE_CLASSIFICATION);
|
||
|
||
$latestRejection = null;
|
||
if ($pr->status->value === 'rejected') {
|
||
$latestRejection = $pr->statusLogs
|
||
->firstWhere(fn ($log) => $log->to_status?->value === 'rejected');
|
||
}
|
||
|
||
$cover = app(PressReleaseCoverImage::class);
|
||
|
||
return [
|
||
'pr' => $pr,
|
||
'statusLogs' => $pr->statusLogs,
|
||
'contacts' => $pr->contacts,
|
||
'latestClassification' => $latestClassification,
|
||
'latestRejection' => $latestRejection,
|
||
'coverUrl' => $cover->coverUrl($pr, 'cover'),
|
||
'coverIsPlaceholder' => $cover->coverIsPlaceholder($pr),
|
||
'categoryName' => $pr->category?->translations->firstWhere('locale', 'de')?->name
|
||
?? $pr->category?->translations->first()?->name
|
||
?? '–',
|
||
'statusColor' => match ($pr->status->value) {
|
||
'published' => 'green',
|
||
'review' => 'yellow',
|
||
'rejected' => 'red',
|
||
'archived' => 'blue',
|
||
default => 'zinc',
|
||
},
|
||
];
|
||
}
|
||
}; ?>
|
||
|
||
<div class="space-y-8">
|
||
@php
|
||
$statusClass = match ($pr->status->value) {
|
||
'published' => 'ok',
|
||
'review' => 'warn',
|
||
'rejected' => 'err',
|
||
default => 'hub',
|
||
};
|
||
@endphp
|
||
|
||
{{-- Flash-Banner ersetzt durch <flux:toast /> im Layout. --}}
|
||
|
||
{{-- ============== PAGE HEADER ============== --}}
|
||
<header class="page-header">
|
||
<div class="min-w-0">
|
||
<div class="flex items-center gap-3 mb-3 flex-wrap">
|
||
<span class="badge hub dot">{{ __('Admin Backend') }}</span>
|
||
<span class="eyebrow muted">{{ __('Content · Pressemitteilung') }}</span>
|
||
<span @class(['badge', $statusClass])>{{ $pr->status->label() }}</span>
|
||
@if ($pr->classification)
|
||
@php
|
||
$kiBadgeClass = match ($pr->classification) {
|
||
\App\Enums\PressReleaseClassification::Green => 'ok',
|
||
\App\Enums\PressReleaseClassification::Yellow => 'warn',
|
||
\App\Enums\PressReleaseClassification::Red => 'err',
|
||
};
|
||
@endphp
|
||
<span @class(['badge', $kiBadgeClass])>{{ __('KI: :label', ['label' => $pr->classification->label()]) }}</span>
|
||
@endif
|
||
@if (! is_null($pr->content_score) && $pr->content_tier)
|
||
@php
|
||
$tierBadge = match ($pr->content_tier) {
|
||
\App\Enums\PressReleaseContentTier::Hochwertig => 'ok',
|
||
\App\Enums\PressReleaseContentTier::Geprueft => 'hub',
|
||
\App\Enums\PressReleaseContentTier::Standard => 'muted',
|
||
};
|
||
@endphp
|
||
<span @class(['badge', $tierBadge])>{{ __('Score :score · :tier', ['score' => $pr->content_score, 'tier' => $pr->content_tier->label()]) }}</span>
|
||
@endif
|
||
<span class="badge hub">{{ strtoupper($pr->language) }}</span>
|
||
<span class="badge hub">{{ $pr->portal->label() }}</span>
|
||
</div>
|
||
<h1 class="text-[30px] font-bold tracking-[-0.6px] leading-[1.15] m-0 text-[color:var(--color-ink)]">
|
||
{{ $pr->title }}
|
||
</h1>
|
||
@if ($pr->subtitle)
|
||
<p class="text-[18px] font-medium tracking-[-0.2px] leading-[1.35] mt-2 m-0 max-w-[720px] text-[color:var(--color-ink-2)]">
|
||
{{ $pr->subtitle }}
|
||
</p>
|
||
@endif
|
||
<p class="text-[13px] leading-[1.55] mt-2 m-0 max-w-[720px] text-[color:var(--color-ink-2)]">
|
||
<strong class="font-semibold text-[color:var(--color-ink)]">{{ __('Firma') }}:</strong>
|
||
{{ $pr->company?->name ?? '–' }}
|
||
<span class="text-[color:var(--color-bg-rule)] mx-1">·</span>
|
||
<strong class="font-semibold text-[color:var(--color-ink)]">{{ __('Kategorie') }}:</strong>
|
||
{{ $categoryName }}
|
||
<span class="text-[color:var(--color-bg-rule)] mx-1">·</span>
|
||
<strong class="font-semibold text-[color:var(--color-ink)]">{{ __('Autor') }}:</strong>
|
||
{{ $pr->user?->name ?? '–' }}
|
||
</p>
|
||
</div>
|
||
|
||
<div class="flex items-center gap-2 flex-shrink-0">
|
||
<flux:button variant="filled" icon="pencil" href="{{ route('admin.press-releases.edit', $pr->id) }}" wire:navigate>
|
||
{{ __('Bearbeiten') }}
|
||
</flux:button>
|
||
<flux:button variant="filled" icon="arrow-left" href="{{ route('admin.press-releases.index') }}" wire:navigate>
|
||
{{ __('Zurück') }}
|
||
</flux:button>
|
||
</div>
|
||
</header>
|
||
|
||
{{-- ============== TITELBILD (Hero) ============== --}}
|
||
{{-- Harte Obergrenze 1280x580 px: Container deckelt Breite und Seitenverhältnis,
|
||
damit das Bild auf großen Screens nicht über die Detailgröße hinauswächst. --}}
|
||
<article class="panel overflow-hidden mx-auto w-full max-w-[1280px]">
|
||
<div class="relative aspect-[1280/580] w-full">
|
||
<img src="{{ $coverUrl }}" alt="{{ $pr->title }}"
|
||
class="absolute inset-0 h-full w-full object-cover" loading="lazy" />
|
||
</div>
|
||
@if ($coverIsPlaceholder)
|
||
<div class="flex items-center gap-2 border-t border-[color:var(--color-bg-rule)] px-5 py-2.5 text-[12px] text-[color:var(--color-ink-3)]">
|
||
<flux:icon.photo variant="micro" class="size-3.5" />
|
||
<span>{{ __('Platzhalter-Titelbild (kein eigenes Bild hochgeladen).') }}</span>
|
||
</div>
|
||
@endif
|
||
</article>
|
||
|
||
{{-- ============== REJECTION-HINWEIS ============== --}}
|
||
@if ($pr->status === \App\Enums\PressReleaseStatus::Rejected && $latestRejection)
|
||
<article class="panel" style="border-color:var(--color-err); border-left-width:3px;">
|
||
<div class="panel-head">
|
||
<span class="section-eyebrow">{{ __('Diese Pressemitteilung wurde abgelehnt') }}</span>
|
||
<span class="badge err dot">{{ __('Handlung erforderlich') }}</span>
|
||
</div>
|
||
<div class="p-5 flex items-start gap-3">
|
||
<div class="w-9 h-9 rounded-[5px] flex items-center justify-center flex-shrink-0
|
||
bg-[color:var(--color-err-soft)] border border-[color:var(--color-err)]/30 text-[color:var(--color-loss)]">
|
||
<flux:icon.exclamation-triangle class="size-[18px]" />
|
||
</div>
|
||
<div class="flex-1 text-[13px] text-[color:var(--color-ink-2)]">
|
||
@if ($latestRejection->reason)
|
||
<strong class="text-[color:var(--color-ink)] font-semibold">{{ __('Begründung') }}:</strong>
|
||
<span class="block mt-1 whitespace-pre-line">{{ $latestRejection->reason }}</span>
|
||
@else
|
||
{{ __('Der Autor sollte den Inhalt überarbeiten und erneut einreichen.') }}
|
||
@endif
|
||
<span class="mt-2 block text-[11.5px] text-[color:var(--color-ink-3)]">
|
||
{{ __('Abgelehnt am') }} {{ $latestRejection->created_at->format('d.m.Y H:i') }}
|
||
@if ($latestRejection->changedBy)
|
||
· {{ __('durch :name', ['name' => $latestRejection->changedBy->name]) }}
|
||
@endif
|
||
</span>
|
||
</div>
|
||
</div>
|
||
</article>
|
||
@endif
|
||
|
||
{{-- ============== STATUS-WORKFLOW ============== --}}
|
||
@if ($pr->status === \App\Enums\PressReleaseStatus::Review)
|
||
<article class="panel" style="border-color:var(--color-warn); border-left-width:3px;">
|
||
<div class="panel-head">
|
||
<span class="section-eyebrow">{{ __('Status-Workflow') }}</span>
|
||
<span class="badge warn dot">{{ __('Wartet auf Prüfung') }}</span>
|
||
</div>
|
||
<div class="p-5 flex flex-wrap items-start gap-3">
|
||
<div class="w-9 h-9 rounded-[5px] flex items-center justify-center flex-shrink-0
|
||
bg-[color:var(--color-warn-soft)] border border-[color:var(--color-warn)]/30 text-[color:var(--color-accent-deep)]">
|
||
<flux:icon.clock class="size-[18px]" />
|
||
</div>
|
||
<div class="flex-1 min-w-[220px] text-[13px] text-[color:var(--color-ink-2)]">
|
||
<p class="m-0">{{ __('Diese PM wartet auf eine redaktionelle Entscheidung.') }}</p>
|
||
@if ($latestClassification && $latestClassification->reason)
|
||
<p class="m-0 mt-1 text-[12px] text-[color:var(--color-ink-3)]">
|
||
<strong class="text-[color:var(--color-ink-2)]">{{ __('KI-Hinweis') }}:</strong>
|
||
{{ $latestClassification->reason }}
|
||
</p>
|
||
@endif
|
||
@if ($pr->scheduled_at)
|
||
<p class="m-0 mt-1 text-[12px] text-[color:var(--color-ink-3)]">
|
||
<flux:icon.calendar variant="micro" class="inline-block size-3.5 -mt-0.5 mr-0.5" />
|
||
{{ __('Geplante Veröffentlichung: :date', ['date' => $pr->scheduledAtLocal()->format('d.m.Y H:i')]) }}
|
||
</p>
|
||
@endif
|
||
</div>
|
||
<div class="flex items-center gap-2 flex-shrink-0">
|
||
<flux:modal.trigger name="confirm-show-publish">
|
||
<flux:button type="button" variant="primary">{{ __('Veröffentlichen') }}</flux:button>
|
||
</flux:modal.trigger>
|
||
<flux:modal.trigger name="confirm-show-reject">
|
||
<flux:button type="button" variant="danger">{{ __('Ablehnen') }}</flux:button>
|
||
</flux:modal.trigger>
|
||
</div>
|
||
</div>
|
||
</article>
|
||
@endif
|
||
|
||
@if ($pr->status === \App\Enums\PressReleaseStatus::Published)
|
||
<article class="panel" style="border-color:var(--color-ok); border-left-width:3px;">
|
||
<div class="panel-head">
|
||
<span class="section-eyebrow">{{ __('Status-Workflow') }}</span>
|
||
<span class="badge ok dot">{{ __('Live') }}</span>
|
||
</div>
|
||
<div class="p-5 flex flex-wrap items-start gap-3">
|
||
<div class="w-9 h-9 rounded-[5px] flex items-center justify-center flex-shrink-0
|
||
bg-[color:var(--color-ok-soft)] border border-[color:var(--color-ok)]/30 text-[color:var(--color-gain-deep)]">
|
||
<flux:icon.check-circle class="size-[18px]" />
|
||
</div>
|
||
<div class="flex-1 min-w-[220px] text-[13px] text-[color:var(--color-ink-2)]">
|
||
<p class="m-0">
|
||
{{ __('Veröffentlicht am') }}
|
||
<strong class="text-[color:var(--color-ink)] font-semibold">{{ $pr->published_at?->format('d.m.Y H:i') ?? '–' }}</strong>
|
||
</p>
|
||
@if ($pr->embargo_at && $pr->embargo_at->isFuture())
|
||
<p class="m-0 mt-1 text-[12px] text-[color:var(--color-ink-3)]">
|
||
<flux:icon.lock-closed variant="micro" class="inline-block size-3.5 -mt-0.5 mr-0.5" />
|
||
{{ __('Sperrfrist bis: :date', ['date' => $pr->embargoAtLocal()->format('d.m.Y H:i')]) }}
|
||
</p>
|
||
@endif
|
||
@if ($pr->hits > 0)
|
||
<p class="m-0 mt-1 text-[12px] text-[color:var(--color-ink-3)]">
|
||
<strong class="text-[color:var(--color-ink)] font-semibold">{{ number_format($pr->hits, 0, ',', '.') }}</strong>
|
||
{{ __('Aufrufe seit Veröffentlichung') }}
|
||
</p>
|
||
@endif
|
||
</div>
|
||
<flux:modal.trigger name="confirm-show-archive">
|
||
<flux:button type="button" variant="filled">{{ __('Archivieren') }}</flux:button>
|
||
</flux:modal.trigger>
|
||
</div>
|
||
</article>
|
||
@endif
|
||
|
||
{{-- ============== KONTAKTE + STATUS/VERLAUF ============== --}}
|
||
<div class="grid gap-6 xl:grid-cols-2">
|
||
<article class="panel">
|
||
<div class="panel-head">
|
||
<span class="section-eyebrow">{{ __('Zugeordnete Pressekontakte') }}</span>
|
||
@if ($pr->company)
|
||
<flux:button size="sm" variant="filled" icon="building-office" href="{{ route('admin.companies.show', $pr->company->id) }}" wire:navigate>
|
||
{{ __('Firma') }}
|
||
</flux:button>
|
||
@endif
|
||
</div>
|
||
<div class="p-5">
|
||
<p class="text-[12px] text-[color:var(--color-ink-3)] mt-0 mb-4">
|
||
{{ __('Kontakte, die dieser Pressemitteilung zugeordnet sind.') }}
|
||
</p>
|
||
<div class="space-y-2">
|
||
@forelse ($contacts as $contact)
|
||
<div class="rounded-[5px] border border-[color:var(--color-bg-rule)] bg-[color:var(--color-bg-elev)] p-3">
|
||
<div class="text-[13px] font-semibold text-[color:var(--color-ink)]">
|
||
{{ trim(($contact->first_name ?? '').' '.($contact->last_name ?? '')) ?: __('Kontakt ohne Name') }}
|
||
</div>
|
||
<div class="text-[12px] text-[color:var(--color-ink-3)]">
|
||
{{ $contact->responsibility ?: __('Keine Rolle hinterlegt') }}
|
||
</div>
|
||
<div class="mt-1 flex flex-wrap gap-x-3 gap-y-1 text-[11.5px] text-[color:var(--color-ink-3)]">
|
||
@if ($contact->email)
|
||
<a href="mailto:{{ $contact->email }}"
|
||
class="text-[color:var(--color-hub)] underline underline-offset-2 decoration-[color:var(--color-hub)]/40 hover:decoration-[color:var(--color-hub)]">
|
||
{{ $contact->email }}
|
||
</a>
|
||
@endif
|
||
@if ($contact->phone)
|
||
<span>{{ $contact->phone }}</span>
|
||
@endif
|
||
</div>
|
||
</div>
|
||
@empty
|
||
<div class="rounded-[5px] border border-dashed border-[color:var(--color-bg-rule)] p-4 text-[12.5px] text-[color:var(--color-ink-3)]">
|
||
{{ __('Dieser Pressemitteilung ist kein Pressekontakt zugeordnet.') }}
|
||
</div>
|
||
@endforelse
|
||
</div>
|
||
</div>
|
||
</article>
|
||
|
||
<article class="panel">
|
||
<div class="panel-head">
|
||
<span class="section-eyebrow">{{ __('Status & Verlauf') }}</span>
|
||
<span @class(['badge', $statusClass])>{{ $pr->status->label() }}</span>
|
||
</div>
|
||
<div class="p-5">
|
||
<div class="grid gap-2 sm:grid-cols-2">
|
||
<div class="rounded-[5px] border border-[color:var(--color-bg-rule)] bg-[color:var(--color-bg-elev)] p-3">
|
||
<div class="text-[11px] uppercase tracking-[0.6px] text-[color:var(--color-ink-3)] font-semibold">{{ __('Autor') }}</div>
|
||
<div class="text-[13px] font-semibold text-[color:var(--color-ink)] mt-1 truncate">
|
||
{{ $pr->user?->name ?? '–' }}
|
||
</div>
|
||
</div>
|
||
<div class="rounded-[5px] border border-[color:var(--color-bg-rule)] bg-[color:var(--color-bg-elev)] p-3">
|
||
<div class="text-[11px] uppercase tracking-[0.6px] text-[color:var(--color-ink-3)] font-semibold">{{ __('Erstellt') }}</div>
|
||
<div class="text-[13px] font-semibold text-[color:var(--color-ink)] mt-1">
|
||
{{ $pr->created_at?->format('d.m.Y H:i') ?? '–' }}
|
||
</div>
|
||
</div>
|
||
<div class="rounded-[5px] border border-[color:var(--color-bg-rule)] bg-[color:var(--color-bg-elev)] p-3">
|
||
<div class="text-[11px] uppercase tracking-[0.6px] text-[color:var(--color-ink-3)] font-semibold">{{ __('Veröffentlicht') }}</div>
|
||
<div class="text-[13px] font-semibold text-[color:var(--color-ink)] mt-1">
|
||
{{ $pr->published_at?->format('d.m.Y H:i') ?? '–' }}
|
||
</div>
|
||
</div>
|
||
<div class="rounded-[5px] border border-[color:var(--color-bg-rule)] bg-[color:var(--color-bg-elev)] p-3">
|
||
<div class="text-[11px] uppercase tracking-[0.6px] text-[color:var(--color-ink-3)] font-semibold">{{ __('Aufrufe') }}</div>
|
||
<div class="text-[13px] font-semibold text-[color:var(--color-ink)] mt-1">
|
||
{{ number_format($pr->hits, 0, ',', '.') }}
|
||
</div>
|
||
</div>
|
||
@if ($pr->scheduled_at)
|
||
<div class="rounded-[5px] border border-[color:var(--color-bg-rule)] bg-[color:var(--color-bg-elev)] p-3">
|
||
<div class="text-[11px] uppercase tracking-[0.6px] text-[color:var(--color-ink-3)] font-semibold">{{ __('Geplant') }}</div>
|
||
<div class="text-[13px] font-semibold text-[color:var(--color-ink)] mt-1">
|
||
{{ $pr->scheduledAtLocal()->format('d.m.Y H:i') }}
|
||
</div>
|
||
</div>
|
||
@endif
|
||
@if ($pr->embargo_at)
|
||
<div class="rounded-[5px] border border-[color:var(--color-bg-rule)] bg-[color:var(--color-bg-elev)] p-3">
|
||
<div class="text-[11px] uppercase tracking-[0.6px] text-[color:var(--color-ink-3)] font-semibold">{{ __('Sperrfrist bis') }}</div>
|
||
<div class="text-[13px] font-semibold text-[color:var(--color-ink)] mt-1">
|
||
{{ $pr->embargoAtLocal()->format('d.m.Y H:i') }}
|
||
</div>
|
||
</div>
|
||
@endif
|
||
</div>
|
||
|
||
@if ($pr->no_export)
|
||
<div class="mt-3 flex items-center gap-2 text-[12px] text-[color:var(--color-ink-3)]">
|
||
<flux:icon.no-symbol variant="micro" class="size-3.5" />
|
||
<span>{{ __('Kein Export aktiv (PM wird nicht über Feeds verteilt).') }}</span>
|
||
</div>
|
||
@endif
|
||
|
||
<div class="my-4 border-t border-[color:var(--color-bg-rule)]"></div>
|
||
|
||
@if ($statusLogs->isNotEmpty())
|
||
<ol class="space-y-3 border-s border-[color:var(--color-bg-rule)] ps-4">
|
||
@foreach ($statusLogs as $log)
|
||
<li class="text-[12.5px]">
|
||
<div class="flex flex-wrap items-center gap-2">
|
||
@php
|
||
$logClass = match ($log->to_status?->value) {
|
||
'published' => 'ok',
|
||
'review' => 'warn',
|
||
'rejected' => 'err',
|
||
default => 'hub',
|
||
};
|
||
@endphp
|
||
<span @class(['badge', $logClass])>{{ $log->to_status?->label() ?? $log->to_status }}</span>
|
||
@if ($log->from_status)
|
||
<span class="text-[11.5px] text-[color:var(--color-ink-3)]">
|
||
{{ __('von') }} {{ $log->from_status->label() }}
|
||
</span>
|
||
@endif
|
||
<span class="text-[11.5px] text-[color:var(--color-ink-3)]">·</span>
|
||
<span class="text-[11.5px] text-[color:var(--color-ink-3)]">
|
||
{{ $log->created_at->format('d.m.Y H:i') }}
|
||
</span>
|
||
@if ($log->changedBy)
|
||
<span class="text-[11.5px] text-[color:var(--color-ink-3)]">·</span>
|
||
<span class="text-[11.5px] text-[color:var(--color-ink-3)]">{{ $log->changedBy->name }}</span>
|
||
@endif
|
||
@if ($log->source && $log->source !== 'admin')
|
||
<span class="badge hub">{{ $log->source }}</span>
|
||
@endif
|
||
</div>
|
||
@if ($log->reason)
|
||
<p class="mt-1.5 text-[color:var(--color-ink-2)] m-0 whitespace-pre-line">{{ $log->reason }}</p>
|
||
@endif
|
||
</li>
|
||
@endforeach
|
||
</ol>
|
||
@else
|
||
<p class="text-[12.5px] text-[color:var(--color-ink-3)] m-0">
|
||
{{ __('Noch keine Statusänderungen protokolliert.') }}
|
||
</p>
|
||
@endif
|
||
</div>
|
||
</article>
|
||
</div>
|
||
|
||
{{-- ============== INHALT ============== --}}
|
||
<article class="panel">
|
||
<div class="panel-head">
|
||
<span class="section-eyebrow">{{ __('Inhalt') }}</span>
|
||
</div>
|
||
<div class="p-5">
|
||
<div class="prose prose-zinc dark:prose-invert max-w-none text-[color:var(--color-ink)]">
|
||
{!! $pr->renderedText() !!}
|
||
</div>
|
||
|
||
@if ($pr->keywords || $pr->backlink_url)
|
||
<div class="mt-6 space-y-2 border-t border-[color:var(--color-bg-rule)] pt-4 text-[12.5px] text-[color:var(--color-ink-2)]">
|
||
@if ($pr->keywords)
|
||
<p class="m-0">
|
||
<strong class="text-[color:var(--color-ink)] font-semibold">{{ __('Stichwörter') }}:</strong>
|
||
{{ $pr->keywords }}
|
||
</p>
|
||
@endif
|
||
@if ($pr->backlink_url)
|
||
<p class="m-0">
|
||
<strong class="text-[color:var(--color-ink)] font-semibold">{{ __('Backlink') }}:</strong>
|
||
<a href="{{ $pr->backlink_url }}" target="_blank"
|
||
class="text-[color:var(--color-hub)] underline underline-offset-2 decoration-[color:var(--color-hub)]/40 hover:decoration-[color:var(--color-hub)]">
|
||
{{ $pr->backlink_url }}
|
||
</a>
|
||
</p>
|
||
@endif
|
||
</div>
|
||
@endif
|
||
</div>
|
||
</article>
|
||
|
||
{{-- ============== BOILERPLATE-OVERRIDE ============== --}}
|
||
@if ($pr->boilerplate_override)
|
||
<article class="panel">
|
||
<div class="panel-head">
|
||
<span class="section-eyebrow">{{ __('Eigener Abbinder (Boilerplate)') }}</span>
|
||
<span class="badge hub">{{ __('Override') }}</span>
|
||
</div>
|
||
<div class="p-5">
|
||
<p class="text-[12px] text-[color:var(--color-ink-3)] mt-0 mb-3">
|
||
{{ __('Dieser Text wird für diese Pressemitteilung anstelle des Standard-Abbinders der Firma verwendet.') }}
|
||
</p>
|
||
<div class="rounded-[5px] border border-[color:var(--color-bg-rule)] bg-[color:var(--color-bg-elev)] p-4 text-[13px] leading-[1.6] text-[color:var(--color-ink-2)] whitespace-pre-line">
|
||
{{ $pr->boilerplate_override }}
|
||
</div>
|
||
</div>
|
||
</article>
|
||
@endif
|
||
|
||
{{-- ============== MEDIEN ============== --}}
|
||
@if ($pr->images->isNotEmpty())
|
||
<article class="panel">
|
||
<div class="panel-head">
|
||
<span class="section-eyebrow">{{ __('Bilder') }}</span>
|
||
<span class="text-[11.5px] text-[color:var(--color-ink-3)]">
|
||
{{ $pr->images->count() }}
|
||
</span>
|
||
</div>
|
||
<div class="p-5 space-y-2">
|
||
@foreach ($pr->images as $image)
|
||
<div class="flex items-center gap-2 text-[12.5px]">
|
||
<flux:icon.photo class="size-4 flex-shrink-0 text-[color:var(--color-ink-3)]" />
|
||
<span class="truncate text-[color:var(--color-ink-2)]">{{ basename($image->path) }}</span>
|
||
@if ($image->is_preview)
|
||
<span class="badge hub">{{ __('Preview') }}</span>
|
||
@endif
|
||
</div>
|
||
@endforeach
|
||
</div>
|
||
</article>
|
||
@endif
|
||
|
||
{{-- ANHÄNGE-ANZEIGE — TEMPORÄR DEAKTIVIERT
|
||
Datei-Uploads erfordern eine vollständige Sicherheitsprüfung.
|
||
Wird mit dem Anhang-Manager in einer späteren Phase wieder aktiviert.
|
||
@if ($pr->attachments->isNotEmpty())
|
||
<article class="panel">
|
||
<div class="panel-head">
|
||
<span class="section-eyebrow">{{ __('Anhänge') }}</span>
|
||
<span class="text-[11.5px] text-[color:var(--color-ink-3)]">
|
||
{{ $pr->attachments->count() }}
|
||
</span>
|
||
</div>
|
||
<div class="p-5 space-y-2">
|
||
@foreach ($pr->attachments as $attachment)
|
||
<div class="flex items-center gap-2 text-[12.5px]">
|
||
<flux:icon.paper-clip class="size-4 flex-shrink-0 text-[color:var(--color-ink-3)]" />
|
||
<span class="truncate text-[color:var(--color-ink-2)] flex-1">
|
||
{{ $attachment->title ?: $attachment->original_name }}
|
||
</span>
|
||
<span class="text-[11px] text-[color:var(--color-ink-3)] flex-shrink-0">
|
||
{{ number_format($attachment->size / 1024, 0, ',', '.') }} KB
|
||
</span>
|
||
</div>
|
||
@endforeach
|
||
</div>
|
||
</article>
|
||
@endif
|
||
--}}
|
||
|
||
@if($pr->status === \App\Enums\PressReleaseStatus::Review)
|
||
<flux:modal name="confirm-show-publish" class="max-w-lg">
|
||
<div class="space-y-6">
|
||
<div>
|
||
<flux:heading size="lg">{{ __('Pressemitteilung veröffentlichen?') }}</flux:heading>
|
||
<flux:subheading>{{ __('Die Pressemitteilung wird öffentlich sichtbar und der Autor wird benachrichtigt.') }}</flux:subheading>
|
||
</div>
|
||
<div class="flex justify-end space-x-2 rtl:space-x-reverse">
|
||
<flux:modal.close>
|
||
<flux:button variant="filled">{{ __('Abbrechen') }}</flux:button>
|
||
</flux:modal.close>
|
||
<flux:button variant="primary" wire:click="publish">{{ __('Veröffentlichen') }}</flux:button>
|
||
</div>
|
||
</div>
|
||
</flux:modal>
|
||
|
||
<flux:modal name="confirm-show-reject" class="max-w-lg">
|
||
<div class="space-y-6">
|
||
<div>
|
||
<flux:heading size="lg">{{ __('Pressemitteilung ablehnen?') }}</flux:heading>
|
||
<flux:subheading>{{ __('Die Pressemitteilung wird abgelehnt und der Autor wird benachrichtigt. Bitte begründen Sie die Ablehnung.') }}</flux:subheading>
|
||
</div>
|
||
|
||
<flux:field>
|
||
<flux:label>{{ __('Begründung (an den Autor sichtbar)') }}</flux:label>
|
||
<flux:textarea
|
||
wire:model="rejectReason"
|
||
rows="5"
|
||
placeholder="{{ __('z. B. Werbliche Sprache, fehlende Belege, doppelte Veröffentlichung…') }}"
|
||
/>
|
||
<flux:error name="rejectReason" />
|
||
</flux:field>
|
||
|
||
<div class="flex justify-end space-x-2 rtl:space-x-reverse">
|
||
<flux:modal.close>
|
||
<flux:button variant="filled">{{ __('Abbrechen') }}</flux:button>
|
||
</flux:modal.close>
|
||
<flux:button variant="danger" wire:click="reject">{{ __('Ablehnen') }}</flux:button>
|
||
</div>
|
||
</div>
|
||
</flux:modal>
|
||
@endif
|
||
|
||
@if($pr->status === \App\Enums\PressReleaseStatus::Published)
|
||
<flux:modal name="confirm-show-archive" class="max-w-lg">
|
||
<div class="space-y-6">
|
||
<div>
|
||
<flux:heading size="lg">{{ __('Pressemitteilung archivieren?') }}</flux:heading>
|
||
<flux:subheading>{{ __('Die Pressemitteilung bleibt intern erhalten, wird aber archiviert.') }}</flux:subheading>
|
||
</div>
|
||
<div class="flex justify-end space-x-2 rtl:space-x-reverse">
|
||
<flux:modal.close>
|
||
<flux:button variant="filled">{{ __('Abbrechen') }}</flux:button>
|
||
</flux:modal.close>
|
||
<flux:button variant="primary" wire:click="archive">{{ __('Archivieren') }}</flux:button>
|
||
</div>
|
||
</div>
|
||
</flux:modal>
|
||
@endif
|
||
</div>
|