{{ __('app.portal.homework.manage_title') }}

{{ __('app.portal.homework.manage_desc') }}

@if ($year !== null && $options->isNotEmpty() && ! $showForm) {{ __('app.portal.homework.create') }} @endif
@if ($notice) {{ $notice }} @endif @if ($year === null) @elseif ($options->isEmpty()) @else @if ($showForm) @if ($option === null) {{ __('app.portal.homework.scope_missing') }} @elseif ($option['subjects']->isEmpty()) {{ __('app.portal.homework.no_subjects') }} @else
@foreach ($options as $available) @endforeach @if ($option['sections']->isNotEmpty()) @if ($option['whole_class']) @endif @foreach ($option['sections'] as $available) @endforeach @endif @foreach ($option['subjects'] as $available) @endforeach @foreach ($types as $available) @endforeach

{{ __('app.portal.homework.fields.attachment_hint', ['max' => number_format((int) config('portals.files.max_kb', 10240) / 1024), 'types' => implode(', ', (array) config('portals.files.mimes', []))]) }}

@error('attachment')

{{ $message }}

@enderror
{{ __('app.portal.common.uploading') }}
@if ($editingRecord?->hasAttachment())
{{ $editingRecord->attachment_name }}
@endif
{{ __('app.actions.cancel') }} {{ __('app.actions.save') }}
@endif
@endif
@foreach ($options as $available) @endforeach
@if ($records === null || $records->isEmpty()) @else
@foreach ($records as $record) @endforeach
{{ __('app.portal.homework.fields.title') }} {{ __('app.portal.homework.fields.scope') }} {{ __('app.portal.homework.fields.due_on') }} {{ __('app.portal.common.status') }} {{ __('app.portal.common.actions') }}
{{ $record->title }} {{ $record->type->label() }} · {{ $record->subject?->localizedName() }} @if ($record->hasAttachment()) {{ $record->attachment_name }} @endif {{ $record->academicClass?->localizedName() }} @if ($record->section) · {{ $record->section->localizedName() }} @else · {{ __('app.portal.dashboard.all_sections') }} @endif {{ $record->assigned_on?->format('d M Y') }} → {{ $record->due_on?->format('d M Y') }} {{ $record->is_published ? __('app.portal.common.published') : __('app.portal.common.draft') }}
@if ($record->is_published) @else @endif
{{ $records->links() }}
@endif
@endif