Commit 365251abd952b50c0597c0a13765db65ac01769e
1 parent
b1ea22485a
Exists in
master
smol fixes
Showing 4 changed files with 10 additions and 4 deletions Inline Diff
app/Http/Controllers/CompanyController.php
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | namespace App\Http\Controllers; | 3 | namespace App\Http\Controllers; |
4 | 4 | ||
5 | use App\Models\Ad_employer; | 5 | use App\Models\Ad_employer; |
6 | use App\Models\Employer; | 6 | use App\Models\Employer; |
7 | use Illuminate\Http\Request; | 7 | use Illuminate\Http\Request; |
8 | 8 | ||
9 | class CompanyController extends Controller | 9 | class CompanyController extends Controller |
10 | { | 10 | { |
11 | public function shipping_companies(Request $request) { | 11 | public function shipping_companies(Request $request) { |
12 | $emps = Employer::query()->with('ads')->where('status_hidden', '=', '0'); | 12 | $emps = Employer::query()->with('ads')->where('status_hidden', '=', '0'); |
13 | if (($request->has('search')) && (!empty($request->get('search')))) { | 13 | if (($request->has('search')) && (!empty($request->get('search')))) { |
14 | $search = $request->get('search'); | 14 | $search = $request->get('search'); |
15 | $emps = $emps->where('name_company', 'LIKE', "%$search%"); | 15 | $emps = $emps->where('name_company', 'LIKE', "%$search%"); |
16 | } | 16 | } |
17 | 17 | ||
18 | $count_emps = $emps->count(); | 18 | $count_emps = $emps->count(); |
19 | 19 | ||
20 | if ($request->get('sort')) { | 20 | if ($request->get('sort')) { |
21 | $sort = $request->get('sort'); | 21 | $sort = $request->get('sort'); |
22 | switch ($sort) { | 22 | switch ($sort) { |
23 | case 'name_up': $emps = $emps->orderBy('name_company')->orderBy('id'); break; | 23 | case 'name_up': $emps = $emps->orderBy('name_company')->orderBy('id'); break; |
24 | case 'name_down': $emps = $emps->orderByDesc('name_company')->orderby('id'); break; | 24 | case 'name_down': $emps = $emps->orderByDesc('name_company')->orderby('id'); break; |
25 | case 'created_at_up': $emps = $emps->OrderBy('created_at')->orderBy('id'); break; | 25 | case 'created_at_up': $emps = $emps->OrderBy('created_at')->orderBy('id'); break; |
26 | case 'created_at_down': $emps = $emps->orderByDesc('created_at')->orderBy('id'); break; | 26 | case 'created_at_down': $emps = $emps->orderByDesc('created_at')->orderBy('id'); break; |
27 | case 'default': $emps = $emps->orderBy('id')->orderby('updated_at'); break; | 27 | case 'default': $emps = $emps->orderBy('id')->orderby('updated_at'); break; |
28 | default: $emps = $emps->orderBy('id')->orderby('updated_at'); break; | 28 | default: $emps = $emps->orderBy('id')->orderby('updated_at'); break; |
29 | } | 29 | } |
30 | } | 30 | } |
31 | if (is_null($request->get('sort'))){ | ||
31 | 32 | ||
32 | $emps = $emps->paginate(4); | 33 | $emps = $emps->orderByDesc('created_at')->orderBy('id'); |
34 | |||
35 | } | ||
33 | 36 | ||
37 | $emps = $emps->paginate(4); | ||
34 | 38 | ||
35 | if ($request->ajax()) { | 39 | if ($request->ajax()) { |
36 | if ($request->get('block') == '1') | 40 | if ($request->get('block') == '1') |
37 | return view('ajax.companies', compact('emps', 'count_emps')); | 41 | return view('ajax.companies', compact('emps', 'count_emps')); |
38 | else | 42 | else |
39 | return view('ajax.companies2', compact('emps', 'count_emps')); | 43 | return view('ajax.companies2', compact('emps', 'count_emps')); |
40 | } else { | 44 | } else { |
41 | return view('companies', compact('emps', 'count_emps')); | 45 | return view('companies', compact('emps', 'count_emps')); |
42 | } | 46 | } |
43 | } | 47 | } |
44 | 48 | ||
45 | public function info_company(Employer $company) { | 49 | public function info_company(Employer $company) { |
46 | if (isset(Auth()->user()->id)) { | 50 | if (isset(Auth()->user()->id)) { |
47 | $user_id = Auth()->user()->id; | 51 | $user_id = Auth()->user()->id; |
48 | } else { | 52 | } else { |
49 | $user_id = 0; | 53 | $user_id = 0; |
50 | } | 54 | } |
51 | 55 | ||
52 | $company = Employer::with('ads')->with('flots')->with('users') | 56 | $company = Employer::with('ads')->with('flots')->with('users') |
53 | ->where('id', '=', $company->id)->get(); | 57 | ->where('id', '=', $company->id)->get(); |
54 | 58 | ||
55 | $title = $company[0]->name_company; | 59 | $title = $company[0]->name_company; |
56 | 60 | ||
57 | $ads = Ad_employer::query()->with('jobs')->with('jobs_code') | 61 | $ads = Ad_employer::query()->with('jobs')->with('jobs_code') |
58 | ->where('employer_id', '=', $company[0]->id) | 62 | ->where('employer_id', '=', $company[0]->id) |
59 | ->where('is_remove', '=', '0') | 63 | ->where('is_remove', '=', '0') |
60 | ->where('active_is', 1) | 64 | ->where('active_is', 1) |
61 | ->OrderByDesc('id') | 65 | ->OrderByDesc('id') |
62 | ->paginate(50) | 66 | ->paginate(50) |
63 | ; | 67 | ; |
64 | 68 | ||
65 | return view('info_company_new', compact('company', 'user_id', 'title', 'ads')); | 69 | return view('info_company_new', compact('company', 'user_id', 'title', 'ads')); |
66 | } | 70 | } |
67 | } | 71 | } |
68 | 72 |
resources/views/companies.blade.php
1 | @extends('layout.frontend', ['title' => 'Судоходные компании РекаМоре']) | 1 | @extends('layout.frontend', ['title' => 'Судоходные компании РекаМоре']) |
2 | 2 | ||
3 | @section('scripts') | 3 | @section('scripts') |
4 | <script> | 4 | <script> |
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 | 47 | ||
48 | $(document).ready(function(){ | 48 | $(document).ready(function(){ |
49 | var sel = $('#select2-sort_ajax-container'); | 49 | var sel = $('#select2-sort_ajax-container'); |
50 | var key = getUrlParameter('sort'); | 50 | var key = getUrlParameter('sort'); |
51 | 51 | ||
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 | </script> | 64 | </script> |
65 | @endsection | 65 | @endsection |
66 | 66 | ||
67 | @section('content') | 67 | @section('content') |
68 | <section class="thing"> | 68 | <section class="thing"> |
69 | <div class="container"> | 69 | <div class="container"> |
70 | <form class="thing__body"> | 70 | <form class="thing__body"> |
71 | @csrf | 71 | @csrf |
72 | <ul class="breadcrumbs thing__breadcrumbs"> | 72 | <ul class="breadcrumbs thing__breadcrumbs"> |
73 | <li><a href="{{ route('index') }}">Главная</a></li> | 73 | <li><a href="{{ route('index') }}">Главная</a></li> |
74 | <li><b>Судоходные компании</b></li> | 74 | <li><b>Судоходные компании</b></li> |
75 | </ul> | 75 | </ul> |
76 | <h1 class="thing__title">Судоходные компании</h1> | 76 | <h1 class="thing__title">Судоходные компании</h1> |
77 | <p class="thing__text"> | 77 | <p class="thing__text"> |
78 | В данном разделе представлены компании объявления от которых Вы можете увидеть на сайте | 78 | В данном разделе представлены компании объявления от которых Вы можете увидеть на сайте |
79 | 79 | ||
80 | Галочка "Компания одобрена сервисом rekamore.su" выдается компании в чьей репутации мы уверены, компания работает не первый год и у нее нет задержек по заработной плате | 80 | Галочка "Компания одобрена сервисом rekamore.su" выдается компании в чьей репутации мы уверены, компания работает не первый год и у нее нет задержек по заработной плате |
81 | 81 | ||
82 | Компании без галочки не стоит игнорировать, возможно она находится на проверке и в скором времени галочка будет выдана | 82 | Компании без галочки не стоит игнорировать, возможно она находится на проверке и в скором времени галочка будет выдана |
83 | 83 | ||
84 | Мы очень дорожим нашей репутацией и стараемся оградить моряков от недобросовестных работодателей | 84 | Мы очень дорожим нашей репутацией и стараемся оградить моряков от недобросовестных работодателей |
85 | </p> | 85 | </p> |
86 | <div class="search thing__search"> | 86 | <div class="search thing__search"> |
87 | <input type="search" id="search" name="search" class="input" value="{{ (isset($_GET['search'])) ? $_GET['search'] : '' }}" placeholder="Введите наименование работодателя"> | 87 | <input type="search" id="search" name="search" class="input" value="{{ (isset($_GET['search'])) ? $_GET['search'] : '' }}" placeholder="Введите наименование работодателя"> |
88 | <button type="submit" class="button">Найти</button> | 88 | <button type="submit" class="button">Найти</button> |
89 | <span> | 89 | <span> |
90 | <svg> | 90 | <svg> |
91 | <use xlink:href="{{ asset('images/sprite.svg#search') }}"></use> | 91 | <use xlink:href="{{ asset('images/sprite.svg#search') }}"></use> |
92 | </svg> | 92 | </svg> |
93 | </span> | 93 | </span> |
94 | </div> | 94 | </div> |
95 | </form> | 95 | </form> |
96 | </div> | 96 | </div> |
97 | </section> | 97 | </section> |
98 | <main class="main"> | 98 | <main class="main"> |
99 | <div class="container"> | 99 | <div class="container"> |
100 | <div class="main__employers"> | 100 | <div class="main__employers"> |
101 | <div class="filters"> | 101 | <div class="filters"> |
102 | <div class="filters__label">Показано {{ $emps->firstItem() }} – {{ $emps->lastItem() }} из {{ $count_emps }} результатов поиска</div> | 102 | <div class="filters__label">Показано {{ $emps->firstItem() }} – {{ $emps->lastItem() }} из {{ $count_emps }} результатов поиска</div> |
103 | <div class="filters__body"> | 103 | <div class="filters__body"> |
104 | <div class="select filters__select"> | 104 | <div class="select filters__select"> |
105 | <select class="js-select2" id="sort_ajax" name="sort_ajax"> | 105 | <select class="js-select2" id="sort_ajax" name="sort_ajax"> |
106 | <option value="default">Сортировка (по умолчанию)</option> | 106 | <option value="default">Сортировка (по умолчанию)</option> |
107 | <option value="name_up">По имени (возрастание)</option> | 107 | <option value="name_up">По имени (возрастание)</option> |
108 | <option value="name_down">По имени (убывание)</option> | 108 | <option value="name_down">По имени (убывание)</option> |
109 | <option value="created_at_up">По дате (возрастание)</option> | 109 | <option value="created_at_up">По дате (возрастание)</option> |
110 | <option value="created_at_down">По дате (убывание)</option> | 110 | <option value="created_at_down" selected>По дате (убывание)</option> |
111 | </select> | 111 | </select> |
112 | </div> | 112 | </div> |
113 | <button type="button" class="filters__item active" data-tab="1"> | 113 | <button type="button" class="filters__item active" data-tab="1"> |
114 | <svg> | 114 | <svg> |
115 | <use xlink:href="{{ asset('images/sprite.svg#grid-1') }}"></use> | 115 | <use xlink:href="{{ asset('images/sprite.svg#grid-1') }}"></use> |
116 | </svg> | 116 | </svg> |
117 | </button> | 117 | </button> |
118 | <button type="button" class="filters__item" data-tab="2"> | 118 | <button type="button" class="filters__item" data-tab="2"> |
119 | <svg> | 119 | <svg> |
120 | <use xlink:href="{{ asset('images/sprite.svg#grid-2') }}"></use> | 120 | <use xlink:href="{{ asset('images/sprite.svg#grid-2') }}"></use> |
121 | </svg> | 121 | </svg> |
122 | </button> | 122 | </button> |
123 | </div> | 123 | </div> |
124 | </div> | 124 | </div> |
125 | <div class="main__employers-body showed" data-body="1" id="block_1" name="block_1"> | 125 | <div class="main__employers-body showed" data-body="1" id="block_1" name="block_1"> |
126 | <div class="main__employers-one"> | 126 | <div class="main__employers-one"> |
127 | @if ($emps->count()) | 127 | @if ($emps->count()) |
128 | @foreach($emps as $emp) | 128 | @foreach($emps as $emp) |
129 | <div class="main__employers-item"> | 129 | <div class="main__employers-item"> |
130 | <span class="main__employers-item-inner"> | 130 | <span class="main__employers-item-inner"> |
131 | @if (!empty($emp->logo)) | 131 | @if (!empty($emp->logo)) |
132 | <a href="{{ route('info_company', ['company' => $emp->id]) }}"> | 132 | <a href="{{ route('info_company', ['company' => $emp->id]) }}"> |
133 | <img src="{{ asset(Storage::url($emp->logo)) }}" alt="{{ $emp->name_company }}" class="main__employers-item-pic"> | 133 | <img src="{{ asset(Storage::url($emp->logo)) }}" alt="{{ $emp->name_company }}" class="main__employers-item-pic"> |
134 | </a> | 134 | </a> |
135 | @else | 135 | @else |
136 | <a href="{{ route('info_company', ['company' => $emp->id]) }}"> | 136 | <a href="{{ route('info_company', ['company' => $emp->id]) }}"> |
137 | <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $emp->name_company }}" class="main__employers-item-pic"> | 137 | <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $emp->name_company }}" class="main__employers-item-pic"> |
138 | </a> | 138 | </a> |
139 | @endif | 139 | @endif |
140 | <span class="main__employers-item-body"> | 140 | <span class="main__employers-item-body"> |
141 | <b>{{ $emp->name_company }}</b> | 141 | <b>{{ $emp->name_company }}</b> |
142 | <i>{{ $emp->ads->count() }} вакансия(ий)</i> | 142 | <i>{{ $emp->ads->count() }} вакансия(ий)</i> |
143 | </span> | 143 | </span> |
144 | </span> | 144 | </span> |
145 | <a href="{{ route('info_company', ['company' => $emp->id]) }}" class="button button_light main__employers-item-more">Подробнее</a> | 145 | <a href="{{ route('info_company', ['company' => $emp->id]) }}" class="button button_light main__employers-item-more">Подробнее</a> |
146 | 146 | ||
147 | @if ($emp->oficial_status == 1) | 147 | @if ($emp->oficial_status == 1) |
148 | <span class="main__employers-item-label"> | 148 | <span class="main__employers-item-label"> |
149 | <svg> | 149 | <svg> |
150 | <use xlink:href="images/sprite.svg#v"></use> | 150 | <use xlink:href="images/sprite.svg#v"></use> |
151 | </svg> | 151 | </svg> |
152 | <span>Компания одобрена сервисом rekamore.su</span> | 152 | <span>Компания одобрена сервисом rekamore.su</span> |
153 | </span> | 153 | </span> |
154 | @endif | 154 | @endif |
155 | </div> | 155 | </div> |
156 | @endforeach | 156 | @endforeach |
157 | </div> | 157 | </div> |
158 | 158 | ||
159 | {{ $emps->appends($_GET)->links('paginate') }} | 159 | {{ $emps->appends($_GET)->links('paginate') }} |
160 | 160 | ||
161 | @else | 161 | @else |
162 | <H2>Нет данных</H2> | 162 | <H2>Нет данных</H2> |
163 | @endif | 163 | @endif |
164 | 164 | ||
165 | </div> | 165 | </div> |
166 | <div class="main__employers-body" data-body="2" id="block_2" name="block_2"> | 166 | <div class="main__employers-body" data-body="2" id="block_2" name="block_2"> |
167 | @if ($emps->count()) | 167 | @if ($emps->count()) |
168 | <div class="main__employers-two"> | 168 | <div class="main__employers-two"> |
169 | @foreach($emps as $emp) | 169 | @foreach($emps as $emp) |
170 | <div class="main__employers-item"> | 170 | <div class="main__employers-item"> |
171 | <span class="main__employers-item-inner"> | 171 | <span class="main__employers-item-inner"> |
172 | @if (!empty($emp->logo)) | 172 | @if (!empty($emp->logo)) |
173 | <img src="{{ asset(Storage::url($emp->logo)) }}" alt="{{ $emp->name_company }}" class="main__employers-item-pic"> | 173 | <img src="{{ asset(Storage::url($emp->logo)) }}" alt="{{ $emp->name_company }}" class="main__employers-item-pic"> |
174 | @else | 174 | @else |
175 | <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $emp->name_company }}" class="main__employers-item-pic"> | 175 | <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $emp->name_company }}" class="main__employers-item-pic"> |
176 | @endif | 176 | @endif |
177 | <span class="main__employers-item-body"> | 177 | <span class="main__employers-item-body"> |
178 | <b>{{ $emp->name_company }}</b> | 178 | <b>{{ $emp->name_company }}</b> |
179 | <i>{{ $emp->ads->count() }} вакансия(ий)</i> | 179 | <i>{{ $emp->ads->count() }} вакансия(ий)</i> |
180 | </span> | 180 | </span> |
181 | </span> | 181 | </span> |
182 | <a href="{{ route('info_company', ['company' => $emp->id]) }}" class="button button_light main__employers-item-more">Подробнее</a> | 182 | <a href="{{ route('info_company', ['company' => $emp->id]) }}" class="button button_light main__employers-item-more">Подробнее</a> |
183 | @if ($emp->oficial_status == 1) | 183 | @if ($emp->oficial_status == 1) |
184 | <span class="main__employers-item-label"> | 184 | <span class="main__employers-item-label"> |
185 | <svg> | 185 | <svg> |
186 | <use xlink:href="{{ asset('images/sprite.svg#v') }}"></use> | 186 | <use xlink:href="{{ asset('images/sprite.svg#v') }}"></use> |
187 | </svg> | 187 | </svg> |
188 | <span>Компания одобрена сервисом rekamore.su</span> | 188 | <span>Компания одобрена сервисом rekamore.su</span> |
189 | </span> | 189 | </span> |
190 | @endif | 190 | @endif |
191 | </div> | 191 | </div> |
192 | @endforeach | 192 | @endforeach |
193 | </div> | 193 | </div> |
194 | {{ $emps->appends($_GET)->onEachSide(0)->links('paginate') }} | 194 | {{ $emps->appends($_GET)->onEachSide(0)->links('paginate') }} |
195 | @else | 195 | @else |
196 | <H2>Нет данных</H2> | 196 | <H2>Нет данных</H2> |
197 | @endif | 197 | @endif |
198 | </div> | 198 | </div> |
199 | </div> | 199 | </div> |
200 | </div> | 200 | </div> |
201 | </main> | 201 | </main> |
202 | @endsection | 202 | @endsection |
203 | 203 |
resources/views/detail_new.blade.php
1 | @extends('layout.frontend', ['title' => $title.' - РекаМоре']) | 1 | @extends('layout.frontend', ['title' => $title.' - РекаМоре']) |
2 | @section('scripts') | 2 | @section('scripts') |
3 | <script> | 3 | <script> |
4 | $(document).on('change', '#sort_ajax', function() { | 4 | $(document).on('change', '#sort_ajax', function() { |
5 | var this_ = $(this); | 5 | var this_ = $(this); |
6 | var val_ = this_.val(); | 6 | var val_ = this_.val(); |
7 | console.log('sort items '+val_); | 7 | console.log('sort items '+val_); |
8 | 8 | ||
9 | $.ajax({ | 9 | $.ajax({ |
10 | type: "GET", | 10 | type: "GET", |
11 | url: "{{ route('education') }}", | 11 | url: "{{ route('education') }}", |
12 | data: "sort="+val_+"&block=1", | 12 | data: "sort="+val_+"&block=1", |
13 | success: function (data) { | 13 | success: function (data) { |
14 | console.log('Выбор сортировки'); | 14 | console.log('Выбор сортировки'); |
15 | console.log(data); | 15 | console.log(data); |
16 | $('#block').html(data); | 16 | $('#block').html(data); |
17 | history.pushState({}, '', "{{ route('education') }}?sort="+val_+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif"); | 17 | history.pushState({}, '', "{{ route('education') }}?sort="+val_+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif"); |
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 | 28 | ||
29 | $(document).ready(function(){ | 29 | $(document).ready(function(){ |
30 | var sel = $('#select2-sort_ajax-container'); | 30 | var sel = $('#select2-sort_ajax-container'); |
31 | var key = getUrlParameter('sort'); | 31 | var key = getUrlParameter('sort'); |
32 | console.log(sel); | 32 | console.log(sel); |
33 | console.log(key); | 33 | console.log(key); |
34 | 34 | ||
35 | if (key !=='') { | 35 | if (key !=='') { |
36 | console.log(key); | 36 | console.log(key); |
37 | switch (key) { | 37 | switch (key) { |
38 | case "default": sel.html('Сортировка (по умолчанию)'); break; | 38 | case "default": sel.html('Сортировка (по умолчанию)'); break; |
39 | case "name_up": sel.html('По имени (возрастание)'); break; | 39 | case "name_up": sel.html('По имени (возрастание)'); break; |
40 | case "name_down": sel.html('По дате (убывание)'); break; | 40 | case "name_down": sel.html('По дате (убывание)'); break; |
41 | case "created_at_up": sel.html('По дате (возрастание)'); break; | 41 | case "created_at_up": sel.html('По дате (возрастание)'); break; |
42 | case "created_at_down": sel.html('По дате (убывание)'); break; | 42 | case "created_at_down": sel.html('По дате (убывание)'); break; |
43 | } | 43 | } |
44 | 44 | ||
45 | } | 45 | } |
46 | }); | 46 | }); |
47 | </script> | 47 | </script> |
48 | @endsection | 48 | @endsection |
49 | @section('content') | 49 | @section('content') |
50 | <section class="thing"> | 50 | <section class="thing"> |
51 | <div class="container"> | 51 | <div class="container"> |
52 | <div class="thing__body"> | 52 | <div class="thing__body"> |
53 | <ul class="breadcrumbs thing__breadcrumbs"> | 53 | <ul class="breadcrumbs thing__breadcrumbs"> |
54 | <li><a href="{{ route('index') }}">Главная</a></li> | 54 | <li><a href="{{ route('index') }}">Главная</a></li> |
55 | <li><a href="{{ route('news') }}">Новости и статьи</a></li> | 55 | <li><a href="{{ route('news') }}">Новости и статьи</a></li> |
56 | <li><b>{{ $title }}</b></li> | 56 | <li><b>{{ $title }}</b></li> |
57 | </ul> | 57 | </ul> |
58 | 58 | ||
59 | @if (empty($Query[0]->image)) | 59 | @if (empty($Query[0]->image)) |
60 | <img src="{{ asset('/images/default_ship.jpg') }}" alt="{{ $title }}" class="thing__pic thing__pic_two"> | 60 | <img src="{{ asset('/images/default_ship.jpg') }}" alt="{{ $title }}" class="thing__pic thing__pic_two"> |
61 | @else | 61 | @else |
62 | <img src="{{ asset(Storage::url($Query[0]->image)) }}" alt="{{ $title }}" class="thing__pic thing__pic_two"> | 62 | <img src="{{ asset(Storage::url($Query[0]->image)) }}" alt="{{ $title }}" class="thing__pic thing__pic_two"> |
63 | @endif | 63 | @endif |
64 | <time class="thing__date">{{ date('d.m.Y H:i:s', strtotime($Query[0]->created_at)) }}</time> | 64 | <time class="thing__date">{{ date('d.m.Y H:i:s', strtotime($Query[0]->created_at)) }}</time> |
65 | <h1 class="thing__title">{{ $title }}</h1> | 65 | <h1 class="thing__title">{{ $title }}</h1> |
66 | <p class="thing__text">{{ mb_strimwidth($Query[0]->text, 0, 100, "...") }}</p> | 66 | <p class="thing__text">{!! mb_strimwidth($Query[0]->text, 0, 100, "...") !!}</p> |
67 | </div> | 67 | </div> |
68 | </div> | 68 | </div> |
69 | </section> | 69 | </section> |
70 | 70 | ||
71 | 71 | ||
72 | <main class="main"> | 72 | <main class="main"> |
73 | <div class="container"> | 73 | <div class="container"> |
74 | <div class="main__content"> | 74 | <div class="main__content"> |
75 | <div class="main__content-item"> | 75 | <div class="main__content-item"> |
76 | <h2>{{ $Query[0]->title }}</h2> | 76 | <h2>{{ $Query[0]->title }}</h2> |
77 | <p>{!! $Query[0]->text !!}</p> | 77 | <p>{!! $Query[0]->text !!}</p> |
78 | </div> | 78 | </div> |
79 | </div> | 79 | </div> |
80 | </div> | 80 | </div> |
81 | </main> | 81 | </main> |
82 | <section class="news"> | 82 | <section class="news"> |
83 | <div class="container"> | 83 | <div class="container"> |
84 | <div class="news__toper"> | 84 | <div class="news__toper"> |
85 | <div class="title">Новости и статьи</div> | 85 | <div class="title">Новости и статьи</div> |
86 | <div class="navs"> | 86 | <div class="navs"> |
87 | <button class="js-news-swiper-button-prev"> | 87 | <button class="js-news-swiper-button-prev"> |
88 | <svg class="rotate180"> | 88 | <svg class="rotate180"> |
89 | <use xlink:href="images/sprite.svg#arrow"></use> | 89 | <use xlink:href="images/sprite.svg#arrow"></use> |
90 | </svg> | 90 | </svg> |
91 | </button> | 91 | </button> |
92 | <button class="js-news-swiper-button-next"> | 92 | <button class="js-news-swiper-button-next"> |
93 | <svg> | 93 | <svg> |
94 | <use xlink:href="images/sprite.svg#arrow"></use> | 94 | <use xlink:href="images/sprite.svg#arrow"></use> |
95 | </svg> | 95 | </svg> |
96 | </button> | 96 | </button> |
97 | </div> | 97 | </div> |
98 | </div> | 98 | </div> |
99 | <div class="swiper js-news-swiper"> | 99 | <div class="swiper js-news-swiper"> |
100 | <div class="swiper-wrapper"> | 100 | <div class="swiper-wrapper"> |
101 | @if ($All_Query->count()) | 101 | @if ($All_Query->count()) |
102 | @foreach($All_Query as $Q_item) | 102 | @foreach($All_Query as $Q_item) |
103 | <div class="swiper-slide"> | 103 | <div class="swiper-slide"> |
104 | <div class="news__item"> | 104 | <div class="news__item"> |
105 | <img src="{{ asset(Storage::url($Q_item->image)) }}" alt="{{ $Q_item->title }}" class="news__item-pic"> | 105 | <img src="{{ asset(Storage::url($Q_item->image)) }}" alt="{{ $Q_item->title }}" class="news__item-pic"> |
106 | <div class="news__item-body"> | 106 | <div class="news__item-body"> |
107 | <time datetime="{{ date('d.m.Y H:i:s', strtotime($Q_item->created_at)) }}" class="news__item-date">{{ date('d.m.Y H:i:s', strtotime($Q_item->created_at)) }}</time> | 107 | <time datetime="{{ date('d.m.Y H:i:s', strtotime($Q_item->created_at)) }}" class="news__item-date">{{ date('d.m.Y H:i:s', strtotime($Q_item->created_at)) }}</time> |
108 | <span class="news__item-title">{{ $Q_item->title }}</span> | 108 | <span class="news__item-title">{{ $Q_item->title }}</span> |
109 | <span class="news__item-text">{!! $Q_item->text !!}</span> | 109 | <span class="news__item-text">{!! $Q_item->text !!}</span> |
110 | <a href="{{ route('detail_new', ['new' => $Q_item->id]) }}" class="news__item-more button button_light">Читать далее</a> | 110 | <a href="{{ route('detail_new', ['new' => $Q_item->id]) }}" class="news__item-more button button_light">Читать далее</a> |
111 | </div> | 111 | </div> |
112 | </div> | 112 | </div> |
113 | </div> | 113 | </div> |
114 | @endforeach | 114 | @endforeach |
115 | @endif | 115 | @endif |
116 | </div> | 116 | </div> |
117 | <div class="swiper-pagination"></div> | 117 | <div class="swiper-pagination"></div> |
118 | </div> | 118 | </div> |
119 | <a href="{{ route('news') }}" class="news__all button button_light">Все новости</a> | 119 | <a href="{{ route('news') }}" class="news__all button button_light">Все новости</a> |
120 | </div> | 120 | </div> |
121 | </section> | 121 | </section> |
122 | </div> | 122 | </div> |
123 | @endsection | 123 | @endsection |
124 | 124 |
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 | $(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 | 8 | ||
9 | $.ajax({ | 9 | $.ajax({ |
10 | type: "GET", | 10 | type: "GET", |
11 | url: "{{ route('shipping_companies') }}", | 11 | url: "{{ route('shipping_companies') }}", |
12 | data: "sort="+val_+"&block=1", | 12 | data: "sort="+val_+"&block=1", |
13 | success: function (data) { | 13 | success: function (data) { |
14 | console.log('Выбор сортировки'); | 14 | console.log('Выбор сортировки'); |
15 | console.log(data); | 15 | console.log(data); |
16 | $('#block_1').html(data); | 16 | $('#block_1').html(data); |
17 | }, | 17 | }, |
18 | headers: { | 18 | headers: { |
19 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | 19 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') |
20 | }, | 20 | }, |
21 | error: function (data) { | 21 | error: function (data) { |
22 | data = JSON.stringify(data); | 22 | data = JSON.stringify(data); |
23 | console.log('Error: ' + data); | 23 | console.log('Error: ' + data); |
24 | } | 24 | } |
25 | }); | 25 | }); |
26 | 26 | ||
27 | $.ajax({ | 27 | $.ajax({ |
28 | type: "GET", | 28 | type: "GET", |
29 | url: "{{ route('shipping_companies') }}", | 29 | url: "{{ route('shipping_companies') }}", |
30 | data: "sort="+val_+"&block=2", | 30 | data: "sort="+val_+"&block=2", |
31 | success: function (data) { | 31 | success: function (data) { |
32 | history.pushState({}, '', "{{ route('shipping_companies') }}?sort="+val_+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif"); | 32 | history.pushState({}, '', "{{ route('shipping_companies') }}?sort="+val_+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif"); |
33 | $('#block_2').html(data); | 33 | $('#block_2').html(data); |
34 | }, | 34 | }, |
35 | headers: { | 35 | headers: { |
36 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | 36 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') |
37 | }, | 37 | }, |
38 | error: function (data) { | 38 | error: function (data) { |
39 | data = JSON.stringify(data); | 39 | data = JSON.stringify(data); |
40 | console.log('Error: ' + data); | 40 | console.log('Error: ' + data); |
41 | } | 41 | } |
42 | }); | 42 | }); |
43 | }); | 43 | }); |
44 | 44 | ||
45 | $(document).ready(function(){ | 45 | $(document).ready(function(){ |
46 | var sel = $('#select2-sort_ajax-container'); | 46 | var sel = $('#select2-sort_ajax-container'); |
47 | var key = getUrlParameter('sort'); | 47 | var key = getUrlParameter('sort'); |
48 | if (key !=='') { | 48 | if (key !=='') { |
49 | switch (key) { | 49 | switch (key) { |
50 | case "default": sel.html('Сортировка (по умолчанию)'); break; | 50 | case "default": sel.html('Сортировка (по умолчанию)'); break; |
51 | case "name_up": sel.html('По имени (возрастание)'); break; | 51 | case "name_up": sel.html('По имени (возрастание)'); break; |
52 | case "name_down": sel.html('По дате (убывание)'); break; | 52 | case "name_down": sel.html('По дате (убывание)'); break; |
53 | case "created_at_up": sel.html('По дате (возрастание)'); break; | 53 | case "created_at_up": sel.html('По дате (возрастание)'); break; |
54 | case "created_at_down": sel.html('По дате (убывание)'); break; | 54 | case "created_at_down": sel.html('По дате (убывание)'); break; |
55 | } | 55 | } |
56 | 56 | ||
57 | } | 57 | } |
58 | }); | 58 | }); |
59 | 59 | ||
60 | $("#list_button").on('click', function () { | 60 | $("#list_button").on('click', function () { |
61 | $('#flot').removeClass('active'); | 61 | $('#flot').removeClass('active'); |
62 | $('#flot_list').removeClass('showed'); | 62 | $('#flot_list').removeClass('showed'); |
63 | $('#vacancy').addClass('active'); | 63 | $('#vacancy').addClass('active'); |
64 | $('#vacancy_list').addClass('showed'); | 64 | $('#vacancy_list').addClass('showed'); |
65 | }) | 65 | }) |
66 | 66 | ||
67 | $(document).on('click', '#send_message_to_employer', function() { | 67 | $(document).on('click', '#send_message_to_employer', function() { |
68 | var this_ = $(this); | 68 | var this_ = $(this); |
69 | 69 | ||
70 | console.log(this_.attr('data-uid'), this_.attr('data-tuid'), this_.attr('data-vacancy')) | 70 | console.log(this_.attr('data-uid'), this_.attr('data-tuid'), this_.attr('data-vacancy')) |
71 | $('#worker_user_id').val(this_.attr('data-uid')); | 71 | $('#worker_user_id').val(this_.attr('data-uid')); |
72 | $('#worker_to_user_id').val(this_.attr('data-tuid')); | 72 | $('#worker_to_user_id').val(this_.attr('data-tuid')); |
73 | $('#worker_vacancy').val(this_.attr('data-vacancy')); | 73 | $('#worker_vacancy').val(this_.attr('data-vacancy')); |
74 | }); | 74 | }); |
75 | </script> | 75 | </script> |
76 | 76 | ||
77 | @include('js.favorite-vacancy-45') | 77 | @include('js.favorite-vacancy-45') |
78 | 78 | ||
79 | @endsection | 79 | @endsection |
80 | 80 | ||
81 | @section('content') | 81 | @section('content') |
82 | <section class="thing"> | 82 | <section class="thing"> |
83 | <div class="container"> | 83 | <div class="container"> |
84 | <div class="thing__body"> | 84 | <div class="thing__body"> |
85 | <ul class="breadcrumbs thing__breadcrumbs"> | 85 | <ul class="breadcrumbs thing__breadcrumbs"> |
86 | <li><a href="{{ route('index') }}">Главная</a></li> | 86 | <li><a href="{{ route('index') }}">Главная</a></li> |
87 | <li><a href="{{ route('shipping_companies') }}">Работодатели</a></li> | 87 | <li><a href="{{ route('shipping_companies') }}">Работодатели</a></li> |
88 | <li><b>@isset($title) {{ $title }} @else Не указано @endif</b></li> | 88 | <li><b>@isset($title) {{ $title }} @else Не указано @endif</b></li> |
89 | </ul> | 89 | </ul> |
90 | @if ($company[0]->oficial_status == 1) | 90 | @if ($company[0]->oficial_status == 1) |
91 | <div class="thing__badge"> | 91 | <div class="thing__badge"> |
92 | <svg> | 92 | <svg> |
93 | <use xlink:href="{{ asset('images/sprite.svg#badge') }}"></use> | 93 | <use xlink:href="{{ asset('images/sprite.svg#badge') }}"></use> |
94 | </svg> | 94 | </svg> |
95 | Компания проверена | 95 | Компания проверена |
96 | </div> | 96 | </div> |
97 | @endif | 97 | @endif |
98 | 98 | ||
99 | @if (!empty($company[0]->logo)) | 99 | @if (!empty($company[0]->logo)) |
100 | <img src="{{ asset(Storage::url($company[0]->logo)) }}" alt="{{ $company[0]->name_company }}" class="thing__pic"> | 100 | <img src="{{ asset(Storage::url($company[0]->logo)) }}" alt="{{ $company[0]->name_company }}" class="thing__pic"> |
101 | @else | 101 | @else |
102 | <img src="{{ asset('images/logo_emp.png') }}" alt="{{ $company[0]->name_company }}" class="thing__pic"> | 102 | <img src="{{ asset('images/logo_emp.png') }}" alt="{{ $company[0]->name_company }}" class="thing__pic"> |
103 | @endif | 103 | @endif |
104 | 104 | ||
105 | <h1 class="thing__title">{{ $company[0]->name_company }}</h1> | 105 | <h1 class="thing__title">{{ $company[0]->name_company }}</h1> |
106 | <div class="thing__buttons"> | 106 | <div class="thing__buttons"> |
107 | <a href="#vacancy" id="list_button"> | 107 | <a href="#vacancy" id="list_button"> |
108 | <button type="button" class="button"> | 108 | <button type="button" class="button"> |
109 | <svg> | 109 | <svg> |
110 | <use xlink:href="{{ asset('images/sprite.svg#grid-1') }}"></use> | 110 | <use xlink:href="{{ asset('images/sprite.svg#grid-1') }}"></use> |
111 | </svg> | 111 | </svg> |
112 | {{ $company[0]->ads->count() }} вакансии | 112 | {{ $company[0]->ads->count() }} вакансии |
113 | </button> | 113 | </button> |
114 | </a> | 114 | </a> |
115 | @guest | 115 | @guest |
116 | <a | 116 | <a |
117 | data-fancybox | 117 | data-fancybox |
118 | data-src="#question" | 118 | data-src="#question" |
119 | data-options='{"touch":false,"autoFocus":false}' | 119 | data-options='{"touch":false,"autoFocus":false}' |
120 | class="button"> | 120 | class="button"> |
121 | Написать сообщение | 121 | Написать сообщение |
122 | </a> | 122 | </a> |
123 | @else | 123 | @else |
124 | @if (App\Classes\StatusUser::Status() == 1) | 124 | @if (App\Classes\StatusUser::Status() == 1) |
125 | <a | 125 | <a |
126 | id="send_message_to_employer" | 126 | id="send_message_to_employer" |
127 | data-fancybox | 127 | data-fancybox |
128 | data-src="#send3" | 128 | data-src="#send3" |
129 | data-vacancy="0" | 129 | data-vacancy="0" |
130 | data-uid="{{ $user_id }}" | 130 | data-uid="{{ $user_id }}" |
131 | data-tuid="{{ $company[0]->users->id }}" | 131 | data-tuid="{{ $company[0]->users->id }}" |
132 | data-options='{"touch":false,"autoFocus":false}' | 132 | data-options='{"touch":false,"autoFocus":false}' |
133 | class="button"> | 133 | class="button"> |
134 | Написать сообщение | 134 | Написать сообщение |
135 | </a> | 135 | </a> |
136 | @endif | 136 | @endif |
137 | @endguest | 137 | @endguest |
138 | </div> | 138 | </div> |
139 | </div> | 139 | </div> |
140 | </div> | 140 | </div> |
141 | </section> | 141 | </section> |
142 | <main class="main"> | 142 | <main class="main"> |
143 | <div class="container"> | 143 | <div class="container"> |
144 | <div class="main__employer-page"> | 144 | <div class="main__employer-page"> |
145 | <h2 class="main__employer-page-title">О компании</h2> | 145 | <h2 class="main__employer-page-title">О компании</h2> |
146 | <div class="main__employer-page-info"> | 146 | <div class="main__employer-page-info"> |
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 | {{ $company[0]->address }} | 150 | {{ $company[0]->address }} |
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 | {{ $company[0]->site }} | 156 | <a href="{{$company[0]->site}}" target="_blank"> |
157 | {{$company[0]->site}} | ||
158 | </a> | ||
157 | </span> | 159 | </span> |
158 | </div> | 160 | </div> |
159 | <div class="main__employer-page-item"> | 161 | <div class="main__employer-page-item"> |
160 | <b>Почта</b> | 162 | <b>Почта</b> |
161 | <span> | 163 | <span> |
162 | {{ $company[0]->email }} | 164 | {{ $company[0]->email }} |
163 | </span> | 165 | </span> |
164 | </div> | 166 | </div> |
165 | <div class="main__employer-page-item"> | 167 | <div class="main__employer-page-item"> |
166 | <b>Телефон</b> | 168 | <b>Телефон</b> |
167 | <span> | 169 | <span> |
168 | {{ $company[0]->telephone }} | 170 | {{ $company[0]->telephone }} |
169 | </span> | 171 | </span> |
170 | </div> | 172 | </div> |
171 | </div> | 173 | </div> |
172 | <div class="main__employer-page-info"> | 174 | <div class="main__employer-page-info"> |
173 | <div class="main__employer-page-item"></div> | 175 | <div class="main__employer-page-item"></div> |
174 | <div class="main__employer-page-item"></div> | 176 | <div class="main__employer-page-item"></div> |
175 | <div class="main__employer-page-item"> | 177 | <div class="main__employer-page-item"> |
176 | <b>Почта (alt)</b> | 178 | <b>Почта (alt)</b> |
177 | <span> | 179 | <span> |
178 | {{ $company[0]->email_2 }} | 180 | {{ $company[0]->email_2 }} |
179 | </span> | 181 | </span> |
180 | </div> | 182 | </div> |
181 | <div class="main__employer-page-item"> | 183 | <div class="main__employer-page-item"> |
182 | <b>Телефон (alt)</b> | 184 | <b>Телефон (alt)</b> |
183 | <span> | 185 | <span> |
184 | {{ $company[0]->telephone_2 }} | 186 | {{ $company[0]->telephone_2 }} |
185 | </span> | 187 | </span> |
186 | </div> | 188 | </div> |
187 | </div> | 189 | </div> |
188 | 190 | ||
189 | <div class="main__employer-page-item main__employer-page-description"> | 191 | <div class="main__employer-page-item main__employer-page-description"> |
190 | <b>Описание</b> | 192 | <b>Описание</b> |
191 | <span> | 193 | <span> |
192 | {!! $company[0]->text !!} | 194 | {!! $company[0]->text !!} |
193 | </span> | 195 | </span> |
194 | </div> | 196 | </div> |
195 | 197 | ||
196 | <div> | 198 | <div> |
197 | <div class="main__employer-page-tabs"> | 199 | <div class="main__employer-page-tabs"> |
198 | <button id="flot" type="button" class="main__employer-page-tabs-item active" data-tab="1">Флот</button> | 200 | <button id="flot" type="button" class="main__employer-page-tabs-item active" data-tab="1">Флот</button> |
199 | <button id="vacancy" type="button" class="main__employer-page-tabs-item" data-tab="2">Вакансии</button> | 201 | <button id="vacancy" type="button" class="main__employer-page-tabs-item" data-tab="2">Вакансии</button> |
200 | </div> | 202 | </div> |
201 | 203 | ||
202 | <div class="main__employer-page-body"> | 204 | <div class="main__employer-page-body"> |
203 | <div id="flot_list" class="main__employer-page-body-item showed" data-body="1"> | 205 | <div id="flot_list" class="main__employer-page-body-item showed" data-body="1"> |
204 | <div class="main__employer-page-one"> | 206 | <div class="main__employer-page-one"> |
205 | @if ($company[0]->flots->count()) | 207 | @if ($company[0]->flots->count()) |
206 | @foreach ($company[0]->flots as $flot) | 208 | @foreach ($company[0]->flots as $flot) |
207 | <div class="main__employer-page-one-item flot-one-ship"> | 209 | <div class="main__employer-page-one-item flot-one-ship"> |
208 | @if (!empty($flot->image)) | 210 | @if (!empty($flot->image)) |
209 | <a href="{{ asset(Storage::url($flot->image)) }}" data-fancybox="gallery" class="review-image-modal"> | 211 | <a href="{{ asset(Storage::url($flot->image)) }}" data-fancybox="gallery" class="review-image-modal"> |
210 | <img src="{{ asset(Storage::url($flot->image)) }}" alt="{{ $flot->name }}"> | 212 | <img src="{{ asset(Storage::url($flot->image)) }}" alt="{{ $flot->name }}"> |
211 | </a> | 213 | </a> |
212 | @else | 214 | @else |
213 | <a href="{{ asset('images/default_ship.jpg') }}" data-fancybox="gallery" class="review-image-modal"> | 215 | <a href="{{ asset('images/default_ship.jpg') }}" data-fancybox="gallery" class="review-image-modal"> |
214 | <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $flot->name }}"> | 216 | <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $flot->name }}"> |
215 | </a> | 217 | </a> |
216 | @endif | 218 | @endif |
217 | 219 | ||
218 | <div class="flot-label"><div class="flot-label-name">Название:</div>{{ $flot->name }}</div> | 220 | <div class="flot-label"><div class="flot-label-name">Название:</div>{{ $flot->name }}</div> |
219 | <div class="flot-label"><div class="flot-label-name">DWT:</div> {{ $flot->DWT }}</div> | 221 | <div class="flot-label"><div class="flot-label-name">DWT:</div> {{ $flot->DWT }}</div> |
220 | <div class="flot-label"><div class="flot-label-name">Мощность:</div> {{ $flot->POWER_GD }}</div> | 222 | <div class="flot-label"><div class="flot-label-name">Мощность:</div> {{ $flot->POWER_GD }}</div> |
221 | <div class="flot-label"><div class="flot-label-name">IMO:</div> {{ $flot->IMO }}</div> | 223 | <div class="flot-label"><div class="flot-label-name">IMO:</div> {{ $flot->IMO }}</div> |
222 | </div> | 224 | </div> |
223 | @endforeach | 225 | @endforeach |
224 | @endif | 226 | @endif |
225 | </div> | 227 | </div> |
226 | </div> | 228 | </div> |
227 | 229 | ||
228 | <div id="vacancy_list" class="main__employer-page-body-item" data-body="2"> | 230 | <div id="vacancy_list" class="main__employer-page-body-item" data-body="2"> |
229 | <div class="main__employer-page-two"> | 231 | <div class="main__employer-page-two"> |
230 | @foreach ($ads as $job) | 232 | @foreach ($ads as $job) |
231 | <div class="main__employer-page-two-item"> | 233 | <div class="main__employer-page-two-item"> |
232 | <div class="main__employer-page-two-item-toper"> | 234 | <div class="main__employer-page-two-item-toper"> |
233 | @if (!empty($company[0]->logo)) | 235 | @if (!empty($company[0]->logo)) |
234 | <img src="{{ asset(Storage::url($company[0]->logo)) }}" alt="{{ $job->name }}"> | 236 | <img src="{{ asset(Storage::url($company[0]->logo)) }}" alt="{{ $job->name }}"> |
235 | @else | 237 | @else |
236 | <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $job->name }}"> | 238 | <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $job->name }}"> |
237 | @endif | 239 | @endif |
238 | <span>{{ $company[0]->name_company }}</span> | 240 | <span>{{ $company[0]->name_company }}</span> |
239 | </div> | 241 | </div> |
240 | <div class="main__employer-page-two-item-text-body"> | 242 | <div class="main__employer-page-two-item-text-body"> |
241 | <h3>{{ $job->name }}</h3> | 243 | <h3>{{ $job->name }}</h3> |
242 | <span>Описание: | 244 | <span>Описание: |
243 | {!! $job->text !!} | 245 | {!! $job->text !!} |
244 | </span> | 246 | </span> |
245 | </div> | 247 | </div> |
246 | 248 | ||
247 | @if ((isset($job->jobs)) && ($job->jobs->count())) | 249 | @if ((isset($job->jobs)) && ($job->jobs->count())) |
248 | <div class="main__employer-page-two-item-tags"> | 250 | <div class="main__employer-page-two-item-tags"> |
249 | @foreach ($job->jobs as $item) | 251 | @foreach ($job->jobs as $item) |
250 | <span class="main__employer-page-two-item-tag">#{{ $item->name }}</span> | 252 | <span class="main__employer-page-two-item-tag">#{{ $item->name }}</span> |
251 | @endforeach | 253 | @endforeach |
252 | </div> | 254 | </div> |
253 | @endif | 255 | @endif |
254 | <div class="main__employer-page-two-item-buttons"> | 256 | <div class="main__employer-page-two-item-buttons"> |
255 | <button type="button" | 257 | <button type="button" |
256 | data-fancybox | 258 | data-fancybox |
257 | data-src="#send3" | 259 | data-src="#send3" |
258 | data-vacancy="{{ $job->id }}" | 260 | data-vacancy="{{ $job->id }}" |
259 | data-uid="{{ $user_id }}" | 261 | data-uid="{{ $user_id }}" |
260 | data-tuid="{{ $company[0]->users->id }}" | 262 | data-tuid="{{ $company[0]->users->id }}" |
261 | data-options='{"touch":false,"autoFocus":false}' | 263 | data-options='{"touch":false,"autoFocus":false}' |
262 | class="button main__employer-page-two-item-button js_send_it_button" | 264 | class="button main__employer-page-two-item-button js_send_it_button" |
263 | > | 265 | > |
264 | Оставить отклик | 266 | Оставить отклик |
265 | </button> | 267 | </button> |
266 | </div> | 268 | </div> |
267 | <div class="main__employer-page-two-item-bottom"> | 269 | <div class="main__employer-page-two-item-bottom"> |
268 | <div class="main__employer-page-two-item-bottom-date">{{ date('d.m.Y H:i:s', strtotime($job->updated_at)) }}</div> | 270 | <div class="main__employer-page-two-item-bottom-date">{{ date('d.m.Y H:i:s', strtotime($job->updated_at)) }}</div> |
269 | <button type="button" id="like{{ $job->id }}" data-val="{{ $job->id }}" | 271 | <button type="button" id="like{{ $job->id }}" data-val="{{ $job->id }}" |
270 | class="like main__employer-page-two-item-bottom-like js-toggle js_vac_favorite {{ \App\Classes\LikesClass::get_status_vacancy($job) }}"> | 272 | class="like main__employer-page-two-item-bottom-like js-toggle js_vac_favorite {{ \App\Classes\LikesClass::get_status_vacancy($job) }}"> |
271 | <svg> | 273 | <svg> |
272 | <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use> | 274 | <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use> |
273 | </svg> | 275 | </svg> |
274 | </button> | 276 | </button> |
275 | </div> | 277 | </div> |
276 | </div> | 278 | </div> |
277 | @endforeach | 279 | @endforeach |
278 | 280 | ||
279 | <div style="margin-top: 20px"> | 281 | <div style="margin-top: 20px"> |
280 | {{ $ads->onEachSide(0)->appends($_GET)->links('paginate') }} | 282 | {{ $ads->onEachSide(0)->appends($_GET)->links('paginate') }} |
281 | </div> | 283 | </div> |
282 | <!--<button type="button" class="button button_light button_more main__employer-page-two-more js-toggle js-parent-toggle"> | 284 | <!--<button type="button" class="button button_light button_more main__employer-page-two-more js-toggle js-parent-toggle"> |
283 | <span>Показать ещё</span> | 285 | <span>Показать ещё</span> |
284 | <span>Скрыть</span> | 286 | <span>Скрыть</span> |
285 | </button>--> | 287 | </button>--> |
286 | </div> | 288 | </div> |
287 | </div> | 289 | </div> |
288 | </div> | 290 | </div> |
289 | </div> | 291 | </div> |
290 | </div> | 292 | </div> |
291 | </div> | 293 | </div> |
292 | </main> | 294 | </main> |
293 | @endsection | 295 | @endsection |
294 | 296 |