@extends('public.layout.app') {{-- keep your existing front layout if different --}} @section('title', $department->name) @section('body')
{{-- Header --}}
{{ __('front.back_to_list_2') }}
@if($department->faculty) {{ $department->faculty->name }} @endif @if(optional($department->faculty)->university) {{ $department->faculty->university->name }} @endif @if($department->code) {{ $department->code }} @endif

{{ $department->name }}

{{ __('front.department_details_and_related_faculty_university') }}

{{-- Quick Actions --}}
@if($department->faculty_id) {{ __('front.more_from_same_faculty') }} @endif @if($department->code) {{ __('front.search_by_code') }} @endif
{{-- Main --}}
{{ __('front.about_department') }}
{{ __('front.name') }} {{ $department->name }} {{ __('front.code') }} {{ $department->code ?? '—' }} {{ __('front.created') }} {{ optional($department->created_at)->format('Y-m-d') }} {{ __('front.updated_2') }} {{ optional($department->updated_at)->format('Y-m-d') }}
{{-- Sidebar --}}
{{ __('front.related') }}
{{ __('front.faculty') }} {{ $department->faculty?->name ?? '—' }}
{{ __('front.university') }} {{ optional($department->faculty?->university)->name ?? '—' }}
{{ __('front.tip') }}

{{ __('front.go_back_to_the_list_and_use_filters_to_find_departments') }}

@endsection @section('body') @php $programCount = $department->programs->count(); $courseCount = $department->programs->sum(fn ($program) => $program->semesters->sum(fn ($semester) => $semester->courses->count())); $subtitle = $department->public_summary ?: 'Explore department vision, programs, admission requirements, learning facilities, courses, and career pathways.'; $heroMeta = array_filter([ $department->faculty?->name ? ' ' . e($department->faculty->name) : null, $department->code ? ' ' . e($department->code) : null, ' ' . $programCount . ' programs', ' ' . $courseCount . ' courses', ]); $infoSections = [ ['title' => 'Vision', 'icon' => 'fa-eye', 'body' => $department->vision], ['title' => 'Mission', 'icon' => 'fa-bullseye', 'body' => $department->mission], ['title' => 'Objectives', 'icon' => 'fa-list-check', 'body' => $department->objectives], ['title' => 'Admission Requirements', 'icon' => 'fa-file-signature', 'body' => $department->admission_requirements], ['title' => 'Eligibility', 'icon' => 'fa-user-check', 'body' => $department->eligibility], ['title' => 'Facilities', 'icon' => 'fa-laptop-file', 'body' => $department->facilities], ['title' => 'Career Opportunities', 'icon' => 'fa-briefcase', 'body' => $department->career_opportunities], ]; @endphp @include('public.partials.page-hero', [ 'title' => $department->name, 'subtitle' => $subtitle, 'kicker' => 'Academic Department', 'image' => $department->banner_image ? asset('storage/' . $department->banner_image) : asset('images/afghan-online-education/logo.png'), 'breadcrumbs' => ['Departments' => route('front.departments.index'), $department->name => null], 'meta' => $heroMeta, 'showApply' => true, ])
{{ $department->faculty?->name ?? 'Faculty' }}

Department Overview

{{ $subtitle }}

@if($department->head_name || $department->head_message)
{{ $department->head_name ?: 'Department Head' }} @if($department->head_message)

{!! nl2br(e($department->head_message)) !!}

@endif
@endif
{{ $programCount }}Programs
{{ $courseCount }}Courses
{{ $department->teaching_language ?: 'Flexible' }}Teaching Language
@foreach($infoSections as $section) @if($section['body'])
Department Information

{{ $section['title'] }}

{!! nl2br(e($section['body'])) !!}
@endif @endforeach
Academic Pathways

Programs and Courses

@forelse($department->programs as $program)

{{ $program->name }}

{{ $program->degree_type ?: 'Academic program' }}
View Program
@forelse($program->semesters as $semester) @forelse($semester->courses as $course) @empty @endforelse @empty @endforelse
SemesterCourseCredits
{{ $semester->name }} {{ $course->title }} {{ $course->credit_hours ?: '-' }}
{{ $semester->name }}Courses will be added soon.
Semesters and courses will appear after setup.
@empty
Programs will appear here after academic setup.
@endforelse
@include('public.partials.important-notes', ['notes' => $department->public_notes]) @include('public.partials.comment-section', ['type' => 'department', 'id' => $department->id, 'comments' => $comments ?? collect()]) @include('public.partials.feedback-form', ['type' => 'department', 'id' => $department->id]) @include('public.partials.apply-cta')
@overwrite