@extends('layouts.admin') @section('title', 'Items') @section('subtitle', 'Manage all repository submissions') @section('content')
cloud_download Total Downloads: {{ number_format($totalRepositoryDownloads ?? 0) }}
@if(request('status')) @endif search @if(request('search')) close @endif
add Create Item
@csrf

Repository Items

Showing {{ $items->firstItem() ?? 0 }}–{{ $items->lastItem() ?? 0 }} of {{ $items->total() }} • Page {{ $items->currentPage() }} of {{ max(1, $items->lastPage()) }}
@forelse($items as $item) @empty @endforelse
ID Title Date Downloads @if(request('sort') === 'downloads_desc') south @elseif(request('sort') === 'downloads_asc') north @else unfold_more @endif Status Actions
#{{ $item->id }}

{{ $item->title ?: 'Untitled Item' }}

{{ $item->author }}

{{ optional($item->issued_at)->format('d M Y') ?: 'N/A' }} @php $fileCount = $item->bitstreams->count(); $totalDl = $item->bitstreams_sum_downloads ?? $item->bitstreams->sum('downloads'); @endphp @if($fileCount > 0)
file_download {{ number_format($totalDl) }} {{ \Illuminate\Support\Str::plural('dl', $totalDl) }}
@if($fileCount === 1) @php $singleFile = $item->bitstreams->first(); @endphp

attach_file {{ $singleFile->file_name }}

@else
@foreach($item->bitstreams as $bs)
insert_drive_file {{ $bs->file_name }} download{{ number_format($bs->downloads) }}
@endforeach
@endif
@else block No files @endif
@if($item->is_published) Published @else Hidden / Draft @endif
open_in_new edit @if(auth()->user()->role === 'admin') @endif
find_in_page No items found matching your criteria.
@if($items->hasPages())
{{ $items->links() }}
@endif
0 0 items selected on Page {{ $items->currentPage() }}
@if(auth()->user()->role === 'admin') @endif
@endsection @section('scripts') @endsection