46 lines
2.6 KiB
PHP
46 lines
2.6 KiB
PHP
@extends('layouts.app')
|
|
|
|
@section('content')
|
|
<div class="max-w-4xl mx-auto space-y-6">
|
|
<div class="flex items-center justify-between gap-4">
|
|
<div class="flex items-center gap-4">
|
|
<a href="{{ route('documents.index') }}" class="p-2 text-gray-500 hover:text-gray-900 hover:bg-gray-100 rounded-lg transition-colors">
|
|
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 19l-7-7m0 0l7-7m-7 7h18"/></svg>
|
|
</a>
|
|
<h1 class="text-2xl font-bold text-gray-900">{{ $document->title }}</h1>
|
|
</div>
|
|
<div class="flex items-center gap-2">
|
|
<a href="{{ route('documents.download', $document) }}" class="px-4 py-2 text-sm font-medium text-teal-700 bg-teal-50 border border-teal-200 rounded-lg hover:bg-teal-100 transition-colors">{{ __('document.download') }}</a>
|
|
<a href="{{ route('documents.edit', $document) }}" class="px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-50 transition-colors">{{ __('common.edit') }}</a>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="bg-white rounded-xl border border-gray-200 p-6">
|
|
<div class="grid grid-cols-1 md:grid-cols-2 gap-5">
|
|
<div>
|
|
<p class="text-xs font-medium text-gray-500 mb-1">{{ __('document.title') }}</p>
|
|
<p class="text-sm text-gray-900">{{ $document->title }}</p>
|
|
</div>
|
|
<div>
|
|
<p class="text-xs font-medium text-gray-500 mb-1">{{ __('document.file_type') }}</p>
|
|
<span class="inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium bg-gray-50 text-gray-700">{{ __('document.type_' . $document->file_type) }}</span>
|
|
</div>
|
|
<div>
|
|
<p class="text-xs font-medium text-gray-500 mb-1">{{ __('document.project') }}</p>
|
|
<p class="text-sm text-gray-900">{{ $document->project?->name ?? '-' }}</p>
|
|
</div>
|
|
<div>
|
|
<p class="text-xs font-medium text-gray-500 mb-1">{{ __('document.uploaded_by') }}</p>
|
|
<p class="text-sm text-gray-900">{{ $document->uploader?->name ?? '-' }}</p>
|
|
</div>
|
|
@if($document->description)
|
|
<div class="md:col-span-2">
|
|
<p class="text-xs font-medium text-gray-500 mb-1">{{ __('document.description') }}</p>
|
|
<p class="text-sm text-gray-700 whitespace-pre-line">{{ $document->description }}</p>
|
|
</div>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@endsection
|