f6bf0da52e9b3a61abc36b06c80dc2d9f09c0393.php 5.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <?php $__env->startSection('panel_content'); ?>
  2. <div class="aiz-titlebar mt-2 mb-4">
  3. <div class="row align-items-center">
  4. <div class="col-md-6">
  5. <b class="h4"><?php echo e(translate('Conversations')); ?></b>
  6. </div>
  7. </div>
  8. </div>
  9. <div class="card">
  10. <div class="card-body">
  11. <ul class="list-group list-group-flush">
  12. <?php $__currentLoopData = $conversations; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $conversation): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
  13. <?php if($conversation->receiver != null && $conversation->sender != null): ?>
  14. <li class="list-group-item px-0">
  15. <div class="row gutters-10">
  16. <div class="col-auto">
  17. <div class="media">
  18. <span class="avatar avatar-sm flex-shrink-0">
  19. <?php if(Auth::user()->id == $conversation->sender_id): ?>
  20. <img <?php if($conversation->receiver->avatar_original == null): ?> src="<?php echo e(static_asset('assets/img/avatar-place.png')); ?>" <?php else: ?> src="<?php echo e(uploaded_asset($conversation->receiver->avatar_original)); ?>" <?php endif; ?> onerror="this.onerror=null;this.src='<?php echo e(static_asset('assets/img/avatar-place.png')); ?>';">
  21. <?php else: ?>
  22. <img <?php if($conversation->sender->avatar_original == null): ?> src="<?php echo e(static_asset('assets/img/avatar-place.png')); ?>" <?php else: ?> src="<?php echo e(uploaded_asset($conversation->sender->avatar_original)); ?>" <?php endif; ?> class="rounded-circle" onerror="this.onerror=null;this.src='<?php echo e(static_asset('assets/img/avatar-place.png')); ?>';">
  23. <?php endif; ?>
  24. </span>
  25. </div>
  26. </div>
  27. <div class="col-auto col-lg-3">
  28. <p>
  29. <?php if(Auth::user()->id == $conversation->sender_id): ?>
  30. <span class="fw-600"><?php echo e($conversation->receiver->name); ?></span>
  31. <?php else: ?>
  32. <span class="fw-600"><?php echo e($conversation->sender->name); ?></span>
  33. <?php endif; ?>
  34. <br>
  35. <span class="opacity-50">
  36. <?php echo e(date('h:i:m d-m-Y', strtotime($conversation->messages->last()->created_at))); ?>
  37. </span>
  38. </p>
  39. </div>
  40. <div class="col-12 col-lg">
  41. <div class="block-body">
  42. <div class="block-body-inner pb-3">
  43. <div class="row no-gutters">
  44. <div class="col">
  45. <h6 class="mt-0">
  46. <a href="<?php echo e(route('conversations.show', encrypt($conversation->id))); ?>" class="text-dark fw-600">
  47. <?php echo e($conversation->title); ?>
  48. </a>
  49. <?php if((Auth::user()->id == $conversation->sender_id && $conversation->sender_viewed == 0) || (Auth::user()->id == $conversation->receiver_id && $conversation->receiver_viewed == 0)): ?>
  50. <span class="badge badge-inline badge-danger"><?php echo e(translate('New')); ?></span>
  51. <?php else: ?>
  52. <?php $__currentLoopData = $conversation->messages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $messages): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
  53. <?php if( $messages->updated_at == $messages->created_at && $messages->user_id != Auth::user()->id ): ?>
  54. <span class="badge badge-danger badge-circle badge-sm badge-dot"> </span>
  55. <?php break; ?>
  56. <?php endif; ?>
  57. <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
  58. <?php endif; ?>
  59. </h6>
  60. </div>
  61. </div>
  62. <p class="mb-0 opacity-50">
  63. <?php echo e($conversation->messages->last()->message); ?>
  64. </p>
  65. </div>
  66. </div>
  67. </div>
  68. </div>
  69. </li>
  70. <?php endif; ?>
  71. <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
  72. </ul>
  73. </div>
  74. </div>
  75. <div class="aiz-pagination">
  76. <?php echo e($conversations->links()); ?>
  77. </div>
  78. <?php $__env->stopSection(); ?>
  79. <?php echo $__env->make('frontend.layouts.user_panel', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /www/wwwroot/www.easybuyjp.shop/resources/views/frontend/user/conversations/index.blade.php ENDPATH**/ ?>