Commit 8e751f1fb4e34c82de1af0ad4177b105703b0cde
1 parent
1c76a4cadc
Exists in
master
and in
1 other branch
Мелкий шрифт вторая часть
Showing 1 changed file with 2 additions and 2 deletions Inline Diff
resources/views/admin/ad_employers/index.blade.php
1 | @extends('layout.admin', ['title' => 'Админка - Вакансии']) | 1 | @extends('layout.admin', ['title' => 'Админка - Вакансии']) |
2 | 2 | ||
3 | @section('script') | 3 | @section('script') |
4 | <script> | 4 | <script> |
5 | $(document).ready(function() { | 5 | $(document).ready(function() { |
6 | $(document).on('click', '#refresh_btn', function () { | 6 | $(document).on('click', '#refresh_btn', function () { |
7 | var this_ = $(this); | 7 | var this_ = $(this); |
8 | var ajax_block = $('#ajax_block'); | 8 | var ajax_block = $('#ajax_block'); |
9 | var mas = []; | 9 | var mas = []; |
10 | var str_get = ''; | 10 | var str_get = ''; |
11 | 11 | ||
12 | $('input:checkbox:checked').each(function(){ | 12 | $('input:checkbox:checked').each(function(){ |
13 | mas.push($(this).val()); | 13 | mas.push($(this).val()); |
14 | console.log($(this).val()); | 14 | console.log($(this).val()); |
15 | }); | 15 | }); |
16 | 16 | ||
17 | $.ajax({ | 17 | $.ajax({ |
18 | type: "GET", | 18 | type: "GET", |
19 | dataType: 'html', | 19 | dataType: 'html', |
20 | url: "{{ url()->full()}}", | 20 | url: "{{ url()->full()}}", |
21 | data: ({data:mas}), | 21 | data: ({data:mas}), |
22 | success: function (data) { | 22 | success: function (data) { |
23 | console.log('Обновление таблицы пользователей '); | 23 | console.log('Обновление таблицы пользователей '); |
24 | //data = JSON.parse(data); | 24 | //data = JSON.parse(data); |
25 | //console.log(data); | 25 | //console.log(data); |
26 | ajax_block.html(data); | 26 | ajax_block.html(data); |
27 | }, | 27 | }, |
28 | headers: { | 28 | headers: { |
29 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | 29 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') |
30 | }, | 30 | }, |
31 | error: function (data) { | 31 | error: function (data) { |
32 | console.log('Error: ' + data); | 32 | console.log('Error: ' + data); |
33 | } | 33 | } |
34 | }); | 34 | }); |
35 | }); | 35 | }); |
36 | }); | 36 | }); |
37 | </script> | 37 | </script> |
38 | @endsection | 38 | @endsection |
39 | 39 | ||
40 | @section('search') | 40 | @section('search') |
41 | @include('admin.find_ad_employer', ['select_job' => $select_job]) | 41 | @include('admin.find_ad_employer', ['select_job' => $select_job]) |
42 | @endsection | 42 | @endsection |
43 | 43 | ||
44 | @section('content') | 44 | @section('content') |
45 | <div class="grid gap-6 mb-8 md:grid-cols-2 xl:grid-cols-4"> | 45 | <div class="grid gap-6 mb-8 md:grid-cols-2 xl:grid-cols-4"> |
46 | 46 | ||
47 | <div class="flex items-center p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800"> | 47 | <div class="flex items-center p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800"> |
48 | <div class="p-3 mr-4 text-orange-500 bg-orange-100 rounded-full dark:text-orange-100 dark:bg-orange-500"> | 48 | <div class="p-3 mr-4 text-orange-500 bg-orange-100 rounded-full dark:text-orange-100 dark:bg-orange-500"> |
49 | <svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"> | 49 | <svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"> |
50 | <path | 50 | <path |
51 | d="M13 6a3 3 0 11-6 0 3 3 0 016 0zM18 8a2 2 0 11-4 0 2 2 0 014 0zM14 15a4 4 0 00-8 0v3h8v-3zM6 8a2 2 0 11-4 0 2 2 0 014 0zM16 18v-3a5.972 5.972 0 00-.75-2.906A3.005 3.005 0 0119 15v3h-3zM4.75 12.094A5.973 5.973 0 004 15v3H1v-3a3 3 0 013.75-2.906z"></path> | 51 | d="M13 6a3 3 0 11-6 0 3 3 0 016 0zM18 8a2 2 0 11-4 0 2 2 0 014 0zM14 15a4 4 0 00-8 0v3h8v-3zM6 8a2 2 0 11-4 0 2 2 0 014 0zM16 18v-3a5.972 5.972 0 00-.75-2.906A3.005 3.005 0 0119 15v3h-3zM4.75 12.094A5.973 5.973 0 004 15v3H1v-3a3 3 0 013.75-2.906z"></path> |
52 | </svg> | 52 | </svg> |
53 | </div> | 53 | </div> |
54 | <div> | 54 | <div> |
55 | <p class="mb-2 text-sm font-medium text-gray-600 dark:text-gray-400"> | 55 | <p class="mb-2 text-sm font-medium text-gray-600 dark:text-gray-400"> |
56 | Всего вакансий | 56 | Всего вакансий |
57 | </p> | 57 | </p> |
58 | <p class="text-lg font-semibold text-gray-700 dark:text-gray-200"> | 58 | <p class="text-lg font-semibold text-gray-700 dark:text-gray-200"> |
59 | {{ $all_ad }} | 59 | {{ $all_ad }} |
60 | </p> | 60 | </p> |
61 | </div> | 61 | </div> |
62 | </div> | 62 | </div> |
63 | </div> | 63 | </div> |
64 | 64 | ||
65 | <div> | 65 | <div> |
66 | <button style="margin-bottom: 10px; width:165px; display: inline-block;" id="refresh_btn" name="refresh_btn" class="px-3 py-1 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-md active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple"> | 66 | <button style="margin-bottom: 10px; width:165px; display: inline-block;" id="refresh_btn" name="refresh_btn" class="px-3 py-1 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-md active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple"> |
67 | Обновить вакансии | 67 | Обновить вакансии |
68 | </button> | 68 | </button> |
69 | <a href="{{ route('admin.add-ad-employers') }}" style="margin-bottom: 10px; width:310px; display: inline-block;" class="px-3 py-1 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-md active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple"> | 69 | <a href="{{ route('admin.add-ad-employers') }}" style="margin-bottom: 10px; width:310px; display: inline-block;" class="px-3 py-1 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-md active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple"> |
70 | Добавить вакансии от администратора | 70 | Добавить вакансии от администратора |
71 | </a> | 71 | </a> |
72 | </div> | 72 | </div> |
73 | <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block"> | 73 | <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block"> |
74 | <div class="w-full overflow-x-auto"> | 74 | <div class="w-full overflow-x-auto"> |
75 | <table class="w-full whitespace-no-wrap"> | 75 | <table class="w-full whitespace-no-wrap"> |
76 | <thead> | 76 | <thead> |
77 | <tr | 77 | <tr |
78 | class="text-xs font-semibold tracking-wide text-left text-gray-500 uppercase border-b dark:border-gray-700 bg-gray-50 dark:text-gray-400 dark:bg-gray-800" | 78 | class="text-xs font-semibold tracking-wide text-left text-gray-500 uppercase border-b dark:border-gray-700 bg-gray-50 dark:text-gray-400 dark:bg-gray-800" |
79 | > | 79 | > |
80 | <th class="px-4 py-3"></th> | 80 | <th class="px-4 py-3"></th> |
81 | <th class="px-4 py-3 class1">№</th> | 81 | <th class="px-4 py-3 class1">№</th> |
82 | <th class="px-4 py-3 class2">Лого/Заголовок/Компания</th> | 82 | <th class="px-4 py-3 class2">Лого/Заголовок/Компания</th> |
83 | <th class="px-4 py-3 class4">Должности</th> | 83 | <th class="px-4 py-3 class4">Должности</th> |
84 | <th class="px-4 py-3 class5">Избр.</th> | 84 | <th class="px-4 py-3 class5">Избр.</th> |
85 | <th class="px-4 py-3 class6">Сроч.</th> | 85 | <th class="px-4 py-3 class6">Сроч.</th> |
86 | <th class="px-4 py-3 class7">Статус</th> | 86 | <th class="px-4 py-3 class7">Статус</th> |
87 | <th class="px-4 py-3 class8">Дата создан/<br>изменен.</th> | 87 | <th class="px-4 py-3 class8">Дата создан/<br>изменен.</th> |
88 | <th class="px-4 py-3 class10">Изменить</th> | 88 | <th class="px-4 py-3 class10">Изменить</th> |
89 | </tr> | 89 | </tr> |
90 | </thead> | 90 | </thead> |
91 | <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"> | 91 | <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"> |
92 | @foreach($ad_employers as $ad) | 92 | @foreach($ad_employers as $ad) |
93 | <tr class="text-gray-700 dark:text-gray-400"> | 93 | <tr class="text-gray-700 dark:text-gray-400"> |
94 | <td class="px-4 py-3 class1 text-xs"> | 94 | <td class="px-4 py-3 class1 text-xs"> |
95 | <input type="checkbox" class="box" name="vacan_{{$ad->id}}" id="vacan_{{$ad->id}}" value="{{$ad->id}}"/> | 95 | <input type="checkbox" class="box" name="vacan_{{$ad->id}}" id="vacan_{{$ad->id}}" value="{{$ad->id}}"/> |
96 | </td> | 96 | </td> |
97 | <td class="px-4 py-3 class1 text-xs"> | 97 | <td class="px-4 py-3 class1 text-xs"> |
98 | {{$ad->id}} | 98 | {{$ad->id}} |
99 | </td> | 99 | </td> |
100 | <td class="px-4 py-3 class2 text-xs"> | 100 | <td class="px-4 py-3 class2 text-xs"> |
101 | <div class="flex items-center text-sm text-xs"> | 101 | <div class="flex items-center text-sm text-xs"> |
102 | <div | 102 | <div |
103 | class="relative hidden w-8 h-8 mr-3 rounded-full md:block" | 103 | class="relative hidden w-8 h-8 mr-3 rounded-full md:block" |
104 | > | 104 | > |
105 | @if (isset($ad->employer->logo)) | 105 | @if (isset($ad->employer->logo)) |
106 | <img | 106 | <img |
107 | class="object-cover w-full h-full rounded-full" | 107 | class="object-cover w-full h-full rounded-full" |
108 | src="{{ asset(Storage::url($ad->employer->logo)) }}" | 108 | src="{{ asset(Storage::url($ad->employer->logo)) }}" |
109 | alt="" | 109 | alt="" |
110 | loading="lazy" | 110 | loading="lazy" |
111 | /> | 111 | /> |
112 | @endif | 112 | @endif |
113 | <div | 113 | <div |
114 | class="absolute inset-0 rounded-full shadow-inner" | 114 | class="absolute inset-0 rounded-full shadow-inner" |
115 | aria-hidden="true" | 115 | aria-hidden="true" |
116 | ></div> | 116 | ></div> |
117 | </div> | 117 | </div> |
118 | <div class="text-xs"> | 118 | <div class="text-xs"> |
119 | <p class="font-semibold">{{$ad->name}}</p> | 119 | <p class="font-semibold">{{$ad->name}}</p> |
120 | <p class="text-xs text-gray-600 dark:text-gray-400"> | 120 | <p class="text-xs text-gray-600 dark:text-gray-400"> |
121 | {{$ad->employer->name_company}} | 121 | {{$ad->employer->name_company}} |
122 | </p> | 122 | </p> |
123 | </div> | 123 | </div> |
124 | </div> | 124 | </div> |
125 | </td> | 125 | </td> |
126 | 126 | ||
127 | <td class="px-4 py-3 class4 text-xs"> | 127 | <td class="px-4 py-3 class4 text-xs"> |
128 | <div class="flex items-center text-sm text-xs"> | 128 | <div class="flex items-center text-sm text-xs"> |
129 | @if ($ad->jobs->count()) | 129 | @if ($ad->jobs->count()) |
130 | <div> | 130 | <div> |
131 | <?php $i = 0;?> | 131 | <?php $i = 0;?> |
132 | @foreach ($ad->jobs as $title) | 132 | @foreach ($ad->jobs as $title) |
133 | <?php if ($i==0) {?> | 133 | <?php if ($i==0) {?> |
134 | <p class="font-semibold">{{ mb_strimwidth($title->name, 0, 35, "...") }}</p> | 134 | <p class="font-semibold text-xs">{{ mb_strimwidth($title->name, 0, 35, "...") }}</p> |
135 | <?php } else {?> | 135 | <?php } else {?> |
136 | <p class="font-semibold">/ {{ mb_strimwidth($title->name, 0, 35, "...") }}</p> | 136 | <p class="font-semibold text-xs">/ {{ mb_strimwidth($title->name, 0, 35, "...") }}</p> |
137 | <?php } | 137 | <?php } |
138 | $i++; | 138 | $i++; |
139 | ?> | 139 | ?> |
140 | @endforeach | 140 | @endforeach |
141 | </div> | 141 | </div> |
142 | @endif | 142 | @endif |
143 | </div> | 143 | </div> |
144 | 144 | ||
145 | </td> | 145 | </td> |
146 | 146 | ||
147 | <td class="px-4 py-3 text-sm class5 text-xs"> | 147 | <td class="px-4 py-3 text-sm class5 text-xs"> |
148 | @if ($ad->favorite_vacancy==1) | 148 | @if ($ad->favorite_vacancy==1) |
149 | <span class="px-2 py-1 font-semibold leading-tight text-green-700 bg-green-100 rounded-full dark:bg-green-700 dark:text-green-100"> | 149 | <span class="px-2 py-1 font-semibold leading-tight text-green-700 bg-green-100 rounded-full dark:bg-green-700 dark:text-green-100"> |
150 | Да | 150 | Да |
151 | </span> | 151 | </span> |
152 | @else | 152 | @else |
153 | <span class="px-2 py-1 font-semibold leading-tight text-orange-700 bg-orange-100 rounded-full dark:text-white dark:bg-orange-600"> | 153 | <span class="px-2 py-1 font-semibold leading-tight text-orange-700 bg-orange-100 rounded-full dark:text-white dark:bg-orange-600"> |
154 | Нет | 154 | Нет |
155 | </span> | 155 | </span> |
156 | @endif | 156 | @endif |
157 | </td> | 157 | </td> |
158 | 158 | ||
159 | <td class="px-4 py-3 text-sm class6 text-xs"> | 159 | <td class="px-4 py-3 text-sm class6 text-xs"> |
160 | @if ($ad->sroch_vacancy==1) | 160 | @if ($ad->sroch_vacancy==1) |
161 | <span class="px-2 py-1 font-semibold leading-tight text-green-700 bg-green-100 rounded-full dark:bg-green-700 dark:text-green-100"> | 161 | <span class="px-2 py-1 font-semibold leading-tight text-green-700 bg-green-100 rounded-full dark:bg-green-700 dark:text-green-100"> |
162 | Да | 162 | Да |
163 | </span> | 163 | </span> |
164 | @else | 164 | @else |
165 | <span class="px-2 py-1 font-semibold leading-tight text-orange-700 bg-orange-100 rounded-full dark:text-white dark:bg-orange-600"> | 165 | <span class="px-2 py-1 font-semibold leading-tight text-orange-700 bg-orange-100 rounded-full dark:text-white dark:bg-orange-600"> |
166 | Нет | 166 | Нет |
167 | </span> | 167 | </span> |
168 | @endif | 168 | @endif |
169 | </td> | 169 | </td> |
170 | 170 | ||
171 | <td class="px-4 py-3 text-sm class7 text-xs"> | 171 | <td class="px-4 py-3 text-sm class7 text-xs"> |
172 | {{ $ad->status }} | 172 | {{ $ad->status }} |
173 | </td> | 173 | </td> |
174 | 174 | ||
175 | <td class="px-4 py-3 text-sm class8 text-xs"> | 175 | <td class="px-4 py-3 text-sm class8 text-xs"> |
176 | <div class="flex items-center text-xs"> | 176 | <div class="flex items-center text-xs"> |
177 | <div> | 177 | <div> |
178 | <p class="font-semibold">{{ date('d.m.Y', strtotime($ad->created_at)) }}</p> | 178 | <p class="font-semibold">{{ date('d.m.Y', strtotime($ad->created_at)) }}</p> |
179 | <p class="text-xs text-gray-600 dark:text-gray-400"> | 179 | <p class="text-xs text-gray-600 dark:text-gray-400"> |
180 | {{ date('d.m.Y', strtotime($ad->updated_at)) }} | 180 | {{ date('d.m.Y', strtotime($ad->updated_at)) }} |
181 | </p> | 181 | </p> |
182 | </div> | 182 | </div> |
183 | </div> | 183 | </div> |
184 | 184 | ||
185 | </td> | 185 | </td> |
186 | 186 | ||
187 | <td class="px-4 py-3 text-sm class10 text-xs"> | 187 | <td class="px-4 py-3 text-sm class10 text-xs"> |
188 | <form action="{{ route('admin.delete-ad-employer', ['ad_employer' => $ad->id]) }}" method="POST"> | 188 | <form action="{{ route('admin.delete-ad-employer', ['ad_employer' => $ad->id]) }}" method="POST"> |
189 | <a class="text-xs" href="{{ route('admin.edit-ad-employers', ['ad_employer' => $ad->id]) }}">Изменить</a> | | 189 | <a class="text-xs" href="{{ route('admin.edit-ad-employers', ['ad_employer' => $ad->id]) }}">Изменить</a> | |
190 | @csrf | 190 | @csrf |
191 | @method('DELETE') | 191 | @method('DELETE') |
192 | <input class="btn btn-danger text-xs" type="submit" value="Удалить"/> | 192 | <input class="btn btn-danger text-xs" type="submit" value="Удалить"/> |
193 | </form> | 193 | </form> |
194 | </td> | 194 | </td> |
195 | </tr> | 195 | </tr> |
196 | @endforeach | 196 | @endforeach |
197 | </tbody> | 197 | </tbody> |
198 | </table> | 198 | </table> |
199 | </div> | 199 | </div> |
200 | 200 | ||
201 | <div class="grid px-4 py-3 text-xs font-semibold tracking-wide text-gray-500 uppercase border-t dark:border-gray-700 bg-gray-50 sm:grid-cols-9 dark:text-gray-400 dark:bg-gray-800"> | 201 | <div class="grid px-4 py-3 text-xs font-semibold tracking-wide text-gray-500 uppercase border-t dark:border-gray-700 bg-gray-50 sm:grid-cols-9 dark:text-gray-400 dark:bg-gray-800"> |
202 | {{ $ad_employers->appends($_GET)->links('admin.pagginate') }} | 202 | {{ $ad_employers->appends($_GET)->links('admin.pagginate') }} |
203 | </div> | 203 | </div> |
204 | </div> | 204 | </div> |
205 | @endsection | 205 | @endsection |
206 | 206 |