Commit 4ae619e3b2428e140b1b7d14b067db26660ada06

Authored by Андрей Ларионов
Exists in master

Merge branch 'master' of http://gitlab.nologostudio.ru/alarionov/rekamore-su

Showing 1 changed file Side-by-side Diff

resources/views/chats/chats_list.blade.php
1   -@csrf
  1 +@if ($chats->count() || $admin_chat)
  2 + @csrf
2 3  
3   -@if($admin_chat)
4   - <div class="messages__item hover-shadow admin-chat-wrap">
5   - <a class="messages__item-info" href="{{ route($user_type . '.dialog', ['chat' => $admin_chat->id]) }}">
6   - @include('svg.logo_icon')
7   - <div class="messages__item-text">
8   - <div>
9   - <b>Администратор сайта</b>
10   - </div>
11   - <div>
12   - {{ $admin_chat->last_message->text }}
  4 + @if($admin_chat)
  5 + <div class="messages__item hover-shadow admin-chat-wrap">
  6 + <a class="messages__item-info" href="{{ route($user_type . '.dialog', ['chat' => $admin_chat->id]) }}">
  7 + @include('svg.logo_icon')
  8 + <div class="messages__item-text">
  9 + <div>
  10 + <b>Администратор сайта</b>
  11 + </div>
  12 + <div>
  13 + {{ $admin_chat->last_message->text }}
  14 + </div>
13 15 </div>
14   - </div>
15   - </a>
  16 + </a>
16 17  
17   - <div class="messages__item-actions" data-chat-id="{{ $admin_chat->id }}">
18   - <div class="messages__item-date max-content">{{ date(' H:i, d.m.Y', strtotime($admin_chat->created_at)) }}</div>
19   - <div class="messages__item-buttons">
20   - @if($admin_chat->admin_chat_unread_messages_count > 0)
21   - <div class="unread-messages-count mr-15">{{ $admin_chat->admin_chat_unread_messages_count }}</div>
22   - @endif
  18 + <div class="messages__item-actions" data-chat-id="{{ $admin_chat->id }}">
  19 + <div class="messages__item-date max-content">{{ date(' H:i, d.m.Y', strtotime($admin_chat->created_at)) }}</div>
  20 + <div class="messages__item-buttons">
  21 + @if($admin_chat->admin_chat_unread_messages_count > 0)
  22 + <div class="unread-messages-count mr-15">{{ $admin_chat->admin_chat_unread_messages_count }}</div>
  23 + @endif
  24 + </div>
23 25 </div>
24 26 </div>
25   - </div>
26   -@endif
  27 + @endif
27 28  
28   -@if ($chats->count())
  29 + @if ($chats->count())
29 30 @foreach($chats as $chat)
30 31 <div class="messages__item hover-shadow {{ intval($chat->is_fixed) == 1 ? 'chat-fixed' : '' }}">
31 32 <a class="messages__item-info" href="{{ route($user_type . '.dialog', ['chat' => $chat->id]) }}">
... ... @@ -77,6 +78,7 @@
77 78 <div style="margin-top: 20px">
78 79 {{ $chats->onEachSide(0)->appends($_GET)->links('paginate') }}
79 80 </div><!-- конец -->
  81 + @endif
80 82 @else
81 83 <div class="notify">
82 84 <svg>