@extends('components.app-layout') @section('title', $documentCategory->name) @section('content')

{{ $documentCategory->name }}

{{ $documentCategory->documents->count() }} documents in this category

Description

{{ $documentCategory->description ?: 'No description provided.' }}

Status

@if($documentCategory->is_active) Active @else Inactive @endif

Sort Order

{{ $documentCategory->sort_order }}

{{ $documentCategory->documents->count() }}
Total Documents
{{ $documentCategory->documents->where('is_active', true)->count() }}
Active Documents
{{ $documentCategory->documents->sum('print_count') }}
Total Prints
@if($documentCategory->children->count() > 0)

Subcategories & Folders

Categories and folders within {{ $documentCategory->name }}

@foreach($documentCategory->children as $child)

{{ $child->name }}

{{ $child->isFolder() ? 'Folder' : 'Category' }} {{ $child->documents_count }} docs @if($child->children->count() > 0) {{ $child->children->count() }} items @endif
@if($child->is_active) Active @else Inactive @endif
@if($child->description)

{{ Str::limit($child->description, 80) }}

@endif
@if($child->isFolder()) Open @else View @endif Edit
@endforeach
@endif

Documents in this Category

@if($documentCategory->documents->count() > 0) View all in Documents @endif
@if($documentCategory->documents->count() > 0)
@foreach($documentCategory->documents->take(10) as $document) @endforeach
Document Size Prints Status Uploaded Actions
{{ $document->title }}
{{ $document->file_name }}
{{ $document->file_size_formatted }} {{ $document->print_count }} @if($document->is_active) Active @else Inactive @endif
{{ $document->created_at->format('M d, Y') }}
by {{ $document->uploader->name }}
@if($document->canBePrinted())
@csrf
@endif
@if($documentCategory->documents->count() > 10) @endif @else

No documents yet

This category doesn't have any documents yet.

Add First Document
@endif
@endsection