@extends('layouts.app') @section('title', $document->title . ' — ' . $systemName) @push('styles') @if($isAdmin) @endif @endpush @section('content') @php $backUrl = $document->category ? route($routePrefix . '.category', $document->category) : route($routePrefix . '.index'); $updateUrl = route($routePrefix . '.update', $document); $logs = $logs ?? collect(); @endphp
{{-- ══════════════════════════════════════════════ ROW 1 — Title bar ══════════════════════════════════════════════ --}}
{{-- Mac traffic lights --}}
{{-- Back --}} {{-- File icon --}} {{-- Title + star + breadcrumb --}}
@if($isAdmin) @else
{{ $document->title }}
@endif
{{ $systemName }} @if($document->category) @if($document->category->parent) {{ $document->category->parent->name }} @endif {{ $document->category->name }} @endif
{{-- Right actions --}}
@if($isAdmin) @endif
{{-- ══════════════════════════════════════════════ ROW 2 — Menu bar ══════════════════════════════════════════════ --}}
{{-- 檔案 --}} @if($isAdmin) {{-- 編輯 --}} @endif {{-- 查看 --}} @if($isAdmin) {{-- 插入 --}} {{-- 格式 --}} @endif
{{-- ── Find & Replace bar (admin only) ── --}} @if($isAdmin)
取代:
{{-- ── Summernote toolbar row ── --}}
@endif {{-- ── Horizontal ruler ── --}}
{{-- ══════════════════════════════════════════════ Content row: V-ruler + body panels ══════════════════════════════════════════════ --}}
{{-- Vertical ruler --}}
{{-- Body (TOC + editor + history) --}}
{{-- TOC panel --}}
文件大綱
尚無標題
{{-- Editor column --}}
{{-- TOC toggle tab --}} {{-- Editor area --}}
@if($isAdmin) @else
{!! $document->content !!}
@endif
{{-- History panel --}}
版本歷史
@forelse($logs as $log)
{{ ($log->action ?? '') === 'created' ? '建立' : '更新' }}
{{ $log->user?->name ?? auth()->user()->name }}
{{ $log->created_at->format('Y-m-d H:i') }}
@empty
尚無歷史紀錄
@endforelse
{{-- /docChrome --}} {{-- Fullscreen exit button --}} @endsection @push('scripts') @if($isAdmin) @else @endif @endpush