index.blade.php 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. @extends('backend.layouts.app')
  2. @section('content')
  3. <div class="card">
  4. <div class="card-header">
  5. <h5 class="mb-0 h6">{{translate('Conversations')}}</h5>
  6. </div>
  7. <div class="card-body">
  8. <table class="table aiz-table mb-0" cellspacing="0" width="100%">
  9. <thead>
  10. <tr>
  11. <th data-breakpoints="lg">#</th>
  12. <th data-breakpoints="lg">{{ translate('Date') }}</th>
  13. <th data-breakpoints="lg">{{translate('Title')}}</th>
  14. <th>{{translate('Sender')}}</th>
  15. <th>{{translate('Receiver')}}</th>
  16. <th width="10%">{{translate('Options')}}</th>
  17. </tr>
  18. </thead>
  19. <tbody>
  20. @foreach ($conversations as $key => $conversation)
  21. <tr>
  22. <td>{{$key+1}}</td>
  23. <td>{{ $conversation->created_at }}</td>
  24. <td>{{ $conversation->title }}</td>
  25. <td>
  26. @if ($conversation->sender != null)
  27. {{ $conversation->sender->name }}
  28. @if ($conversation->receiver_viewed == 0)
  29. <span class="badge badge-inline badge-info">{{ translate('New') }}</span>
  30. @endif
  31. @endif
  32. </td>
  33. <td>
  34. @if ($conversation->receiver != null)
  35. {{ $conversation->receiver->name }}
  36. @if ($conversation->sender_viewed == 0)
  37. <span class="badge badge-inline badge-info">{{ translate('New') }}</span>
  38. @endif
  39. @endif
  40. </td>
  41. <td class="text-right">
  42. <a class="btn btn-soft-primary btn-icon btn-circle btn-sm" href="{{route('conversations.admin_show', encrypt($conversation->id))}}" title="{{ translate('View') }}">
  43. <i class="las la-eye"></i>
  44. </a>
  45. <a href="#" class="btn btn-soft-danger btn-icon btn-circle btn-sm confirm-delete" data-href="{{route('conversations.destroy', encrypt($conversation->id))}}" title="{{ translate('Delete') }}">
  46. <i class="las la-trash"></i>
  47. </a>
  48. </td>
  49. </tr>
  50. @endforeach
  51. </tbody>
  52. </table>
  53. </div>
  54. </div>
  55. @endsection
  56. @section('modal')
  57. @include('modals.delete_modal')
  58. @endsection