@if (count($conversations)) @php if (empty($folder)) { // Create dummy folder $folder = new App\Folder(); $folder->type = App\Folder::TYPE_ASSIGNED; } // Preload users and customers App\Conversation::loadUsers($conversations); App\Conversation::loadCustomers($conversations); // Get information on viewers if (empty($no_checkboxes)) { $viewers = App\Conversation::getViewersInfo($conversations, ['id', 'first_name', 'last_name'], [Auth::user()->id]); } $conversations = \Eventy::filter('conversations_table.preload_table_data', $conversations); $show_assigned = ($folder->type == App\Folder::TYPE_ASSIGNED || $folder->type == App\Folder::TYPE_CLOSED || !array_key_exists($folder->type, App\Folder::$types)); if (!isset($params)) { $params = []; } // Sorting. $sorting = App\Conversation::getConvTableSorting(); // Build columns list $columns = ['current']; if (empty($no_checkboxes)) { $columns[] = 'cb'; } if (empty($no_customer)) { $columns[] = 'customer'; } $columns[] = 'attachment'; $columns[] = 'subject'; $columns[] = 'count'; if ($show_assigned) { $columns[] = 'assignee'; } $columns[] = 'number'; $columns[] = 'date'; $col_counter = 6; @endphp @if (!request()->get('page')) @include('/conversations/partials/bulk_actions') @endif $param_value) data-param_{{ $param_name }}="{{ $param_value }}" @endforeach @if (!empty($conversations_filter)) @foreach ($conversations_filter as $filter_field => $filter_value) data-filter_{{ $filter_field }}="{{ $filter_value }}" @endforeach @endif @foreach ($sorting as $sorting_name => $sorting_value) data-sorting_{{ $sorting_name }}="{{ $sorting_value }}" @endforeach > {{-- todo: without this column table becomes not 100% wide --}} @if (empty($no_checkboxes))@php $col_counter++ ; @endphp@endif @if (empty($no_customer))@php $col_counter++ ; @endphp@endif @if ($show_assigned) @php $col_counter++ ; @endphp @endif @action('conversations_table.col_before_conv_number') @if (empty($no_checkboxes))@endif @if (empty($no_customer)) @endif @if ($show_assigned) {{----}} @endif @action('conversations_table.th_before_conv_number') @foreach ($conversations as $conversation) @if (empty($no_checkboxes))@else@endif @if (empty($no_checkboxes)) @endif @if (empty($no_customer)) @else {{-- Displayed in customer conversation history --}} @endif @if ($show_assigned) @endif @action('conversations_table.td_before_conv_number', $conversation) @action('conversations_table.after_row', $conversation, $columns, $col_counter) @endforeach
  {{ __("Customer") }}   {{ __("Conversation") }} @if ($sorting['sort_by'] == 'subject' && $sorting['order'] =='desc')↑@endif @if ($sorting['sort_by'] == 'subject' && $sorting['order'] =='asc')↓@endif {{ __("Assigned To") }} {{ __("Assigned To") }} {{ __("Number") }} @if ($sorting['sort_by'] == 'number' && $sorting['order'] =='desc')↑@endif @if ($sorting['sort_by'] == 'number' && $sorting['order'] =='asc')↓@endif @if ($folder->type == App\Folder::TYPE_CLOSED){{ __("Closed") }}@elseif ($folder->type == App\Folder::TYPE_DRAFTS){{ __("Last Updated") }}@elseif ($folder->type == App\Folder::TYPE_DELETED){{ __("Deleted") }}@else{{ \Eventy::filter('conversations_table.column_title_date', __("Waiting Since"), $folder) }}@endif @if ($sorting['sort_by'] == 'date' && $sorting['order'] == 'desc')↑@elseif ($sorting['sort_by'] == 'date' && $sorting['order'] == 'asc')↓@elseif ($sorting['sort_by'] == '' && $sorting['order'] =='')↓@endif
@if (!empty($viewers[$conversation->id]))
@endif
@if ($conversation->customer_id && $conversation->customer){{ $conversation->customer->getFullName(true)}}@endif @if ($conversation->threads_count > 1){{ $conversation->threads_count }}@endif @if ($conversation->user_id) {{ $conversation->user->getFullName() }} @endif @if ($conversation->user_id)   {{ $conversation->user->getFullName() }} @endif @if ($conversation->has_attachments) @else   @endif x_embed) || !empty($params['target_blank'])) target="_blank"@endif>

@if ($conversation->has_attachments) @endif @if ($conversation->isPhone()) @endif @include('conversations/partials/badges'){{ '' }}@if ($conversation->isChat() && $conversation->getChannelName()) {{ $conversation->getChannelName() }}@endif{{ '' }}@action('conversations_table.before_subject', $conversation){{ $conversation->getSubject() }}@action('conversations_table.after_subject', $conversation)

@action('conversations_table.preview_prepend', $conversation)@if (!empty($params['show_mailbox']))[{{ $conversation->mailbox_cached->name }}]
@endif{{ '' }}@if ($conversation->preview){{ $conversation->preview }}@else @endif

{{--@if ($conversation->threads_count <= 1) @else{{ $conversation->threads_count }}@endif--}} @if ($conversation->user_id) {{ $conversation->user->getFullName() }} @else  @endif #{{ $conversation->number }} type, [App\Folder::TYPE_CLOSED, App\Folder::TYPE_DRAFTS, App\Folder::TYPE_DELETED])) data-toggle="tooltip" data-html="true" data-placement="left" title="{{ $conversation->getDateTitle() }}"@else title="{{ __('View conversation') }}" @endif @if (!empty($params['target_blank'])) target="_blank" @endif>{{ $conversation->getWaitingSince($folder) }}
@if ($conversations->total()) {!! __(':count conversations', ['count' => ''.$conversations->total().'']) !!} |  @endif @if (isset($folder->active_count) && !$folder->isIndirect()) {{ $folder->getActiveCount() }} {{ __('active') }} |  @endif @if ($conversations) {{ $conversations->firstItem() }}-{{ $conversations->lastItem() }} @endif
@if ($conversations) {{ $conversations->links('conversations/conversations_pagination') }} @endif
@else @include('partials/empty', ['empty_text' => __('There are no conversations here')]) @endif @section('javascript') @parent conversationsTableInit(); @endsection