관리-도구
편집 파일: 4d9bc00ef43f6ea5f3131ab38e62bd87.php
<?php $__env->startSection('title'); ?> <title><?php echo e(__('Category List')); ?></title> <?php $__env->stopSection(); ?> <?php $__env->startSection('admin-content'); ?> <div class="main-content"> <section class="section"> <div class="section-header"> <h1><?php echo e(__('Category List')); ?></h1> <div class="section-header-breadcrumb"> <div class="breadcrumb-item active"><a href="<?php echo e(route('admin.dashboard')); ?>"><?php echo e(__('Dashboard')); ?></a> </div> <div class="breadcrumb-item"><?php echo e(__('Category List')); ?></div> </div> </div> <div class="section-body"> <div class="mt-4 row"> <div class="col-12"> <div class="card"> <div class="card-body"> <form action="<?php echo e(route('admin.course-category.index')); ?>" method="GET" onchange="$(this).trigger('submit')" class="form_padding"> <div class="row"> <div class="col-md-3 form-group"> <input type="text" name="keyword" value="<?php echo e(request()->get('keyword')); ?>" class="form-control" placeholder="<?php echo e(__('Search')); ?>"> </div> <div class="col-md-3 form-group"> <select name="status" id="status" class="form-control"> <option value=""><?php echo e(__('Select Status')); ?></option> <option value="1" <?php echo e(request('status') == '1' ? 'selected' : ''); ?>> <?php echo e(__('Active')); ?> </option> <option value="0" <?php echo e(request('status') == '0' ? 'selected' : ''); ?>> <?php echo e(__('In-Active')); ?> </option> </select> </div> <div class="col-md-3 form-group"> <select name="order_by" id="order_by" class="form-control"> <option value=""><?php echo e(__('Order By')); ?></option> <option value="1" <?php echo e(request('order_by') == '1' ? 'selected' : ''); ?>> <?php echo e(__('ASC')); ?> </option> <option value="0" <?php echo e(request('order_by') == '0' ? 'selected' : ''); ?>> <?php echo e(__('DESC')); ?> </option> </select> </div> <div class="col-md-3 form-group"> <select name="par-page" id="par-page" class="form-control"> <option value=""><?php echo e(__('Per Page')); ?></option> <option value="10" <?php echo e('10' == request('par-page') ? 'selected' : ''); ?>> <?php echo e(__('10')); ?> </option> <option value="50" <?php echo e('50' == request('par-page') ? 'selected' : ''); ?>> <?php echo e(__('50')); ?> </option> <option value="100" <?php echo e('100' == request('par-page') ? 'selected' : ''); ?>> <?php echo e(__('100')); ?> </option> <option value="all" <?php echo e('all' == request('par-page') ? 'selected' : ''); ?>> <?php echo e(__('All')); ?> </option> </select> </div> </div> </form> </div> </div> </div> <div class="col-12"> <div class="card"> <div class="card-header d-flex justify-content-between"> <h4><?php echo e(__('Category List')); ?></h4> <div> <a href="<?php echo e(route('admin.course-category.create')); ?>" class="btn btn-primary"><i class="fa fa-plus"></i><?php echo e(__('Add New')); ?></a> </div> </div> <div class="card-body"> <div class="table-responsive max-h-400"> <table class="table table-striped"> <thead> <tr> <th><?php echo e(__('SN')); ?></th> <th><?php echo e(__('Icon')); ?></th> <th><?php echo e(__('Name')); ?></th> <th><?php echo e(__('Slug')); ?></th> <th ><?php echo e(__('Show at Trading')); ?></th> <th><?php echo e(__('Status')); ?></th> <th class="text-center"><?php echo e(__('Actions')); ?></th> </tr> </thead> <tbody> <?php $__empty_1 = true; $__currentLoopData = $categories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $category): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?> <tr> <td><?php echo e($loop->index + 1); ?></td> <td><img class="thumb p-2" src="<?php echo e(asset($category->icon)); ?>" alt=""></td> <td><?php echo e($category->translation?->name); ?></td> <td><?php echo e($category->slug); ?></td> <td class="min-150"> <?php if($category->show_at_trending == 1): ?> <span class="badge badge-success"><?php echo e(__('Yes')); ?></span> <?php else: ?> <span class="badge badge-danger"><?php echo e(__('No')); ?></span> <?php endif; ?> </td> <td> <input onchange="changeStatus(<?php echo e($category->id); ?>)" id="status_toggle" type="checkbox" <?php echo e($category->status ? 'checked' : ''); ?> data-toggle="toggle" data-on="<?php echo e(__('Active')); ?>" data-off="<?php echo e(__('Inactive')); ?>" data-onstyle="success" data-offstyle="danger"> </td> <td class="text-center min-200"> <div> <a href="<?php echo e(route('admin.course-category.edit', [ 'course_category' => $category->id, 'code' => getSessionLanguage(), ])); ?>" class="m-1 text-white btn btn-sm btn-warning" title="Edit"> <i class="fa fa-edit"></i> </a> <a href="<?php echo e(route('admin.course-sub-category.index', $category->id)); ?>" class="m-1 text-white btn btn-sm btn-primary" title="sub category"> <i class="fas fa-list"></i> </a> <a href="javascript:;" data-toggle="modal" data-target="#deleteModal" class="btn btn-danger btn-sm" onclick="deleteData(<?php echo e($category->id); ?>)"><i class="fa fa-trash" aria-hidden="true"></i></a> </div> </td> </tr> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?> <?php if (isset($component)) { $__componentOriginal875c7a0bb47165de86ff51577f723b01 = $component; } ?> <?php if (isset($attributes)) { $__attributesOriginal875c7a0bb47165de86ff51577f723b01 = $attributes; } ?> <?php $component = App\View\Components\EmptyTable::resolve(['name' => __('Category'),'route' => 'admin.course-category.create','create' => 'yes','message' => __('No data found!'),'colspan' => '7'] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('empty-table'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\EmptyTable::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes([]); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__attributesOriginal875c7a0bb47165de86ff51577f723b01)): ?> <?php $attributes = $__attributesOriginal875c7a0bb47165de86ff51577f723b01; ?> <?php unset($__attributesOriginal875c7a0bb47165de86ff51577f723b01); ?> <?php endif; ?> <?php if (isset($__componentOriginal875c7a0bb47165de86ff51577f723b01)): ?> <?php $component = $__componentOriginal875c7a0bb47165de86ff51577f723b01; ?> <?php unset($__componentOriginal875c7a0bb47165de86ff51577f723b01); ?> <?php endif; ?> <?php endif; ?> </tbody> </table> </div> <div class="float-right"> <?php echo e($categories->links()); ?> </div> </div> </div> </div> </div> </div> </section> </div> <?php if (isset($component)) { $__componentOriginalaa3b824e4662c5ae30529397669d1c1d = $component; } ?> <?php if (isset($attributes)) { $__attributesOriginalaa3b824e4662c5ae30529397669d1c1d = $attributes; } ?> <?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.admin.delete-modal','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('admin.delete-modal'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes([]); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__attributesOriginalaa3b824e4662c5ae30529397669d1c1d)): ?> <?php $attributes = $__attributesOriginalaa3b824e4662c5ae30529397669d1c1d; ?> <?php unset($__attributesOriginalaa3b824e4662c5ae30529397669d1c1d); ?> <?php endif; ?> <?php if (isset($__componentOriginalaa3b824e4662c5ae30529397669d1c1d)): ?> <?php $component = $__componentOriginalaa3b824e4662c5ae30529397669d1c1d; ?> <?php unset($__componentOriginalaa3b824e4662c5ae30529397669d1c1d); ?> <?php endif; ?> <?php $__env->stopSection(); ?> <?php $__env->startPush('js'); ?> <script> function deleteData(id) { $("#deleteForm").attr("action", "<?php echo e(url('/admin/course-category/')); ?>" + "/" + id) } function changeStatus(id) { var isDemo = "<?php echo e(env('PROJECT_MODE') ?? 1); ?>" if (isDemo == 0) { toastr.error("<?php echo e(__('This Is Demo Version. You Can Not Change Anything')); ?>"); return; } $.ajax({ type: "put", data: { _token: '<?php echo e(csrf_token()); ?>', }, url: "<?php echo e(url('/admin/course-category/status-update')); ?>" + "/" + id, success: function(response) { if (response.success) { toastr.success(response.message); } else { toastr.warning(response.message); } }, error: function(xhr, status, err) { console.log(err); let errors = xhr.responseJSON.errors; $.each(errors, function (key, value) { toastr.error(value); }) } }) } </script> <?php $__env->stopPush(); ?> <?php $__env->startPush('css'); ?> <style> .dd-custom-css { position: absolute; will-change: transform; top: 0px; left: 0px; transform: translate3d(0px, -131px, 0px); } .max-h-400 { min-height: 400px; } </style> <?php $__env->stopPush(); ?> <?php echo $__env->make('admin.master_layout', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/inprosysltd/public_html/skill.inprosysltd.com/Modules/Course/resources/views/course-category/index.blade.php ENDPATH**/ ?>