Commit 4c17f889d32cb1f99567c5e4c623cf6325f96881

Authored by Сергей П
1 parent 689548bec3
Exists in master

правки

Showing 1 changed file with 6 additions and 2 deletions Inline Diff

resources/views/info_company_new.blade.php
1 @extends('layout.frontend', ['title' => 'Описание компании '.$title.'- РекаМоре']) 1 @extends('layout.frontend', ['title' => 'Описание компании '.$title.'- РекаМоре'])
2 2
3 @section('scripts') 3 @section('scripts')
4 <script> 4 <script>
5 console.log('Test system'); 5 console.log('Test system');
6 $(document).on('change', '#sort_ajax', function() { 6 $(document).on('change', '#sort_ajax', function() {
7 var this_ = $(this); 7 var this_ = $(this);
8 var val_ = this_.val(); 8 var val_ = this_.val();
9 console.log('sort items '+val_); 9 console.log('sort items '+val_);
10 10
11 $.ajax({ 11 $.ajax({
12 type: "GET", 12 type: "GET",
13 url: "{{ route('shipping_companies') }}", 13 url: "{{ route('shipping_companies') }}",
14 data: "sort="+val_+"&block=1", 14 data: "sort="+val_+"&block=1",
15 success: function (data) { 15 success: function (data) {
16 console.log('Выбор сортировки'); 16 console.log('Выбор сортировки');
17 console.log(data); 17 console.log(data);
18 $('#block_1').html(data); 18 $('#block_1').html(data);
19 }, 19 },
20 headers: { 20 headers: {
21 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') 21 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
22 }, 22 },
23 error: function (data) { 23 error: function (data) {
24 data = JSON.stringify(data); 24 data = JSON.stringify(data);
25 console.log('Error: ' + data); 25 console.log('Error: ' + data);
26 } 26 }
27 }); 27 });
28 28
29 $.ajax({ 29 $.ajax({
30 type: "GET", 30 type: "GET",
31 url: "{{ route('shipping_companies') }}", 31 url: "{{ route('shipping_companies') }}",
32 data: "sort="+val_+"&block=2", 32 data: "sort="+val_+"&block=2",
33 success: function (data) { 33 success: function (data) {
34 console.log('Выбор сортировки2'); 34 console.log('Выбор сортировки2');
35 console.log(data); 35 console.log(data);
36 history.pushState({}, '', "{{ route('shipping_companies') }}?sort="+val_+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif"); 36 history.pushState({}, '', "{{ route('shipping_companies') }}?sort="+val_+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif");
37 $('#block_2').html(data); 37 $('#block_2').html(data);
38 }, 38 },
39 headers: { 39 headers: {
40 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') 40 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
41 }, 41 },
42 error: function (data) { 42 error: function (data) {
43 data = JSON.stringify(data); 43 data = JSON.stringify(data);
44 console.log('Error: ' + data); 44 console.log('Error: ' + data);
45 } 45 }
46 }); 46 });
47 }); 47 });
48 48
49 $(document).ready(function(){ 49 $(document).ready(function(){
50 var sel = $('#select2-sort_ajax-container'); 50 var sel = $('#select2-sort_ajax-container');
51 var key = getUrlParameter('sort'); 51 var key = getUrlParameter('sort');
52 if (key !=='') { 52 if (key !=='') {
53 console.log(key); 53 console.log(key);
54 switch (key) { 54 switch (key) {
55 case "default": sel.html('Сортировка (по умолчанию)'); break; 55 case "default": sel.html('Сортировка (по умолчанию)'); break;
56 case "name_up": sel.html('По имени (возрастание)'); break; 56 case "name_up": sel.html('По имени (возрастание)'); break;
57 case "name_down": sel.html('По дате (убывание)'); break; 57 case "name_down": sel.html('По дате (убывание)'); break;
58 case "created_at_up": sel.html('По дате (возрастание)'); break; 58 case "created_at_up": sel.html('По дате (возрастание)'); break;
59 case "created_at_down": sel.html('По дате (убывание)'); break; 59 case "created_at_down": sel.html('По дате (убывание)'); break;
60 } 60 }
61 61
62 } 62 }
63 }); 63 });
64 64
65 //end 65 //end
66 $(document).on('click', '.js_send_it_button', function() { 66 $(document).on('click', '.js_send_it_button', function() {
67 var this_ = $(this); 67 var this_ = $(this);
68 var code_user_id = this_.attr('data-uid'); 68 var code_user_id = this_.attr('data-uid');
69 var code_to_user_id = this_.attr('data-tuid'); 69 var code_to_user_id = this_.attr('data-tuid');
70 var code_vacancy = this_.attr('data-vacancy'); 70 var code_vacancy = this_.attr('data-vacancy');
71 var user_id = $('#send_user_id'); 71 var user_id = $('#send_user_id');
72 var to_user_id = $('#send_to_user_id'); 72 var to_user_id = $('#send_to_user_id');
73 var vacancy = $('#send_vacancy'); 73 var vacancy = $('#send_vacancy');
74 74
75 console.log('Клик на кнопки...'); 75 console.log('Клик на кнопки...');
76 76
77 user_id.val(code_user_id); 77 user_id.val(code_user_id);
78 to_user_id.val(code_to_user_id); 78 to_user_id.val(code_to_user_id);
79 vacancy.val(code_vacancy); 79 vacancy.val(code_vacancy);
80 }); 80 });
81 </script> 81 </script>
82 @include('js.favorite-vacancy-45') 82 @include('js.favorite-vacancy-45')
83 @endsection 83 @endsection
84 84
85 @section('content') 85 @section('content')
86 <section class="thing"> 86 <section class="thing">
87 <div class="container"> 87 <div class="container">
88 <div class="thing__body"> 88 <div class="thing__body">
89 <ul class="breadcrumbs thing__breadcrumbs"> 89 <ul class="breadcrumbs thing__breadcrumbs">
90 <li><a href="{{ route('index') }}">Главная</a></li> 90 <li><a href="{{ route('index') }}">Главная</a></li>
91 <li><a href="{{ route('shipping_companies') }}">Работодатели</a></li> 91 <li><a href="{{ route('shipping_companies') }}">Работодатели</a></li>
92 <li><b>@isset($title) {{ $title }} @else Не указано @endif</b></li> 92 <li><b>@isset($title) {{ $title }} @else Не указано @endif</b></li>
93 </ul> 93 </ul>
94 @if ($company[0]->oficial_status == 1) 94 @if ($company[0]->oficial_status == 1)
95 <div class="thing__badge"> 95 <div class="thing__badge">
96 <svg> 96 <svg>
97 <use xlink:href="{{ asset('images/sprite.svg#badge') }}"></use> 97 <use xlink:href="{{ asset('images/sprite.svg#badge') }}"></use>
98 </svg> 98 </svg>
99 Компания проверена 99 Компания проверена
100 </div> 100 </div>
101 @endif 101 @endif
102 102
103 @if (!empty($company[0]->logo)) 103 @if (!empty($company[0]->logo))
104 <a href="{{ asset(Storage::url($company[0]->logo)) }}" data-fancybox="gallery" class="review-image-modal"> 104 <a href="{{ asset(Storage::url($company[0]->logo)) }}" data-fancybox="gallery" class="review-image-modal">
105 <img src="{{ asset(Storage::url($company[0]->logo)) }}" alt="{{ $company[0]->name_company }}" class="thing__pic"> 105 <img src="{{ asset(Storage::url($company[0]->logo)) }}" alt="{{ $company[0]->name_company }}" class="thing__pic">
106 </a> 106 </a>
107 @else 107 @else
108 <a href="{{ asset('images/logo_emp.png') }}" data-fancybox="gallery" class="review-image-modal"> 108 <a href="{{ asset('images/logo_emp.png') }}" data-fancybox="gallery" class="review-image-modal">
109 <img src="{{ asset('images/logo_emp.png') }}" alt="{{ $company[0]->name_company }}" class="thing__pic"> 109 <img src="{{ asset('images/logo_emp.png') }}" alt="{{ $company[0]->name_company }}" class="thing__pic">
110 </a> 110 </a>
111 @endif 111 @endif
112 112
113 <h1 class="thing__title">{{ $company[0]->name_company }}</h1> 113 <h1 class="thing__title">{{ $company[0]->name_company }}</h1>
114 <!--<p class="thing__text"> $company[0]->text !!}</p>--> 114 <!--<p class="thing__text"> $company[0]->text !!}</p>-->
115 <div class="thing__buttons"> 115 <div class="thing__buttons">
116 <button type="button" class="button"> 116 <button type="button" class="button">
117 <svg> 117 <svg>
118 <use xlink:href="{{ asset('images/sprite.svg#grid-1') }}"></use> 118 <use xlink:href="{{ asset('images/sprite.svg#grid-1') }}"></use>
119 </svg> 119 </svg>
120 {{ $company[0]->ads->count() }} вакансии 120 {{ $company[0]->ads->count() }} вакансии
121 </button> 121 </button>
122 @if ($user_id == 0) 122 @if ($user_id == 0)
123 <a data-fancybox data-src="#question" data-options='{"touch":false,"autoFocus":false}' class="js_send_it_button button"> 123 <a data-fancybox data-src="#question" data-options='{"touch":false,"autoFocus":false}' class="js_send_it_button button">
124 Написать сообщение 124 Написать сообщение
125 </a> 125 </a>
126 @else 126 @else
127 <button type="button" data-fancybox data-src="#send" data-vacancy="0" data-uid="{{ $user_id }}" data-tuid="{{ $company[0]->users->id }}" data-options='{"touch":false,"autoFocus":false}' 127 <button type="button" data-fancybox data-src="#send" data-vacancy="0" data-uid="{{ $user_id }}" data-tuid="{{ $company[0]->users->id }}" data-options='{"touch":false,"autoFocus":false}'
128 class="button js_send_it_button"> 128 class="button js_send_it_button">
129 Написать сообщение 129 Написать сообщение
130 </button> 130 </button>
131 @endif 131 @endif
132 </div> 132 </div>
133 </div> 133 </div>
134 </div> 134 </div>
135 </section> 135 </section>
136 <main class="main"> 136 <main class="main">
137 <div class="container"> 137 <div class="container">
138 <div class="main__employer-page"> 138 <div class="main__employer-page">
139 <h2 class="main__employer-page-title">О компании</h2> 139 <h2 class="main__employer-page-title">О компании</h2>
140 <div class="main__employer-page-info"> 140 <div class="main__employer-page-info">
141 <div class="main__employer-page-item"> 141 <div class="main__employer-page-item">
142 <b>Адрес компании</b> 142 <b>Адрес компании</b>
143 <span> 143 <span>
144 {{ $company[0]->address }} 144 {{ $company[0]->address }}
145 </span> 145 </span>
146 </div> 146 </div>
147 <div class="main__employer-page-item"> 147 <div class="main__employer-page-item">
148 <b>Сайт</b> 148 <b>Сайт</b>
149 <span> 149 <span>
150 <a href="{{ $company[0]->site }}">{{ $company[0]->site }}</a> 150 <a href="{{ $company[0]->site }}">{{ $company[0]->site }}</a>
151 </span> 151 </span>
152 </div> 152 </div>
153 <div class="main__employer-page-item"> 153 <div class="main__employer-page-item">
154 <b>Почта</b> 154 <b>Почта</b>
155 <span> 155 <span>
156 <a href="mailto:">{{ $company[0]->email }}</a> 156 <a href="mailto:">{{ $company[0]->email }}</a>
157 </span> 157 </span>
158 </div> 158 </div>
159 <div class="main__employer-page-item"> 159 <div class="main__employer-page-item">
160 <b>Телефон</b> 160 <b>Телефон</b>
161 <span> 161 <span>
162 <a href="tel:{{ $company[0]->telephone }}">{{ $company[0]->telephone }}</a> 162 <a href="tel:{{ $company[0]->telephone }}">{{ $company[0]->telephone }}</a>
163 </span> 163 </span>
164 </div> 164 </div>
165 </div> 165 </div>
166 <div class="main__employer-page-info"> 166 <div class="main__employer-page-info">
167 <div class="main__employer-page-item"></div> 167 <div class="main__employer-page-item"></div>
168 <div class="main__employer-page-item"></div> 168 <div class="main__employer-page-item"></div>
169 <div class="main__employer-page-item"> 169 <div class="main__employer-page-item">
170 <b>Почта (alt)</b> 170 <b>Почта (alt)</b>
171 <span> 171 <span>
172 {{ $company[0]->email_2 }} 172 {{ $company[0]->email_2 }}
173 </span> 173 </span>
174 </div> 174 </div>
175 <div class="main__employer-page-item"> 175 <div class="main__employer-page-item">
176 <b>Телефон (alt)</b> 176 <b>Телефон (alt)</b>
177 <span> 177 <span>
178 <a href="{{ $company[0]->site }}">{{ $company[0]->telephone_2 }}</a> 178 <a href="{{ $company[0]->site }}">{{ $company[0]->telephone_2 }}</a>
179 </span> 179 </span>
180 </div> 180 </div>
181 </div> 181 </div>
182 182
183 <div class="main__employer-page-item main__employer-page-description"> 183 <div class="main__employer-page-item main__employer-page-description">
184 <b>Описание</b> 184 <b>Описание</b>
185 <span> 185 <span>
186 {!! $company[0]->text !!} 186 {!! $company[0]->text !!}
187 </span> 187 </span>
188 </div> 188 </div>
189 189
190 <div> 190 <div>
191 191
192 <div class="main__employer-page-tabs"> 192 <div class="main__employer-page-tabs">
193 <button type="button" class="main__employer-page-tabs-item active" 193 <button type="button" class="main__employer-page-tabs-item active"
194 data-tab="1">Флот</button> 194 data-tab="1">Флот</button>
195 <button type="button" class="main__employer-page-tabs-item" data-tab="2">Вакансии</button> 195 <button type="button" class="main__employer-page-tabs-item" data-tab="2">Вакансии</button>
196 </div> 196 </div>
197 197
198 <div class="main__employer-page-body"> 198 <div class="main__employer-page-body">
199 <div class="main__employer-page-body-item showed" data-body="1"> 199 <div class="main__employer-page-body-item showed" data-body="1">
200 <div class="main__employer-page-one"> 200 <div class="main__employer-page-one">
201 @if ($company[0]->flots->count()) 201 @if ($company[0]->flots->count())
202 @foreach ($company[0]->flots as $flot) 202 @foreach ($company[0]->flots as $flot)
203 <div class="main__employer-page-one-item flot-one-ship"> 203 <div class="main__employer-page-one-item flot-one-ship">
204 @if (!empty($flot->image)) 204 @if (!empty($flot->image))
205 <img src="{{ asset(Storage::url($flot->image)) }}" alt="{{ $flot->name }}"> 205 <a href="{{ asset(Storage::url($flot->image)) }}" data-fancybox="gallery" class="review-image-modal">
206 <img src="{{ asset(Storage::url($flot->image)) }}" alt="{{ $flot->name }}">
207 </a>
206 @else 208 @else
207 <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $flot->name }}"> 209 <a href="{{ asset('images/default_ship.jpg') }}" data-fancybox="gallery" class="review-image-modal">
210 <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $flot->name }}">
211 </a>
208 @endif 212 @endif
209 213
210 <div class="bold font20">{{ $flot->name }}</div> 214 <div class="bold font20">{{ $flot->name }}</div>
211 <div class="flot-label"><div class="flot-label-name">DWT</div> {{ $flot->DWT }}</div> 215 <div class="flot-label"><div class="flot-label-name">DWT</div> {{ $flot->DWT }}</div>
212 <div class="flot-label"><div class="flot-label-name">Мощность</div> {{ $flot->POWER_GD }}</div> 216 <div class="flot-label"><div class="flot-label-name">Мощность</div> {{ $flot->POWER_GD }}</div>
213 <div class="flot-label"><div class="flot-label-name">IMO</div> {{ $flot->IMO }}</div> 217 <div class="flot-label"><div class="flot-label-name">IMO</div> {{ $flot->IMO }}</div>
214 </div> 218 </div>
215 @endforeach 219 @endforeach
216 @endif 220 @endif
217 </div> 221 </div>
218 </div> 222 </div>
219 223
220 <div class="main__employer-page-body-item" data-body="2"> 224 <div class="main__employer-page-body-item" data-body="2">
221 <div class="main__employer-page-two"> 225 <div class="main__employer-page-two">
222 @foreach ($ads as $job) 226 @foreach ($ads as $job)
223 <div class="main__employer-page-two-item"> 227 <div class="main__employer-page-two-item">
224 <div class="main__employer-page-two-item-toper"> 228 <div class="main__employer-page-two-item-toper">
225 @if (!empty($company[0]->logo)) 229 @if (!empty($company[0]->logo))
226 <img src="{{ asset(Storage::url($company[0]->logo)) }}" alt="{{ $job->name }}"> 230 <img src="{{ asset(Storage::url($company[0]->logo)) }}" alt="{{ $job->name }}">
227 @else 231 @else
228 <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $job->name }}"> 232 <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $job->name }}">
229 @endif 233 @endif
230 <span>{{ $company[0]->name_company }}</span> 234 <span>{{ $company[0]->name_company }}</span>
231 </div> 235 </div>
232 <div class="main__employer-page-two-item-text-body"> 236 <div class="main__employer-page-two-item-text-body">
233 <h3>{{ $job->name }}</h3> 237 <h3>{{ $job->name }}</h3>
234 <span>Описание: 238 <span>Описание:
235 {!! $job->text !!} 239 {!! $job->text !!}
236 </span> 240 </span>
237 </div> 241 </div>
238 242
239 @if ((isset($job->jobs)) && ($job->jobs->count())) 243 @if ((isset($job->jobs)) && ($job->jobs->count()))
240 <div class="main__employer-page-two-item-tags"> 244 <div class="main__employer-page-two-item-tags">
241 @foreach ($job->jobs as $item) 245 @foreach ($job->jobs as $item)
242 <span class="main__employer-page-two-item-tag">#{{ $item->name }}</span> 246 <span class="main__employer-page-two-item-tag">#{{ $item->name }}</span>
243 @endforeach 247 @endforeach
244 </div> 248 </div>
245 @endif 249 @endif
246 <div class="main__employer-page-two-item-buttons"> 250 <div class="main__employer-page-two-item-buttons">
247 251
248 <button type="button" data-fancybox data-src="#send" data-vacancy="{{ $job->id }}" data-uid="{{ $user_id }}" data-tuid="{{ $company[0]->users->id }}" data-options='{"touch":false,"autoFocus":false}' 252 <button type="button" data-fancybox data-src="#send" data-vacancy="{{ $job->id }}" data-uid="{{ $user_id }}" data-tuid="{{ $company[0]->users->id }}" data-options='{"touch":false,"autoFocus":false}'
249 class="button main__employer-page-two-item-button js_send_it_button">Оставить 253 class="button main__employer-page-two-item-button js_send_it_button">Оставить
250 отклик...</button> 254 отклик...</button>
251 255
252 <!--<a href="#" 256 <!--<a href="#"
253 class="button button_light main__employer-page-two-item-button">Подробнее</a>--> 257 class="button button_light main__employer-page-two-item-button">Подробнее</a>-->
254 </div> 258 </div>
255 <div class="main__employer-page-two-item-bottom"> 259 <div class="main__employer-page-two-item-bottom">
256 <div class="main__employer-page-two-item-bottom-date">{{ date('d.m.Y H:i:s', strtotime($job->updated_at)) }}</div> 260 <div class="main__employer-page-two-item-bottom-date">{{ date('d.m.Y H:i:s', strtotime($job->updated_at)) }}</div>
257 <button type="button" id="like{{ $job->id }}" data-val="{{ $job->id }}" 261 <button type="button" id="like{{ $job->id }}" data-val="{{ $job->id }}"
258 class="like main__employer-page-two-item-bottom-like js-toggle js_vac_favorite {{ \App\Classes\LikesClass::get_status_vacancy($job) }}"> 262 class="like main__employer-page-two-item-bottom-like js-toggle js_vac_favorite {{ \App\Classes\LikesClass::get_status_vacancy($job) }}">
259 <svg> 263 <svg>
260 <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use> 264 <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use>
261 </svg> 265 </svg>
262 </button> 266 </button>
263 </div> 267 </div>
264 </div> 268 </div>
265 @endforeach 269 @endforeach
266 270
267 <div style="margin-top: 20px"> 271 <div style="margin-top: 20px">
268 {{ $ads->onEachSide(0)->appends($_GET)->links('paginate') }} 272 {{ $ads->onEachSide(0)->appends($_GET)->links('paginate') }}
269 </div> 273 </div>
270 <!--<button type="button" class="button button_light button_more main__employer-page-two-more js-toggle js-parent-toggle"> 274 <!--<button type="button" class="button button_light button_more main__employer-page-two-more js-toggle js-parent-toggle">
271 <span>Показать ещё</span> 275 <span>Показать ещё</span>
272 <span>Скрыть</span> 276 <span>Скрыть</span>
273 </button>--> 277 </button>-->
274 </div> 278 </div>
275 </div> 279 </div>
276 </div> 280 </div>
277 </div> 281 </div>
278 </div> 282 </div>
279 </div> 283 </div>
280 </main> 284 </main>
281 @endsection 285 @endsection
282 286