@extends('backEnd.master') @section('title') @lang('common.subject') @endsection @section('mainContent') @lang('common.subject') @lang('common.dashboard') @lang('library.library') @lang('common.subject') @if(isset($subject)) @if(userPermission('library_subject_store') ) @lang('common.add') @endif @endif @if(isset($subject)) {{ Form::open(['class' => 'form-horizontal', 'files' => true, 'route' => 'library_subject_update', 'method' => 'POST']) }} @else @if(userPermission('library_subject_store') ) {{ Form::open(['class' => 'form-horizontal', 'files' => true, 'route' => 'library_subject_store', 'method' => 'POST']) }} @endif @endif @if(isset($subject)) @lang('library.edit_subject') @else @lang('library.add_subject') @endif @lang('library.subject_name') * @if ($errors->has('subject_name')) {{ @$errors->first('subject_name') }} @endif @if(isset($subject)) subject_type == 'T'? 'checked':''}}> @lang('library.theory') subject_type == 'P'? 'checked':''}}> @lang('library.practical') @else @lang('library.theory') @lang('library.practical') @endif @lang('common.category') * @lang('library.category_name') @foreach($bookCategories as $value) @if(isset($subject)) id == $subject->sb_category_id? 'selected':''}}>{{$value->category_name}} @else {{$value->category_name}} @endif @endforeach @if ($errors->has('category')) {{ $errors->first('category') }} @endif @lang('library.subject_code') * @if ($errors->has('subject_code')) {{ @$errors->first('subject_code') }} @endif @php $tooltip = ""; if(userPermission('library_subject_store') || userPermission('library_subject_edit') ){ $tooltip = ""; }else{ $tooltip = "You have no permission to add"; } @endphp @if(isset($subject)) @lang('library.update_subject') @else @lang('library.save_subject') @endif {{ Form::close() }} @lang('library.subject_list') @lang('common.sl') @lang('common.subject') @lang('library.category_name') @lang('library.subject_code') @lang('common.action') @php $i=0; @endphp @foreach($subjects as $subject) {{++$i}} {{@$subject->subject_name}} {{@$subject->category->category_name}} {{@$subject->subject_code}} @if(userPermission('library_subject_edit')) @lang('common.edit') @endif @if(userPermission('library_subject_delete')) @lang('common.delete') @endif @lang('library.delete_subject') × @lang('common.are_you_sure_to_delete') @lang('common.cancel') @lang('common.delete') @endforeach @endsection @include('backEnd.partials.data_table_js')