@extends('backEnd.master') @section('title') @lang('lesson::lesson.add_lesson') @endsection @section('mainContent') @section('script') @stop

@lang('lesson::lesson.add_lesson')

@if (isset($lesson)) @if (userPermission("lesson.create-store")) @endif @endif @if (isset($lesson)) {{ Form::open(['class' => 'form-horizontal', 'files' => true, 'route' => ['exam-update', $lesson->id], 'method' => 'PUT', 'enctype' => 'multipart/form-data']) }} @else @if (userPermission("lesson.create-store")) {{ Form::open(['class' => 'form-horizontal', 'route' => 'lesson.storelesson', 'method' => 'POST']) }} @endif @endif

@if (isset($data)) @lang('lesson::lesson.edit_lesson') @else @lang('lesson::lesson.add_lesson') @endif

@if (moduleStatusCheck('University')) @includeIf('university::common.session_faculty_depart_academic_semester_level', [ 'row' => 1, 'div' => 'col-lg-12', 'mt' => 'mt-0', 'required' => ['USN', 'UD', 'US', 'USL', 'USUB'], 'hide' => ['UA'], ]) @else
@if ($errors->has('class')) {{ $errors->first('class') }} @endif
@if ($errors->has('subject')) {{ $errors->first('subject') }} @endif
@endif
@lang('lesson::lesson.add_lesson_name')
@php $tooltip = ''; if (userPermission("lesson.create-store")) { $tooltip = ''; }elseif(userPermission("lesson-edit") && isset($data)){ $tooltip = ''; } else { $tooltip = 'You have no permission to add'; } @endphp
{{ Form::close() }}

@lang('lesson::lesson.lesson_list')

@if (moduleStatusCheck('University')) @else @endif @foreach ($lessons as $lesson) @if (moduleStatusCheck('University')) @else @endif @endforeach
@lang('common.sl')@lang('university::un.session') @lang('university::un.faculty') @lang('university::un.department') @lang('university::un.academic') @lang('university::un.semester') @lang('university::un.semester_label')@lang('common.class') @lang('common.section')@lang('lesson::lesson.subject') @lang('lesson::lesson.lesson') @lang('common.action')
{{ $loop->iteration }} {{ $lesson->unSession->name }} {{ $lesson->unFaculty->name }} {{ $lesson->unDepartment->name }} {{ $lesson->unAcademic->name }} {{ $lesson->unSemester->name }} {{ $lesson->unSemesterLabel->name }} {{ $lesson->unSubject->subject_name }}{{ $lesson->class != '' ? $lesson->class->class_name : '' }} {{ $lesson->section != '' ? $lesson->section->section_name : '' }} {{ $lesson->subject != '' ? $lesson->subject->subject_name : '' }} @php $lesson_title = Modules\Lesson\Entities\SmLesson::lessonName($lesson->class_id, $lesson->section_id, $lesson->subject_id); @endphp @foreach ($lesson_title as $data)
{{ $data->lesson_title }} {{ !$loop->last ? ',' : '' }}
@endforeach
@if (userPermission("lesson-edit")) @if (moduleStatusCheck('University')) @if ($lesson->class_id == null) @lang('common.edit') @endif @else @if ($lesson->class_id != null) @lang('common.edit') @endif @endif @endif @if (userPermission("lesson-delete")) @lang('common.delete') @endif
@endsection @include('backEnd.partials.data_table_js') @push('script') @endpush