Commit 6dc3be29cc1e00f9c9a1e57f6c55a0454530a2c8

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

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

Showing 1 changed file 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 <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>
107 @else 105 @else
108 <a href="{{ asset('images/logo_emp.png') }}" data-fancybox="gallery" class="review-image-modal"> 106 <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>
111 @endif 107 @endif
112 108
113 <h1 class="thing__title">{{ $company[0]->name_company }}</h1> 109 <h1 class="thing__title">{{ $company[0]->name_company }}</h1>
114 <!--<p class="thing__text"> $company[0]->text !!}</p>--> 110 <!--<p class="thing__text"> $company[0]->text !!}</p>-->
115 <div class="thing__buttons"> 111 <div class="thing__buttons">
116 <button type="button" class="button"> 112 <button type="button" class="button">
117 <svg> 113 <svg>
118 <use xlink:href="{{ asset('images/sprite.svg#grid-1') }}"></use> 114 <use xlink:href="{{ asset('images/sprite.svg#grid-1') }}"></use>
119 </svg> 115 </svg>
120 {{ $company[0]->ads->count() }} вакансии 116 {{ $company[0]->ads->count() }} вакансии
121 </button> 117 </button>
122 @if ($user_id == 0) 118 @if ($user_id == 0)
123 <a data-fancybox data-src="#question" data-options='{"touch":false,"autoFocus":false}' class="js_send_it_button button"> 119 <a data-fancybox data-src="#question" data-options='{"touch":false,"autoFocus":false}' class="js_send_it_button button">
124 Написать сообщение 120 Написать сообщение
125 </a> 121 </a>
126 @else 122 @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}' 123 <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"> 124 class="button js_send_it_button">
129 Написать сообщение 125 Написать сообщение
130 </button> 126 </button>
131 @endif 127 @endif
132 </div> 128 </div>
133 </div> 129 </div>
134 </div> 130 </div>
135 </section> 131 </section>
136 <main class="main"> 132 <main class="main">
137 <div class="container"> 133 <div class="container">
138 <div class="main__employer-page"> 134 <div class="main__employer-page">
139 <h2 class="main__employer-page-title">О компании</h2> 135 <h2 class="main__employer-page-title">О компании</h2>
140 <div class="main__employer-page-info"> 136 <div class="main__employer-page-info">
141 <div class="main__employer-page-item"> 137 <div class="main__employer-page-item">
142 <b>Адрес компании</b> 138 <b>Адрес компании</b>
143 <span> 139 <span>
144 {{ $company[0]->address }} 140 {{ $company[0]->address }}
145 </span> 141 </span>
146 </div> 142 </div>
147 <div class="main__employer-page-item"> 143 <div class="main__employer-page-item">
148 <b>Сайт</b> 144 <b>Сайт</b>
149 <span> 145 <span>
150 <a href="{{ $company[0]->site }}">{{ $company[0]->site }}</a> 146 <a href="{{ $company[0]->site }}">{{ $company[0]->site }}</a>
151 </span> 147 </span>
152 </div> 148 </div>
153 <div class="main__employer-page-item"> 149 <div class="main__employer-page-item">
154 <b>Почта</b> 150 <b>Почта</b>
155 <span> 151 <span>
156 <a href="mailto:">{{ $company[0]->email }}</a> 152 <a href="mailto:">{{ $company[0]->email }}</a>
157 </span> 153 </span>
158 </div> 154 </div>
159 <div class="main__employer-page-item"> 155 <div class="main__employer-page-item">
160 <b>Телефон</b> 156 <b>Телефон</b>
161 <span> 157 <span>
162 <a href="tel:{{ $company[0]->telephone }}">{{ $company[0]->telephone }}</a> 158 <a href="tel:{{ $company[0]->telephone }}">{{ $company[0]->telephone }}</a>
163 </span> 159 </span>
164 </div> 160 </div>
165 </div> 161 </div>
166 <div class="main__employer-page-info"> 162 <div class="main__employer-page-info">
167 <div class="main__employer-page-item"></div> 163 <div class="main__employer-page-item"></div>
168 <div class="main__employer-page-item"></div> 164 <div class="main__employer-page-item"></div>
169 <div class="main__employer-page-item"> 165 <div class="main__employer-page-item">
170 <b>Почта (alt)</b> 166 <b>Почта (alt)</b>
171 <span> 167 <span>
172 {{ $company[0]->email_2 }} 168 {{ $company[0]->email_2 }}
173 </span> 169 </span>
174 </div> 170 </div>
175 <div class="main__employer-page-item"> 171 <div class="main__employer-page-item">
176 <b>Телефон (alt)</b> 172 <b>Телефон (alt)</b>
177 <span> 173 <span>
178 <a href="{{ $company[0]->site }}">{{ $company[0]->telephone_2 }}</a> 174 <a href="{{ $company[0]->site }}">{{ $company[0]->telephone_2 }}</a>
179 </span> 175 </span>
180 </div> 176 </div>
181 </div> 177 </div>
182 178
183 <div class="main__employer-page-item main__employer-page-description"> 179 <div class="main__employer-page-item main__employer-page-description">
184 <b>Описание</b> 180 <b>Описание</b>
185 <span> 181 <span>
186 {!! $company[0]->text !!} 182 {!! $company[0]->text !!}
187 </span> 183 </span>
188 </div> 184 </div>
189 185
190 <div> 186 <div>
191 187
192 <div class="main__employer-page-tabs"> 188 <div class="main__employer-page-tabs">
193 <button type="button" class="main__employer-page-tabs-item active" 189 <button type="button" class="main__employer-page-tabs-item active"
194 data-tab="1">Флот</button> 190 data-tab="1">Флот</button>
195 <button type="button" class="main__employer-page-tabs-item" data-tab="2">Вакансии</button> 191 <button type="button" class="main__employer-page-tabs-item" data-tab="2">Вакансии</button>
196 </div> 192 </div>
197 193
198 <div class="main__employer-page-body"> 194 <div class="main__employer-page-body">
199 <div class="main__employer-page-body-item showed" data-body="1"> 195 <div class="main__employer-page-body-item showed" data-body="1">
200 <div class="main__employer-page-one"> 196 <div class="main__employer-page-one">
201 @if ($company[0]->flots->count()) 197 @if ($company[0]->flots->count())
202 @foreach ($company[0]->flots as $flot) 198 @foreach ($company[0]->flots as $flot)
203 <div class="main__employer-page-one-item flot-one-ship"> 199 <div class="main__employer-page-one-item flot-one-ship">
204 @if (!empty($flot->image)) 200 @if (!empty($flot->image))
205 <a href="{{ asset(Storage::url($flot->image)) }}" data-fancybox="gallery" class="review-image-modal"> 201 <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 }}"> 202 <img src="{{ asset(Storage::url($flot->image)) }}" alt="{{ $flot->name }}">
207 </a> 203 </a>
208 @else 204 @else
209 <a href="{{ asset('images/default_ship.jpg') }}" data-fancybox="gallery" class="review-image-modal"> 205 <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 }}"> 206 <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $flot->name }}">
211 </a> 207 </a>
212 @endif 208 @endif
213 209
214 <div class="flot-label"><div class="flot-label-name">Название:</div>{{ $flot->name }}</div> 210 <div class="flot-label"><div class="flot-label-name">Название:</div>{{ $flot->name }}</div>
215 <div class="flot-label"><div class="flot-label-name">DWT:</div> {{ $flot->DWT }}</div> 211 <div class="flot-label"><div class="flot-label-name">DWT:</div> {{ $flot->DWT }}</div>
216 <div class="flot-label"><div class="flot-label-name">Мощность:</div> {{ $flot->POWER_GD }}</div> 212 <div class="flot-label"><div class="flot-label-name">Мощность:</div> {{ $flot->POWER_GD }}</div>
217 <div class="flot-label"><div class="flot-label-name">IMO:</div> {{ $flot->IMO }}</div> 213 <div class="flot-label"><div class="flot-label-name">IMO:</div> {{ $flot->IMO }}</div>
218 </div> 214 </div>
219 @endforeach 215 @endforeach
220 @endif 216 @endif
221 </div> 217 </div>
222 </div> 218 </div>
223 219
224 <div class="main__employer-page-body-item" data-body="2"> 220 <div class="main__employer-page-body-item" data-body="2">
225 <div class="main__employer-page-two"> 221 <div class="main__employer-page-two">
226 @foreach ($ads as $job) 222 @foreach ($ads as $job)
227 <div class="main__employer-page-two-item"> 223 <div class="main__employer-page-two-item">
228 <div class="main__employer-page-two-item-toper"> 224 <div class="main__employer-page-two-item-toper">
229 @if (!empty($company[0]->logo)) 225 @if (!empty($company[0]->logo))
230 <img src="{{ asset(Storage::url($company[0]->logo)) }}" alt="{{ $job->name }}"> 226 <img src="{{ asset(Storage::url($company[0]->logo)) }}" alt="{{ $job->name }}">
231 @else 227 @else
232 <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $job->name }}"> 228 <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $job->name }}">
233 @endif 229 @endif
234 <span>{{ $company[0]->name_company }}</span> 230 <span>{{ $company[0]->name_company }}</span>
235 </div> 231 </div>
236 <div class="main__employer-page-two-item-text-body"> 232 <div class="main__employer-page-two-item-text-body">
237 <h3>{{ $job->name }}</h3> 233 <h3>{{ $job->name }}</h3>
238 <span>Описание: 234 <span>Описание:
239 {!! $job->text !!} 235 {!! $job->text !!}
240 </span> 236 </span>
241 </div> 237 </div>
242 238
243 @if ((isset($job->jobs)) && ($job->jobs->count())) 239 @if ((isset($job->jobs)) && ($job->jobs->count()))
244 <div class="main__employer-page-two-item-tags"> 240 <div class="main__employer-page-two-item-tags">
245 @foreach ($job->jobs as $item) 241 @foreach ($job->jobs as $item)
246 <span class="main__employer-page-two-item-tag">#{{ $item->name }}</span> 242 <span class="main__employer-page-two-item-tag">#{{ $item->name }}</span>
247 @endforeach 243 @endforeach
248 </div> 244 </div>
249 @endif 245 @endif
250 <div class="main__employer-page-two-item-buttons"> 246 <div class="main__employer-page-two-item-buttons">
251 247
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}' 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}'
253 class="button main__employer-page-two-item-button js_send_it_button">Оставить 249 class="button main__employer-page-two-item-button js_send_it_button">Оставить
254 отклик...</button> 250 отклик...</button>
255 251
256 <!--<a href="#" 252 <!--<a href="#"
257 class="button button_light main__employer-page-two-item-button">Подробнее</a>--> 253 class="button button_light main__employer-page-two-item-button">Подробнее</a>-->
258 </div> 254 </div>
259 <div class="main__employer-page-two-item-bottom"> 255 <div class="main__employer-page-two-item-bottom">
260 <div class="main__employer-page-two-item-bottom-date">{{ date('d.m.Y H:i:s', strtotime($job->updated_at)) }}</div> 256 <div class="main__employer-page-two-item-bottom-date">{{ date('d.m.Y H:i:s', strtotime($job->updated_at)) }}</div>
261 <button type="button" id="like{{ $job->id }}" data-val="{{ $job->id }}" 257 <button type="button" id="like{{ $job->id }}" data-val="{{ $job->id }}"
262 class="like main__employer-page-two-item-bottom-like js-toggle js_vac_favorite {{ \App\Classes\LikesClass::get_status_vacancy($job) }}"> 258 class="like main__employer-page-two-item-bottom-like js-toggle js_vac_favorite {{ \App\Classes\LikesClass::get_status_vacancy($job) }}">
263 <svg> 259 <svg>
264 <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use> 260 <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use>
265 </svg> 261 </svg>
266 </button> 262 </button>
267 </div> 263 </div>
268 </div> 264 </div>
269 @endforeach 265 @endforeach
270 266
271 <div style="margin-top: 20px"> 267 <div style="margin-top: 20px">
272 {{ $ads->onEachSide(0)->appends($_GET)->links('paginate') }} 268 {{ $ads->onEachSide(0)->appends($_GET)->links('paginate') }}
273 </div> 269 </div>
274 <!--<button type="button" class="button button_light button_more main__employer-page-two-more js-toggle js-parent-toggle"> 270 <!--<button type="button" class="button button_light button_more main__employer-page-two-more js-toggle js-parent-toggle">
275 <span>Показать ещё</span> 271 <span>Показать ещё</span>
276 <span>Скрыть</span> 272 <span>Скрыть</span>
277 </button>--> 273 </button>-->
278 </div> 274 </div>
279 </div> 275 </div>
280 </div> 276 </div>
281 </div> 277 </div>
282 </div> 278 </div>
283 </div> 279 </div>
284 </main> 280 </main>
285 @endsection 281 @endsection
286 282