@extends('backEnd.master') @section('title') @lang('common.subject') @endsection @section('mainContent')
@if(isset($subject)) @if(userPermission('library_subject_store') ) @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

@if ($errors->has('subject_name')) {{ @$errors->first('subject_name') }} @endif
@if(isset($subject))
subject_type == 'T'? 'checked':''}}>
subject_type == 'P'? 'checked':''}}>
@else
@endif
@if ($errors->has('category')) {{ $errors->first('category') }} @endif
@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
{{ Form::close() }}

@lang('library.subject_list')

@php $i=0; @endphp @foreach($subjects as $subject) @endforeach
@lang('common.sl') @lang('common.subject') @lang('library.category_name') @lang('library.subject_code') @lang('common.action')
{{++$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
@endsection @include('backEnd.partials.data_table_js')