<div class="table-responsive">
    <table id="example" class="table table-bordered align-middle" style="width:100%">
        <thead class="table-light">
            <tr>
                
                <th class="thbutton">Sl No.</th>
                <th >Title</th>
                <th >Description</th>
                <th >Semester</th>
                <th class="text-center" style="width: 15%;">View Files</th>
                <th class="thbutton">Priority</th>
                <th class="thbutton"> Status</th>
                
                <th class="thbutton"> Edit</th>
                <th class="thbutton"> Delete</th>
            </tr>
        </thead>
        <tbody>
            @php $i=1;@endphp
            @if($study_materials->count() > 0)
                @foreach($study_materials as $list)
                <tr>
                    <td class="text-center">{{$i++}}</td>
                    <td class="text-left">
                        <a href="{!! route('study-materials-file.show',['course_id'=>$course_id,'material_type_id'=>$material_type_id,'material_id'=>$list->id]) !!}">
                            <b>{{$list->title}}</b>
                        </a>
                    </td>
                    <td class="text-left">{!! $list->description !!}</td>
                    <td class="text-left">{{$list->semester_name}}</td>
                    
                    <td align="center">
                        <a href="{!! route('study-materials-file.show',['course_id'=>$course_id,'material_type_id'=>$material_type_id,'material_id'=>$list->id]) !!}" class="btn btn-info" style="width: 67%;">
                            <i class="bi bi-list text-white"></i> Manage Files
                        </a>
                    </td>
                    
                    {{--<td class="text-center">
                        <div class="form-check form-check-inline{{$i}}">
                            <input class="form-check-input{{$i}} btn-lg changeStatusCustom study_materials" type="checkbox" id="inlineCheckbox{{$i}}" data-url="{{route('study-materials-isDefaultchangeStatus')}}" data-id="{{$list->id}}" data-status="{{$list->is_default=='0' ? '1' : '0'}}" {{ $list->is_default=='1' ? 'checked' : '0'}}>
                        </div>
                    </td> --}}
                   
                    <td class="text-left">{{$list->priority}}</td>
                    <td class="text-center">
                        <div class="form-check form-check-inline{{$i}}">
                            <input class="form-check-input{{$i}} btn-lg changeStatusCustom study_materials" type="checkbox" id="inlineCheckbox{{$i}}" data-url="{{route('study-materials-changestatus')}}" data-id="{{$list->id}}" data-status="{{$list->status=='0' ? '1' : '0'}}" {{ $list->status=='1' ? 'checked' : '0'}}>
                        </div>
                    </td> 
                    
                    <td class="thbutton">
                        <a data-id="{{ $list->id }}" class="btn btn-warning edit edit_study_materials" type="button" data-bs-toggle="modal" data-bs-target="#commonModal" id="edit_study_materials">
                            <i class="bi bi-pencil-square text-white"></i>
                        </a>
                    </td>

                    <td class="thbutton">
                        <a data-url="{{ route('study-materials.destroy', $list->id) }}" class="btn btn-danger deleteDataCustom study_materials" class="text-danger" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Delete">
                            <i class="bi bi-trash text-white"></i>
                        </a>
                    </td>

                </tr>
                @endforeach
            @else
                <tr>
                    <td colspan="11">No Data Found</td>
                </tr>
            @endif
</tbody>

    </table>
</div>

</div>
