@extends('admin.layouts.app') @section('content') {{ show_window_title($page_title) }}
{{-- Course Header Section --}}
{{-- Course Thumbnail --}}
@php $thumbnailUrl = $course->thumbnail_url ? $course->thumbnail_url['original'] : null; @endphp @if($thumbnailUrl) {{ $course->title }} @else
@endif
{{-- Course Details --}}

{{ $course->title }}

@if ($course->status === 'published') Published @elseif ($course->status === 'draft') Draft @else Archived @endif @if($course->type === 'structured') Structured @else Direct @endif
Back to Courses
{{-- Course Description --}}
Description

{{ $course->description ?: 'No description available' }}

{{-- Course Meta Information --}}

Program: {{ $course->program ? $course->program->title : 'No Program' }}

Category: {{ $course->category ? $course->category->title : 'No Category' }}

Total Units: {{ $nestedUnits->count() }}

Enrolled Students: {{ $totalEnrollments }}

{{-- Course Units Section --}}
Course Units
@if($nestedUnits && $nestedUnits->count() > 0)
@foreach($nestedUnits as $index => $unit)
{{ $loop->iteration }}
{{ $unit->title }}
@if($unit->description) {{ $unit->description }} @endif
{{ $unit->materials_count }} Materials @if($unit->nested_children && $unit->nested_children->count() > 0) {{ $unit->nested_children->count() }} Sub-units @endif
@if($unit->nested_children && $unit->nested_children->count() > 0) @include('admin.courses.partials.nested-units', ['units' => $unit->nested_children, 'level' => 1]) @else

This unit has {{ $unit->materials_count }} material(s) and no sub-units.

@endif
@endforeach
@else
No units available

This course doesn't have any units yet.

@endif
{{-- Enrolled Students Section --}}
Enrolled Students
Total: {{ $totalEnrollments }}
@if($latestEnrollments && $latestEnrollments->count() > 0)
@foreach($latestEnrollments as $enrollment) @endforeach
# Student Name Phone Type Status Enrolled Date
{{ $loop->iteration }} @if($enrollment->user) {{ $enrollment->user->name }} @else N/A @endif @if($enrollment->user && $enrollment->user->phone) {{ $enrollment->user->phone }} @else N/A @endif @if($enrollment->type === 'paid') Paid @else Free @endif @if($enrollment->status === 'active') Active @elseif($enrollment->status === 'expired') Expired @else Cancelled @endif {{ $enrollment->created_at->format('M d, Y') }}
@if($totalEnrollments > 10) @endif @else
No enrollments yet

No students have enrolled in this course.

@endif
{{-- Sidebar --}}
{{-- Sidebar styles will be applied here --}} {{-- Course Features --}}
Course Features
@if($courseFeatures && $courseFeatures->count() > 0)
    @foreach($courseFeatures as $feature)
  • {{ $feature->title }} @if($feature->description)

    {{ $feature->description }}

    @endif
  • @endforeach
@else

No features added yet

@endif
{{-- Course Tutors --}}
Course Tutors
@if($courseTutors && $courseTutors->count() > 0)
    @foreach($courseTutors as $tutor)
  • @if($tutor->user && $tutor->user->profile_picture) {{ $tutor->user->name }} @else
    @endif
    {{ $tutor->user ? $tutor->user->name : 'N/A' }}
    @if($tutor->role === 'primary') Primary Tutor @else Assistant Tutor @endif
  • @endforeach
@else

No tutors assigned yet

@endif
{{-- Quick Actions --}}
@endsection