@extends('admin.layouts.app') @section('title', __('admin.downloads.title')) @section('content') @if($errors->any())
@endif @if(($categories ?? collect())->isEmpty())
{{ __('admin.downloads.no_categories') }}
@else @foreach($categories as $category)
{{ $category->name }}
{{ __('common.actions.edit') }}
@csrf @method('PUT')
@csrf @method('DELETE')
@if(($category->downloads ?? collect())->isEmpty())
{{ __('admin.downloads.no_downloads') }}
@else @foreach($category->downloads as $dl) @endforeach
{{ __('admin.downloads.filename') }}{{ __('common.table.description') }}{{ __('admin.downloads.file_url') }}{{ __('admin.downloads.downloads_count') }}{{ __('admin.downloads.published') }}{{ __('common.table.actions') }}
{{ $dl->title }}@if($dl->products->isNotEmpty())
{{ __('admin.downloads.only_for', ['products' => $dl->products->pluck('name')->implode(', ')]) }}
@endif
{{ Str::limit($dl->description, 60) }} @if($dl->isStoredFile()){{ $dl->fileName() }} ({{ __('admin.downloads.stored_file') }})@else{{ Str::limit($dl->location, 40) }}@endif {{ $dl->download_count ?? 0 }} {{ $dl->hidden ? __('admin.downloads.draft') : __('admin.downloads.published') }} {{ __('common.actions.edit') }}
@csrf @method('DELETE')
@endif
@endforeach @endif @if($errors->any()) @endif @endsection