Commit 48baec8daef40db6c32da205a0fa924c25583992

Authored by Андрей Ларионов
1 parent e4a225e472

Коммит добавление картинки

Showing 2 changed files with 16 additions and 13 deletions Inline Diff

resources/views/employers/messages.blade.php
1 @extends('layout.frontend', ['title' => 'Сообщения от пользователей - РекаМоре']) 1 @extends('layout.frontend', ['title' => 'Сообщения от пользователей - РекаМоре'])
2 @section('scripts') 2 @section('scripts')
3 <script> 3 <script>
4 console.log('Test system'); 4 console.log('Test system');
5 $(document).on('change', '#sort_ajax', function() { 5 $(document).on('change', '#sort_ajax', function() {
6 var this_ = $(this); 6 var this_ = $(this);
7 var val_ = this_.val(); 7 var val_ = this_.val();
8 console.log('sort items '+val_); 8 console.log('sort items '+val_);
9 9
10 $.ajax({ 10 $.ajax({
11 type: "GET", 11 type: "GET",
12 url: "{{ route('shipping_companies') }}", 12 url: "{{ route('shipping_companies') }}",
13 data: "sort="+val_+"&block=1", 13 data: "sort="+val_+"&block=1",
14 success: function (data) { 14 success: function (data) {
15 console.log('Выбор сортировки'); 15 console.log('Выбор сортировки');
16 console.log(data); 16 console.log(data);
17 $('#block_1').html(data); 17 $('#block_1').html(data);
18 }, 18 },
19 headers: { 19 headers: {
20 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') 20 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
21 }, 21 },
22 error: function (data) { 22 error: function (data) {
23 data = JSON.stringify(data); 23 data = JSON.stringify(data);
24 console.log('Error: ' + data); 24 console.log('Error: ' + data);
25 } 25 }
26 }); 26 });
27 27
28 $.ajax({ 28 $.ajax({
29 type: "GET", 29 type: "GET",
30 url: "{{ route('shipping_companies') }}", 30 url: "{{ route('shipping_companies') }}",
31 data: "sort="+val_+"&block=2", 31 data: "sort="+val_+"&block=2",
32 success: function (data) { 32 success: function (data) {
33 console.log('Выбор сортировки2'); 33 console.log('Выбор сортировки2');
34 console.log(data); 34 console.log(data);
35 history.pushState({}, '', "{{ route('shipping_companies') }}?sort="+val_+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif"); 35 history.pushState({}, '', "{{ route('shipping_companies') }}?sort="+val_+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif");
36 $('#block_2').html(data); 36 $('#block_2').html(data);
37 }, 37 },
38 headers: { 38 headers: {
39 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') 39 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
40 }, 40 },
41 error: function (data) { 41 error: function (data) {
42 data = JSON.stringify(data); 42 data = JSON.stringify(data);
43 console.log('Error: ' + data); 43 console.log('Error: ' + data);
44 } 44 }
45 }); 45 });
46 }); 46 });
47 </script> 47 </script>
48 @endsection 48 @endsection
49 49
50 @section('content') 50 @section('content')
51 <section class="cabinet"> 51 <section class="cabinet">
52 <div class="container"> 52 <div class="container">
53 <ul class="breadcrumbs cabinet__breadcrumbs"> 53 <ul class="breadcrumbs cabinet__breadcrumbs">
54 <li><a href="{{ route('index') }}">Главная</a></li> 54 <li><a href="{{ route('index') }}">Главная</a></li>
55 <li><b>Личный кабинет</b></li> 55 <li><b>Личный кабинет</b></li>
56 </ul> 56 </ul>
57 <div class="cabinet__wrapper"> 57 <div class="cabinet__wrapper">
58 <div class="cabinet__side"> 58 <div class="cabinet__side">
59 <div class="cabinet__side-toper"> 59 <div class="cabinet__side-toper">
60 @include('employers.emblema') 60 @include('employers.emblema')
61 </div> 61 </div>
62 62
63 63
64 @include('employers.menu', ['item' => 5]) 64 @include('employers.menu', ['item' => 5])
65 </div> 65 </div>
66 66
67 <div class="cabinet__body"> 67 <div class="cabinet__body">
68 <div class="cabinet__body-item"> 68 <div class="cabinet__body-item">
69 <h2 class="title cabinet__title">Сообщения</h2> 69 <h2 class="title cabinet__title">Сообщения</h2>
70 </div> 70 </div>
71 <div class="cabinet__body-item"> 71 <div class="cabinet__body-item">
72 <div class="cabinet__filters"> 72 <div class="cabinet__filters">
73 <div class="cabinet__filters-item"> 73 <div class="cabinet__filters-item">
74 <div class="cabinet__filters-buttons"> 74 <div class="cabinet__filters-buttons">
75 <a href="{{ route('employer.messages', ['type_message' => 'input']) }}" class="button button_light @if ($type_message == 'input') active @endif">Входящие ({{ $count_input }})</a> 75 <a href="{{ route('employer.messages', ['type_message' => 'input']) }}" class="button button_light @if ($type_message == 'input') active @endif">Входящие ({{ $count_input }})</a>
76 <a href="{{ route('employer.messages', ['type_message' => 'output']) }}" class="button button_light @if ($type_message == 'output') active @endif">Исходящие ({{ $count_output }})</a> 76 <a href="{{ route('employer.messages', ['type_message' => 'output']) }}" class="button button_light @if ($type_message == 'output') active @endif">Исходящие ({{ $count_output }})</a>
77 </div> 77 </div>
78 </div> 78 </div>
79 <!--<div class="cabinet__filters-item"> 79 <!--<div class="cabinet__filters-item">
80 <div class="select"> 80 <div class="select">
81 <select class="js-select2" id="sort_ajax" name="sort_ajax"> 81 <select class="js-select2" id="sort_ajax" name="sort_ajax">
82 <option value="default">Сортировка (по умолчанию)</option> 82 <option value="default">Сортировка (по умолчанию)</option>
83 <option value="name (asc)">По имени (возрастание)</option> 83 <option value="name (asc)">По имени (возрастание)</option>
84 <option value="name (desc)">По имени (убывание)</option> 84 <option value="name (desc)">По имени (убывание)</option>
85 <option value="created_at (asc)">По дате (возрастание)</option> 85 <option value="created_at (asc)">По дате (возрастание)</option>
86 <option value="created_at (desc)">По дате (убывание)</option> 86 <option value="created_at (desc)">По дате (убывание)</option>
87 </select> 87 </select>
88 </div> 88 </div>
89 </div>--> 89 </div>-->
90 </div> 90 </div>
91 <div class="messages"> 91 <div class="messages">
92 <!--<button type="button" class="messages__button js-toggle js-parent-toggle button button_light button_more"> 92 <!--<button type="button" class="messages__button js-toggle js-parent-toggle button button_light button_more">
93 <span>Показать ещё</span> 93 <span>Показать ещё</span>
94 <span>Скрыть</span> 94 <span>Скрыть</span>
95 </button>--> 95 </button>-->
96 <div class="messages__body"> 96 <div class="messages__body">
97 @if ($messages->count()) 97 @if ($messages->count())
98 @foreach($messages as $it) 98 @foreach($messages as $it)
99 <div class="messages__item"> 99 <div class="messages__item">
100 <div class="messages__item-info"> 100 <div class="messages__item-info">
101 <div class="messages__item-photo"> 101 <div class="messages__item-photo">
102 <svg> 102 <svg>
103 <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use> 103 <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use>
104 </svg> 104 </svg>
105 105
106
106 @if ($type_message == 'input') 107 @if ($type_message == 'input')
107 @if ($it->user_to->is_worker) 108 @if ($it->user_to->is_worker)
108 @if (isset($it->user_to->workers->phote)) 109 @if (isset($it->user_to->workers->photo))
109 <img src="{{ asset(Storage::url($it->user_to->workers->phote)) }}" alt=""> 110 <img src="{{ asset(Storage::url($it->user_to->workers->photo)) }}" alt="">
111 @elseif(isset($it->user_to->file))
112 <img src="{{ asset(Storage::url($it->user_to->file)) }}" alt="">
110 @else 113 @else
111 <img src="{{ asset('images/default_man.jpg') }}" alt=""> 114 <img src="{{ asset('images/default_man.jpg') }}" alt="">
112 @endif 115 @endif
113 @else 116 @else
114 @if (isset($it->user_to->employers->logo)) 117 @if (isset($it->user_to->employers->logo))
115 <img src="{{ asset(Storage::url($it->user_to->employers->logo)) }}" alt=""> 118 <img src="{{ asset(Storage::url($it->user_to->employers->logo)) }}" alt="">
116 @else 119 @else
117 <img src="{{ asset('images/default_man.jpg') }}" alt=""> 120 <img src="{{ asset('images/default_man.jpg') }}" alt="">
118 @endif 121 @endif
119 @endif 122 @endif
120 @endif 123 @endif
121 124
122 @if ($type_message == 'output') 125 @if ($type_message == 'output')
123 @if ($it->user_from->is_worker) 126 @if ($it->user_from->is_worker)
124 @if (isset($it->user_from->workers->phote)) 127 @if (isset($it->user_from->workers->photo))
125 <img src="{{ asset(Storage::url($it->user_from->workers->phote)) }}" alt=""> 128 <img src="{{ asset(Storage::url($it->user_from->workers->photo)) }}" alt="">
126 @else 129 @else
127 <img src="{{ asset('images/default_man.jpg') }}" alt=""> 130 <img src="{{ asset('images/default_man.jpg') }}" alt="">
128 @endif 131 @endif
129 @else 132 @else
130 @if (isset($it->user_from->employers->logo)) 133 @if (isset($it->user_from->employers->logo))
131 <img src="{{ asset(Storage::url($it->user_from->employers->logo)) }}" alt=""> 134 <img src="{{ asset(Storage::url($it->user_from->employers->logo)) }}" alt="">
132 @else 135 @else
133 <img src="{{ asset('images/default_man.jpg') }}" alt=""> 136 <img src="{{ asset('images/default_man.jpg') }}" alt="">
134 @endif 137 @endif
135 @endif 138 @endif
136 @endif 139 @endif
137 </div> 140 </div>
138 <div class="messages__item-text"> 141 <div class="messages__item-text">
139 <div> 142 <div>
140 От: @if (isset($it->user_from)) 143 От: @if (isset($it->user_from))
141 @if ($it->user_from->id !== $user_id) 144 @if ($it->user_from->id !== $user_id)
142 <!--<a href=" route('employer.dialog', ['user1' => $user_id, 'user2' => $it->user_from->id]) }}" style="text-decoration: underline">--> 145 <!--<a href=" route('employer.dialog', ['user1' => $user_id, 'user2' => $it->user_from->id]) }}" style="text-decoration: underline">-->
143 {{ $it->user_from->surname." ".$it->user_from->name_man." ".$it->user_from->surname2." (".$it->user_from->id.")" }} 146 {{ $it->user_from->surname." ".$it->user_from->name_man." ".$it->user_from->surname2." (".$it->user_from->id.")" }}
144 <!--</a>--> 147 <!--</a>-->
145 @else 148 @else
146 {{ $it->user_from->surname." ".$it->user_from->name_man." ".$it->user_from->surname2." (".$it->user_from->id.")" }} 149 {{ $it->user_from->surname." ".$it->user_from->name_man." ".$it->user_from->surname2." (".$it->user_from->id.")" }}
147 @endif 150 @endif
148 @else 151 @else
149 Удаленный пользователь 152 Удаленный пользователь
150 @endif 153 @endif
151 <br> 154 <br>
152 К: @if (isset($it->user_to)) 155 К: @if (isset($it->user_to))
153 @if ($it->user_to->id !== $user_id) 156 @if ($it->user_to->id !== $user_id)
154 <!--<a href=" route('employer.dialog', ['user1' => $user_id, 'user2' => $it->user_to->id]) }}" style="text-decoration: underline">--> 157 <!--<a href=" route('employer.dialog', ['user1' => $user_id, 'user2' => $it->user_to->id]) }}" style="text-decoration: underline">-->
155 {{ $it->user_to->surname." ".$it->user_to->name_man." ".$it->user_to->surname2." (".$it->user_to->id.")" }} 158 {{ $it->user_to->surname." ".$it->user_to->name_man." ".$it->user_to->surname2." (".$it->user_to->id.")" }}
156 <!--</a>--> 159 <!--</a>-->
157 @else 160 @else
158 {{ $it->user_to->surname." ".$it->user_to->name_man." ".$it->user_to->surname2." (".$it->user_to->id.")" }} 161 {{ $it->user_to->surname." ".$it->user_to->name_man." ".$it->user_to->surname2." (".$it->user_to->id.")" }}
159 @endif 162 @endif
160 @else 163 @else
161 Удаленный пользователь 164 Удаленный пользователь
162 @endif 165 @endif
163 </div> 166 </div>
164 <div> 167 <div>
165 <span>Вакансия: </span> 168 <span>Вакансия: </span>
166 @if (isset($it->user_from)) 169 @if (isset($it->user_from))
167 @if ($it->user_from->id !== $user_id) 170 @if ($it->user_from->id !== $user_id)
168 @if (isset($it->vacancies)) 171 @if (isset($it->vacancies))
169 <a href="{{ route('employer.dialog', ['user1' => $user_id, 'user2' => $it->user_from->id, 'ad_employer' => $it->vacancies->id, 'ad_name' => $it->vacancies->name ]) }}" style="text-decoration: underline"> 172 <a href="{{ route('employer.dialog', ['user1' => $user_id, 'user2' => $it->user_from->id, 'ad_employer' => $it->vacancies->id, 'ad_name' => $it->vacancies->name ]) }}" style="text-decoration: underline">
170 {{ $it->vacancies->name." (".($it->vacancies->id).")" }} 173 {{ $it->vacancies->name." (".($it->vacancies->id).")" }}
171 </a> 174 </a>
172 @else 175 @else
173 <a href="{{ route('employer.dialog', ['user1' => $user_id, 'user2' => $it->user_from->id, 'ad_employer' => 0, 'ad_name' => 'Не указана вакансия' ]) }}" style="text-decoration: underline"> 176 <a href="{{ route('employer.dialog', ['user1' => $user_id, 'user2' => $it->user_from->id, 'ad_employer' => 0, 'ad_name' => 'Не указана вакансия' ]) }}" style="text-decoration: underline">
174 Вакансия не указана 177 Вакансия не указана
175 </a> 178 </a>
176 @endif 179 @endif
177 @else 180 @else
178 181
179 @endif 182 @endif
180 @endif 183 @endif
181 184
182 @if (isset($it->user_to)) 185 @if (isset($it->user_to))
183 @if ($it->user_to->id !== $user_id) 186 @if ($it->user_to->id !== $user_id)
184 @if (isset($it->vacancies)) 187 @if (isset($it->vacancies))
185 <a href="{{ route('employer.dialog', ['user1' => $user_id, 'user2' => $it->user_to->id, 'ad_employer' => $it->vacancies->id, 'ad_name' => $it->vacancies->name ]) }}" style="text-decoration: underline"> 188 <a href="{{ route('employer.dialog', ['user1' => $user_id, 'user2' => $it->user_to->id, 'ad_employer' => $it->vacancies->id, 'ad_name' => $it->vacancies->name ]) }}" style="text-decoration: underline">
186 {{ $it->vacancies->name." (".($it->vacancies->id).")" }} 189 {{ $it->vacancies->name." (".($it->vacancies->id).")" }}
187 </a> 190 </a>
188 @else 191 @else
189 <a href="{{ route('employer.dialog', ['user1' => $user_id, 'user2' => $it->user_to->id, 'ad_employer' => 0, 'ad_name' => 'Не указана вакансия' ]) }}" style="text-decoration: underline"> 192 <a href="{{ route('employer.dialog', ['user1' => $user_id, 'user2' => $it->user_to->id, 'ad_employer' => 0, 'ad_name' => 'Не указана вакансия' ]) }}" style="text-decoration: underline">
190 Вакансия не указана 193 Вакансия не указана
191 </a> 194 </a>
192 @endif 195 @endif
193 @else 196 @else
194 197
195 @endif 198 @endif
196 @endif 199 @endif
197 200
198 </div> 201 </div>
199 <div><span>Текст:</span>{{ $it->text }}</div> 202 <div><span>Текст:</span>{{ $it->text }}</div>
200 </div> 203 </div>
201 </div> 204 </div>
202 205
203 <div class="messages__item-date">{{ $it->created_at }}</div> 206 <div class="messages__item-date">{{ $it->created_at }}</div>
204 </div> 207 </div>
205 @endforeach 208 @endforeach
206 <div style="margin-top: 20px"> 209 <div style="margin-top: 20px">
207 {{ $messages->onEachSide(0)->appends($_GET)->links('paginate') }} 210 {{ $messages->onEachSide(0)->appends($_GET)->links('paginate') }}
208 </div><!-- конец --> 211 </div><!-- конец -->
209 @else 212 @else
210 <div class="notify"> 213 <div class="notify">
211 <svg> 214 <svg>
212 <use xlink:href="{{ asset('images/sprite.svg#i') }}"></use> 215 <use xlink:href="{{ asset('images/sprite.svg#i') }}"></use>
213 </svg> 216 </svg>
214 <span>Сообщений не найдено</span> 217 <span>Сообщений не найдено</span>
215 </div> 218 </div>
216 @endif 219 @endif
217 </div> 220 </div>
218 </div> 221 </div>
219 </div> 222 </div>
220 </div> 223 </div>
221 </div> 224 </div>
222 </div> 225 </div>
223 </section> 226 </section>
224 </div> 227 </div>
225 @endsection 228 @endsection
226 229
resources/views/workers/messages.blade.php
1 @extends('layout.frontend', ['title' => 'Мои сообщения - РекаМоре']) 1 @extends('layout.frontend', ['title' => 'Мои сообщения - РекаМоре'])
2 2
3 @section('scripts') 3 @section('scripts')
4 4
5 @endsection 5 @endsection
6 6
7 @section('content') 7 @section('content')
8 <section class="cabinet"> 8 <section class="cabinet">
9 <div class="container"> 9 <div class="container">
10 <ul class="breadcrumbs cabinet__breadcrumbs"> 10 <ul class="breadcrumbs cabinet__breadcrumbs">
11 <li><a href="{{ route('index') }}">Главная</a></li> 11 <li><a href="{{ route('index') }}">Главная</a></li>
12 <li><b>Личный кабинет</b></li> 12 <li><b>Личный кабинет</b></li>
13 </ul> 13 </ul>
14 <div class="cabinet__wrapper"> 14 <div class="cabinet__wrapper">
15 <div class="cabinet__side"> 15 <div class="cabinet__side">
16 <div class="cabinet__side-toper"> 16 <div class="cabinet__side-toper">
17 @include('workers.emblema') 17 @include('workers.emblema')
18 18
19 </div> 19 </div>
20 20
21 @include('workers.menu', ['item' => 2]) 21 @include('workers.menu', ['item' => 2])
22 </div> 22 </div>
23 <div class="cabinet__body"> 23 <div class="cabinet__body">
24 <div class="cabinet__body-item"> 24 <div class="cabinet__body-item">
25 <h2 class="title cabinet__title">Сообщения</h2> 25 <h2 class="title cabinet__title">Сообщения</h2>
26 </div> 26 </div>
27 <div class="cabinet__body-item"> 27 <div class="cabinet__body-item">
28 <div class="cabinet__filters"> 28 <div class="cabinet__filters">
29 <div class="cabinet__filters-item"> 29 <div class="cabinet__filters-item">
30 <div class="cabinet__filters-buttons"> 30 <div class="cabinet__filters-buttons">
31 <a href="{{ route('worker.messages', ['type_message' => 'input']) }}" class="button button_light @if ($type_message == 'input') active @endif">Входящие ({{ $count_input }})</a> 31 <a href="{{ route('worker.messages', ['type_message' => 'input']) }}" class="button button_light @if ($type_message == 'input') active @endif">Входящие ({{ $count_input }})</a>
32 <a href="{{ route('worker.messages', ['type_message' => 'output']) }}" class="button button_light @if ($type_message == 'output') active @endif">Исходящие ({{ $count_output }})</a> 32 <a href="{{ route('worker.messages', ['type_message' => 'output']) }}" class="button button_light @if ($type_message == 'output') active @endif">Исходящие ({{ $count_output }})</a>
33 </div> 33 </div>
34 </div> 34 </div>
35 <!--<div class="cabinet__filters-item"> 35 <!--<div class="cabinet__filters-item">
36 <div class="select"> 36 <div class="select">
37 <select class="js-select2" id="sort_ajax" name="sort_ajax"> 37 <select class="js-select2" id="sort_ajax" name="sort_ajax">
38 <option value="default">Сортировка (по умолчанию)</option> 38 <option value="default">Сортировка (по умолчанию)</option>
39 <option value="name (asc)">По имени (возрастание)</option> 39 <option value="name (asc)">По имени (возрастание)</option>
40 <option value="name (desc)">По имени (убывание)</option> 40 <option value="name (desc)">По имени (убывание)</option>
41 <option value="created_at (asc)">По дате (возрастание)</option> 41 <option value="created_at (asc)">По дате (возрастание)</option>
42 <option value="created_at (desc)">По дате (убывание)</option> 42 <option value="created_at (desc)">По дате (убывание)</option>
43 </select> 43 </select>
44 </div> 44 </div>
45 </div>--> 45 </div>-->
46 </div> 46 </div>
47
48 @if ($messages->count()) 47 @if ($messages->count())
49 @foreach($messages as $it) 48 @foreach($messages as $it)
50 <div class="messages__item"> 49 <div class="messages__item">
51 <div class="messages__item-info"> 50 <div class="messages__item-info">
51 <!--<pre> print_r(asset(Storage::url($it->user_from->employers[0]->logo))) }}</pre>-->
52 <div class="messages__item-photo"> 52 <div class="messages__item-photo">
53 <svg> 53 <svg>
54 <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use> 54 <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use>
55 </svg> 55 </svg>
56 56
57 @if ($type_message == 'input') 57 @if ($type_message == 'input')
58 @if ($it->user_to->is_worker) 58 @if ($it->user_from->is_worker)
59 @if (isset($it->user_to->workers->phote)) 59 @if (isset($it->user_from->workers[0]->photo))
60 <img src="{{ asset(Storage::url($it->user_to->workers->phote)) }}" alt=""> 60 <img src="{{ asset(Storage::url($it->user_to->workers[0]->photo)) }}" alt="">
61 @else 61 @else
62 <img src="{{ asset('images/default_man.jpg') }}" alt=""> 62 <img src="{{ asset('images/default_man.jpg') }}" alt="">
63 @endif 63 @endif
64 @else 64 @else
65 @if (isset($it->user_to->employers->logo)) 65 @if (isset($it->user_from->employers[0]->logo))
66 <img src="{{ asset(Storage::url($it->user_to->employers->logo)) }}" alt=""> 66 <img src="{{ asset(Storage::url($it->user_from->employers[0]->logo)) }}" alt="">
67 @else 67 @else
68 <img src="{{ asset('images/default_man.jpg') }}" alt=""> 68 <img src=" asset('images/default_man.jpg') }}" alt="">
69 @endif 69 @endif
70 @endif 70 @endif
71 @endif 71 @endif
72 72
73 @if ($type_message == 'output') 73 @if ($type_message == 'output')
74 @if ($it->user_from->is_worker) 74 @if ($it->user_from->is_worker)
75 @if (isset($it->user_from->workers->phote)) 75 @if (isset($it->user_from->workers[0]->photo))
76 <img src="{{ asset(Storage::url($it->user_from->workers->phote)) }}" alt=""> 76 <img src="{{ asset(Storage::url($it->user_from->workers[0]->photo)) }}" alt="">
77 @else 77 @else
78 <img src="{{ asset('images/default_man.jpg') }}" alt=""> 78 <img src="{{ asset('images/default_man.jpg') }}" alt="">
79 @endif 79 @endif
80 @else 80 @else
81 @if (isset($it->user_from->employers->logo)) 81 @if (isset($it->user_from->employers->logo))
82 <img src="{{ asset(Storage::url($it->user_from->employers->logo)) }}" alt=""> 82 <img src="{{ asset(Storage::url($it->user_from->employers->logo)) }}" alt="">
83 @else 83 @else
84 <img src="{{ asset('images/default_man.jpg') }}" alt=""> 84 <img src="{{ asset('images/default_man.jpg') }}" alt="">
85 @endif 85 @endif
86 @endif 86 @endif
87 @endif 87 @endif
88 </div> 88 </div>
89 <div class="messages__item-text"> 89 <div class="messages__item-text">
90 <div> 90 <div>
91 От: @if (isset($it->user_from)) 91 От: @if (isset($it->user_from))
92 @if ($it->user_from->id !== $user_id) 92 @if ($it->user_from->id !== $user_id)
93 <a href="{{ route('worker.dialog', ['user1' => $user_id, 'user2' => $it->user_from->id]) }}" style="text-decoration: underline"> 93 <a href="{{ route('worker.dialog', ['user1' => $user_id, 'user2' => $it->user_from->id]) }}" style="text-decoration: underline">
94 {{ $it->user_from->surname." ".$it->user_from->name_man." ".$it->user_from->surname2." (".$it->user_from->id.")" }} 94 {{ $it->user_from->surname." ".$it->user_from->name_man." ".$it->user_from->surname2." (".$it->user_from->id.")" }}
95 </a> 95 </a>
96 @else 96 @else
97 {{ $it->user_from->surname." ".$it->user_from->name_man." ".$it->user_from->surname2." (".$it->user_from->id.")" }} 97 {{ $it->user_from->surname." ".$it->user_from->name_man." ".$it->user_from->surname2." (".$it->user_from->id.")" }}
98 @endif 98 @endif
99 @else 99 @else
100 Удаленный пользователь 100 Удаленный пользователь
101 @endif 101 @endif
102 <br> 102 <br>
103 К: @if (isset($it->user_to)) 103 К: @if (isset($it->user_to))
104 @if ($it->user_to->id !== $user_id) 104 @if ($it->user_to->id !== $user_id)
105 <a href="{{ route('worker.dialog', ['user1' => $user_id, 'user2' => $it->user_to->id]) }}" style="text-decoration: underline"> 105 <a href="{{ route('worker.dialog', ['user1' => $user_id, 'user2' => $it->user_to->id]) }}" style="text-decoration: underline">
106 {{ $it->user_to->surname." ".$it->user_to->name_man." ".$it->user_to->surname2." (".$it->user_to->id.")" }} 106 {{ $it->user_to->surname." ".$it->user_to->name_man." ".$it->user_to->surname2." (".$it->user_to->id.")" }}
107 </a> 107 </a>
108 @else 108 @else
109 {{ $it->user_to->surname." ".$it->user_to->name_man." ".$it->user_to->surname2." (".$it->user_to->id.")" }} 109 {{ $it->user_to->surname." ".$it->user_to->name_man." ".$it->user_to->surname2." (".$it->user_to->id.")" }}
110 @endif 110 @endif
111 @else 111 @else
112 Удаленный пользователь 112 Удаленный пользователь
113 @endif 113 @endif
114 </div> 114 </div>
115 <div><span>Вакансия:</span>@if (isset($it->vacancies)) {{ $it->vacancies->name." (".($it->vacancies->id).")" }} @else Удалена @endif</div> 115 <div><span>Вакансия:</span>@if (isset($it->vacancies)) {{ $it->vacancies->name." (".($it->vacancies->id).")" }} @else Удалена @endif</div>
116 <div><span>Текст:</span>{{ $it->text }}</div> 116 <div><span>Текст:</span>{{ $it->text }}</div>
117 </div> 117 </div>
118 </div> 118 </div>
119 <div class="messages__item-date">{{ $it->created_at }}</div> 119 <div class="messages__item-date">{{ $it->created_at }}</div>
120 </div> 120 </div>
121 @endforeach 121 @endforeach
122 122
123 <div style="margin-top: 20px"> 123 <div style="margin-top: 20px">
124 {{ $messages->onEachSide(0)->appends($_GET)->links('paginate') }} 124 {{ $messages->onEachSide(0)->appends($_GET)->links('paginate') }}
125 </div><!-- конец --> 125 </div><!-- конец -->
126 126
127 @else 127 @else
128 <div class="notify"> 128 <div class="notify">
129 <svg> 129 <svg>
130 <use xlink:href="{{ asset('images/sprite.svg#i') }}"></use> 130 <use xlink:href="{{ asset('images/sprite.svg#i') }}"></use>
131 </svg> 131 </svg>
132 <span>Сообщений не найдено</span> 132 <span>Сообщений не найдено</span>
133 </div> 133 </div>
134 @endif 134 @endif
135 </div> 135 </div>
136 </div> 136 </div>
137 </div> 137 </div>
138 </div> 138 </div>
139 </section> 139 </section>
140 </div> 140 </div>
141 <div> 141 <div>
142 @endsection 142 @endsection