99e9646984cfce51d6973be917f4074639d60ca8.php 5.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <?php $__env->startSection('panel_content'); ?>
  2. <div class="card">
  3. <div class="card-header">
  4. <h5 class="mb-0 h6"><?php echo e(translate('Product Reviews')); ?></h5>
  5. </div>
  6. <div class="card-body">
  7. <table class="table aiz-table mb-0">
  8. <thead>
  9. <tr>
  10. <th>#</th>
  11. <th><?php echo e(translate('Product')); ?></th>
  12. <th data-breakpoints="lg"><?php echo e(translate('Customer')); ?></th>
  13. <th><?php echo e(translate('Rating')); ?></th>
  14. <th data-breakpoints="lg"><?php echo e(translate('Comment')); ?></th>
  15. <th data-breakpoints="lg"><?php echo e(translate('Published')); ?></th>
  16. <th data-breakpoints="lg" class="text-right"><?php echo e(translate('Options')); ?></th>
  17. </tr>
  18. </thead>
  19. <tbody>
  20. <?php $__currentLoopData = $reviews; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
  21. <?php
  22. $review = \App\Models\Review::find($value->id);
  23. ?>
  24. <?php if($review != null && $review->product != null && $review->user != null): ?>
  25. <tr>
  26. <td>
  27. <?php echo e($key+1); ?>
  28. </td>
  29. <td>
  30. <a href="<?php echo e(route('product', $review->product->slug)); ?>" target="_blank"><?php echo e($review->product->getTranslation('name')); ?></a>
  31. </td>
  32. <td><?php echo e($review->user->name); ?></td>
  33. <td>
  34. <span class="rating rating-sm">
  35. <?php for($i=0; $i < $review->rating; $i++): ?>
  36. <i class="las la-star active"></i>
  37. <?php endfor; ?>
  38. <?php for($i=0; $i < 5-$review->rating; $i++): ?>
  39. <i class="las la-star"></i>
  40. <?php endfor; ?>
  41. </span>
  42. </td>
  43. <td><?php echo e($review->comment); ?></td>
  44. <!--<td>-->
  45. <!-- <?php if($review->status == 1): ?>-->
  46. <!-- <span class="badge badge-inline badge-success"><?php echo e(translate('Published')); ?></span>-->
  47. <!-- <?php else: ?>-->
  48. <!-- <span class="badge badge-inline badge-danger"><?php echo e(translate('Unpublished')); ?></span>-->
  49. <!-- <?php endif; ?>-->
  50. <!--</td>-->
  51. <td>
  52. <label class="aiz-switch aiz-switch-success mb-0">
  53. <input onchange="update_published(this)" value="<?php echo e($review->id); ?>" type="checkbox" <?php if($review->status == 1) echo "checked";?> >
  54. <span class="slider round"></span>
  55. </label>
  56. </td>
  57. <td class="text-right">
  58. <a class="btn btn-soft-info btn-icon btn-circle btn-sm" href="<?php echo e(route('seller.edit', ['id'=>$value->id, 'lang'=>env('DEFAULT_LANGUAGE')])); ?>" title="<?php echo e(translate('Edit')); ?>">
  59. <i class="las la-edit"></i>
  60. </a>
  61. <!--<a href="#" class="btn btn-soft-danger btn-icon btn-circle btn-sm confirm-delete" data-href="<?php echo e(route('seller.del', $value->id)); ?>" title="<?php echo e(translate('Delete')); ?>">-->
  62. <!-- <i class="las la-trash"></i>-->
  63. <!--</a>-->
  64. </td>
  65. </tr>
  66. <?php endif; ?>
  67. <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
  68. </tbody>
  69. </table>
  70. <div class="aiz-pagination">
  71. <?php echo e($reviews->links()); ?>
  72. </div>
  73. </div>
  74. </div>
  75. <?php $__env->stopSection(); ?>
  76. <?php $__env->startSection('script'); ?>
  77. <script type="text/javascript">
  78. function update_published(el){
  79. if(el.checked){
  80. var status = 1;
  81. }
  82. else{
  83. var status = 0;
  84. }
  85. $.post('<?php echo e(route('seller.updateStatus')); ?>', {_token:'<?php echo e(csrf_token()); ?>', id:el.value, status:status}, function(data){
  86. if(data == 1){
  87. AIZ.plugins.notify('success', '<?php echo e(translate('updated successfully')); ?>');
  88. }
  89. });
  90. }
  91. </script>
  92. <?php $__env->stopSection(); ?>
  93. <?php echo $__env->make('seller.layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /www/wwwroot/www.easybuyjp.shop/resources/views/seller/reviews.blade.php ENDPATH**/ ?>