
<?php $__env->startSection('title'); ?><?php echo e(Settings('site_title')  ? Settings('site_title')  : 'Infix LMS'); ?> |   <?php echo e($instructor->name); ?> <?php $__env->stopSection(); ?>
<?php $__env->startSection('css'); ?>
    <style>
        .course_less_students {
            margin-bottom: 30px;
        }
    </style>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('js'); ?>

    <script>

        var SITEURL = "<?php echo e(route('instructorDetails',[$instructor->id,Str::slug($instructor->name,'-')])); ?>";
        var page = 1;
        load_more(page);
        $(window).scroll(function () { //detect page scroll
            if ($(window).scrollTop() + $(window).height() >= $(document).height() - 400) {
                page++;
                load_more(page);
            }


        });

        function load_more(page) {
            $.ajax({
                url: SITEURL + "?page=" + page,
                type: "get",
                datatype: "html",
                beforeSend: function () {
                    $('.ajax-loading').show();
                }
            })
                .done(function (data) {
                    if (data.length == 0) {

                        //notify user if nothing to load
                        $('.ajax-loading').html("");
                        return;
                    }
                    $('.ajax-loading').hide(); //hide loading animation once data is received
                    $("#results").append(data); //append data into #results element


                })
                .fail(function (jqXHR, ajaxOptions, thrownError) {
                    console.log('No response from server');
                });

        }
    </script>
    <script>
        function openAllCourse(plan_id) {
            var seperator = $('#seperator_' + plan_id);
            var seperator_class = seperator.attr('class');
            if (seperator_class == "fa fa-angle-down") {
                seperator.removeClass("fa fa-angle-down");
                seperator.addClass("fa fa-angle-up");
                $('.extra_' + plan_id).removeClass('d-none');
            } else if (seperator_class == "fa fa-angle-up") {
                seperator.removeClass("fa fa-angle-up");
                seperator.addClass("fa fa-angle-down");
                $('.extra_' + plan_id).addClass('d-none');


            }
        }
    </script>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('mainContent'); ?>

    <?php if($InstructorSetup->show_instructor_page_banner): ?>

        <?php if (isset($component)) { $__componentOriginal269900abaed345884ce342681cdc99f6 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal269900abaed345884ce342681cdc99f6 = $attributes; } ?>
<?php $component = App\View\Components\Breadcrumb::resolve(['banner' => $frontendContent->instructor_page_banner,'title' => trans('frontend.Learn More About Your Instructor'),'subTitle' => trans('frontend.Instructor Details')] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('breadcrumb'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\App\View\Components\Breadcrumb::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal269900abaed345884ce342681cdc99f6)): ?>
<?php $attributes = $__attributesOriginal269900abaed345884ce342681cdc99f6; ?>
<?php unset($__attributesOriginal269900abaed345884ce342681cdc99f6); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal269900abaed345884ce342681cdc99f6)): ?>
<?php $component = $__componentOriginal269900abaed345884ce342681cdc99f6; ?>
<?php unset($__componentOriginal269900abaed345884ce342681cdc99f6); ?>
<?php endif; ?>
    <?php endif; ?>


    <?php if (isset($component)) { $__componentOriginal9da879e06d1b6ab1ddeb815af72808bc = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal9da879e06d1b6ab1ddeb815af72808bc = $attributes; } ?>
<?php $component = App\View\Components\InstructorPageSection::resolve(['instructor' => $instructor,'id' => $id] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('instructor-page-section'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\App\View\Components\InstructorPageSection::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal9da879e06d1b6ab1ddeb815af72808bc)): ?>
<?php $attributes = $__attributesOriginal9da879e06d1b6ab1ddeb815af72808bc; ?>
<?php unset($__attributesOriginal9da879e06d1b6ab1ddeb815af72808bc); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal9da879e06d1b6ab1ddeb815af72808bc)): ?>
<?php $component = $__componentOriginal9da879e06d1b6ab1ddeb815af72808bc; ?>
<?php unset($__componentOriginal9da879e06d1b6ab1ddeb815af72808bc); ?>
<?php endif; ?>


    <div class="course_by_author">
        <div class="container">
            <div class="theme_border"></div>
            <div class="row justify-content-center">
                <div class="col-lg-6">
                    <div class="section__title text-center mb_80">
                        <h3><?php echo e(__('frontend.More Courses by Author')); ?></h3>
                    </div>
                </div>
            </div>
            <div class="row row-gap-24" id="results">

            </div>
        </div>
    </div>
    <?php if(Settings('show_bundle_in_instructor_profile')): ?>
        <?php if(isModuleActive('BundleSubscription')): ?>
            <!-- course_by_author ::start  -->
            <div class="course_by_author">
                <div class="container">
                    <div class="theme_border"></div>
                    <div class="row justify-content-center">
                        <div class="col-lg-6">
                            <div class="section__title text-center mb_80">
                                <h3><?php echo e(__('bundleSubscription.More Bundle Courses by Author')); ?></h3>
                            </div>
                        </div>
                    </div>


                    <div class="row">
                        <?php $__currentLoopData = $BundleCourse; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <?php
                                $oldPrice = 0;
                                foreach ($value->course as $raw){
                                  $oldPrice += $raw->course->price;
                                }

                            ?>
                            <div class="col-xl-3 col-lg-4 col-md-6">
                                <div class="package_widget mb_30">
                                    <div class="package_header text-center">
                                        <h3><?php echo e($value->title); ?></h3>
                                        <div class="package_rating d-flex align-items-center justify-content-center">
                                            <div class="feedmak_stars d-flex align-items-center">

                                                <?php
                                                    $star = 5;
                                                ?>
                                                <?php for($x=0; $x < $value->reviews->avg('star'); $x++): ?>
                                                    <i class="fas fa-star"></i>
                                                    <?php
                                                        $star -= 1;
                                                    ?>
                                                <?php endfor; ?>
                                                <?php for($x=0; $x < $star; $x++): ?>
                                                    <i class="far fa-star"></i>
                                                <?php endfor; ?>
                                            </div>
                                            <p>(<?php echo e($value->student); ?> <?php echo e(__('bundleSubscription.students')); ?>)</p>
                                        </div>
                                    </div>
                                    <div class="package_body">
                                        <div class="package_lists">
                                            <?php $__currentLoopData = $value->course; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$raw): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                <div class="single_packageList <?php echo e($key>2?'d-none extra_'.$value->id:''); ?>">
                                                    <p><?php echo e(Str::limit($raw->course->title, 40)); ?></p>
                                                    <span><?php echo e(getPriceFormat($raw->course->price)); ?></span>
                                                </div>
                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                        </div>
                                        <?php if(count($value->course)>3): ?>
                                            <div class="package_seperator" onclick="openAllCourse(<?php echo e($value->id); ?>)">
  <span>
                                <i class="fa fa-angle-down" id="seperator_<?php echo e($value->id); ?>"></i>
                            </span>
                                            </div>
                                        <?php endif; ?>
                                        <div
                                            class="package_footer d-flex justify-content-between align-items-center flex-column">

                                            <div class="prise_tag">
                                                <h4><span><?php echo e(getPriceFormat($oldPrice)); ?></span> <?php echo e(getPriceFormat($value->price)); ?>

                                                </h4>
                                                <p><?php echo e(__('bundleSubscription.Total')); ?> <?php echo e(count($value->course)); ?> <?php echo e(__('bundleSubscription.Course')); ?></p>
                                            </div>
                                            <a href="<?php echo e(route('bundle.show')); ?>?id=<?php echo e($value->id); ?>"
                                               class="theme_btn small_btn2 w-100 text-center"><?php echo e(__('bundleSubscription.View Details')); ?></a>
                                        </div>
                                    </div>

                                </div>
                            </div>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </div>
                </div>
            </div>

        <?php endif; ?>
    <?php endif; ?>

<?php $__env->stopSection(); ?>


<?php echo $__env->make(theme('layouts.master'), \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/minialms/app.minialms.com/resources/views/frontend/infixlmstheme/pages/instructor.blade.php ENDPATH**/ ?>