@extends('layouts.main_dashboard.app') @section('title', __('dashboard.All Subjects')) @section('page_heading', __('dashboard.All Subjects')) @section('page_subtitle', app()->getLocale() === 'ar' ? 'إدارة المواد الدراسية وربطها بالمراحل والأقسام من واجهة أوضح وأهدأ.' : 'Manage academic subjects and their stage and department links from a clearer interface.') @section('skip_page_hero', true) @php $isArabic = app()->getLocale() === 'ar'; $filtersOpenByDefault = request()->hasAny(['year', 'term', 'stage', 'grade', 'department']); $subjectsCollection = $subjects->getCollection(); $withDepartments = $subjectsCollection->filter(fn ($subject) => filled(optional($subject->department)->name))->count(); $withoutDepartments = $subjectsCollection->count() - $withDepartments; $totalUnits = $subjectsCollection->sum('subject_units_count'); $totalLessons = $subjectsCollection->sum('lessons_count'); @endphp @section('content')
{{ $isArabic ? 'اعرض المواد الدراسية مع المرحلة والصف والقسم وعدد الوحدات والدروس من شاشة إدارية موحّدة.' : 'Review subjects with stage, grade, department, unit count, and lesson count from one unified admin screen.' }}
{{ $isArabic ? 'إجمالي المواد' : 'Total subjects' }}
{{ $subjects->total() }}
{{ $isArabic ? 'فهرس أكاديمي' : 'Academic catalog' }}
{{ $isArabic ? 'قائمة منظمة تساعدك على مراجعة الربط الأكاديمي لكل مادة بسرعة.' : 'A structured list that helps you review each subject academic link quickly.' }}
{{ $isArabic ? 'داخل الصفحة' : 'Visible now' }}
{{ $subjectsCollection->count() }}
{{ $isArabic ? 'مرتبطة بقسم' : 'With department' }}
{{ $withDepartments }}
{{ $isArabic ? 'إجمالي الوحدات' : 'Total units' }}
{{ $totalUnits }}
{{ $isArabic ? 'إجمالي الدروس' : 'Total lessons' }}
{{ $totalLessons }}
{{ $isArabic ? 'تصفية المواد' : 'Filter subjects' }}
{{ $isArabic ? 'حدّد السنة والفصل والمرحلة والصف والقسم لعرض نطاق أدق.' : 'Narrow the list by year, term, stage, grade, and department.' }}
{{ $isArabic ? 'لا توجد مواد مطابقة للفلاتر الحالية.' : 'No subjects match the current filters.' }}
| {{ $isArabic ? 'المادة' : 'Subject' }} | {{ $isArabic ? 'المسار الأكاديمي' : 'Academic path' }} | {{ $isArabic ? 'القسم' : 'Department' }} | {{ $isArabic ? 'الوحدات والدروس' : 'Units & lessons' }} | {{ $isArabic ? 'الدرجة' : 'Total marks' }} | {{ __('dashboard.Actions') }} |
|---|---|---|---|---|---|
|
@if($subject->image)
{{ $subject->name }} #{{ $subject->id }} |
{{ collect([ optional($subject->grade->stage->term->year)->name, optional($subject->grade->stage->term)->name, optional($subject->grade->stage)->name, optional($subject->grade)->name, ])->filter()->implode(' / ') ?: '-' }} | @if(optional($subject->department)->name) {{ $subject->department->name }} @else {{ __('dashboard.Not Assigned') }} @endif |
{{ $subject->subject_units_count }} {{ __('dashboard.Units Count') }}
{{ $subject->lessons_count }} {{ __('dashboard.Lessons Count') }}
|
{{ $subject->total_marks }} |