@extends('backend.layouts.app') @section('title', \App\Http\Helpers\MenuHelper::getPageTitle()) @section('content') @include('backend.module._index-reset-button')

All Documents

@can('content-download.create') Create @endcan
@if(!$cat)
Use the Department filter above to view documents under a specific department, then drag & drop to reorder.
@elseif($cat && count($downloads) <= 1)
Add at least 2 documents in this department to enable drag & drop reordering.
@endif
@forelse($downloads as $download) @empty @endforelse
# Title Department Status Sort Actions
@if($cat) @if(count($downloads) > 1) @else @endif @else @endif {{ ($downloads->currentPage() - 1) * $downloads->perPage() + $loop->iteration }} {{ $download->download_title ?? '-' }} {{ $departments[$download->download_department] ?? $download->download_department ?? '-' }} @if ($download->download_category) {{ $categories[$download->download_category] ?? $download->download_category }} @endif @php $rawStatus = $download->download_status; $statusBadge = [ 'ACTIVE' => 'bg-success-50 text-success-600 dark:bg-success-500/10 dark:text-success-400', 'INACTIVE' => 'bg-error-50 text-error-600 dark:bg-error-500/10 dark:text-error-400', 'ARCHIVE' => 'bg-gray-100 text-gray-600 dark:bg-gray-800 dark:text-gray-400', ][$rawStatus] ?? 'bg-gray-100 text-gray-600 dark:bg-gray-800 dark:text-gray-400'; $statusLabel = $rawStatus ? ($statuses[$rawStatus] ?? ucfirst(strtolower($rawStatus))) : '-'; $publishStart = $download->publish_start; $publishEnd = $download->publish_end; $hasWindow = $publishStart || $publishEnd; $isEnded = $publishEnd && now()->gt($publishEnd); $isUpcoming = ! $isEnded && $publishStart && now()->lt($publishStart); $windowTextClass = $isEnded ? 'text-error-600 dark:text-error-500' : ($isUpcoming ? 'text-warning-600 dark:text-warning-400' : 'text-gray-500 dark:text-gray-400'); @endphp {{ $statusLabel }} @if($hasWindow)
START @if($publishStart) {{ $publishStart->format('d/m/Y h:i A') }} @else No start date @endif END @if($publishEnd) {{ $publishEnd->format('d/m/Y h:i A') }} @else No end date @endif
@endif
{{ $download->download_sorting ?? '-' }}
@can('content-download.update') @endcan @can('content-download.delete')
@csrf @method('DELETE')
@endcan

No documents found

Click "Create" to add your first entry.

{{ $downloads->appends(request()->query())->links('vendor.pagination.custom') }}
@endsection @push('scripts') @endpush