Commit 317ccb4622dc754d841a15bf677f410524284067

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

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

Showing 3 changed files 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">Дата создан/изменен.</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"> 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> 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"> 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">{{$title->name}}</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">/ {{$title->name}}</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 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" 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
resources/views/admin/education/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 const btns = document.querySelectorAll('.btn_del'); 5 const btns = document.querySelectorAll('.btn_del');
6 btns.forEach(btn => { 6 btns.forEach(btn => {
7 btn.addEventListener('click', (e) => { 7 btn.addEventListener('click', (e) => {
8 console.log('click button'); 8 console.log('click button');
9 let id = e.target.id; 9 let id = e.target.id;
10 let form = document.getElementById("form_modal_del"); 10 let form = document.getElementById("form_modal_del");
11 form.action = "<?=$_SERVER['APP_URL']?>admin/education/"+e.target.getAttribute('data-education'); 11 form.action = "<?=$_SERVER['APP_URL']?>admin/education/"+e.target.getAttribute('data-education');
12 //document.getElementById("title_modal").innerHTML = id; 12 //document.getElementById("title_modal").innerHTML = id;
13 console.log(e.target.getAttribute('data-education')); 13 console.log(e.target.getAttribute('data-education'));
14 }); 14 });
15 }); 15 });
16 </script> 16 </script>
17 @endsection 17 @endsection
18 18
19 @section('modal') 19 @section('modal')
20 @include('admin.education.modal') 20 @include('admin.education.modal')
21 @endsection 21 @endsection
22 22
23 @section('search') 23 @section('search')
24 24
25 @endsection 25 @endsection
26 26
27 @section('content') 27 @section('content')
28 28
29 <a href="{{ route('admin.education.create') }}" style="width: 195px" 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"> 29 <a href="{{ route('admin.education.create') }}" style="width: 195px" 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">
30 Добавить образование 30 Добавить образование
31 </a> 31 </a>
32 <br> 32 <br>
33 <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block"> 33 <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block">
34 34
35 <div class="w-full overflow-x-auto"> 35 <div class="w-full overflow-x-auto">
36 <table class="w-full whitespace-no-wrap"> 36 <table class="w-full whitespace-no-wrap">
37 <thead> 37 <thead>
38 <tr 38 <tr
39 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" 39 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"
40 > 40 >
41 <th class="px-4 py-3">№</th> 41 <th class="px-4 py-3">№</th>
42 <th class="px-4 py-3">Название образования</th> 42 <th class="px-4 py-3">Название образования</th>
43 <th class="px-4 py-3">Редактировать</th> 43 <th class="px-4 py-3">Редактировать</th>
44 <th class="px-4 py-3">Дата создан/изменен</th> 44 <th class="px-4 py-3">Дата создан/изменен</th>
45 </tr> 45 </tr>
46 </thead> 46 </thead>
47 <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"> 47 <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800">
48 @foreach($education as $cat) 48 @foreach($education as $cat)
49 <tr class="text-gray-700 dark:text-gray-400"> 49 <tr class="text-gray-700 dark:text-gray-400">
50 <td class="px-4 py-3"> 50 <td class="px-4 py-3 text-xs">
51 {{$cat->id}} 51 {{$cat->id}}
52 </td> 52 </td>
53 <td class="px-4 py-3"> 53 <td class="px-4 py-3 text-xs">
54 {{ mb_strimwidth($cat->name, 0, 50, "...") }} 54 {{ mb_strimwidth($cat->name, 0, 50, "...") }}
55 </td> 55 </td>
56 56
57 <td class="px-4 py-3 text-sm_"> 57 <td class="px-4 py-3 text-sm_ text-xs">
58 @if ($cat->id) 58 @if ($cat->id)
59 <a href="{{ route('admin.education.edit', ['education' => $cat->id]) }}">Изменить</a> 59 <a href="{{ route('admin.education.edit', ['education' => $cat->id]) }}">Изменить</a>
60 | <a @click="openModal" style="cursor: pointer;" data-education="{{$cat->id}}" class="btn_del btn btn-danger">Удалить</a> 60 | <a @click="openModal" style="cursor: pointer;" data-education="{{$cat->id}}" class="btn_del btn btn-danger">Удалить</a>
61 @endif 61 @endif
62 </td> 62 </td>
63 <td class="px-4 py-3"> 63 <td class="px-4 py-3 text-xs">
64 <div class="flex items-center text-sm"> 64 <div class="flex items-center text-sm">
65 <div> 65 <div>
66 <p class="font-semibold">{{ date('d.m.Y', strtotime($cat->created_at)) }}</p> 66 <p class="font-semibold">{{ date('d.m.Y', strtotime($cat->created_at)) }}</p>
67 <p class="text-xs text-gray-600 dark:text-gray-400"> 67 <p class="text-xs text-gray-600 dark:text-gray-400">
68 {{ date('d.m.Y', strtotime($cat->updated_at)) }} 68 {{ date('d.m.Y', strtotime($cat->updated_at)) }}
69 </p> 69 </p>
70 </div> 70 </div>
71 </div> 71 </div>
72 </td> 72 </td>
73 </tr> 73 </tr>
74 @endforeach 74 @endforeach
75 </tbody> 75 </tbody>
76 </table> 76 </table>
77 </div> 77 </div>
78 78
79 <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"> 79 <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">
80 <?=$education->appends($_GET)->links('admin.pagginate'); ?> 80 <?=$education->appends($_GET)->links('admin.pagginate'); ?>
81 </div> 81 </div>
82 </div> 82 </div>
83 @endsection 83 @endsection
84 84
resources/views/admin/job_titles/index.blade.php
1 @extends('layout.admin', ['title' => 'Админка - Справочник Должности']) 1 @extends('layout.admin', ['title' => 'Админка - Справочник Должности'])
2 2
3 @section('script') 3 @section('script')
4 @endsection 4 @endsection
5 5
6 @section('search') 6 @section('search')
7 <!--<div class="absolute inset-y-0 flex items-center pl-2"> 7 <!--<div class="absolute inset-y-0 flex items-center pl-2">
8 <svg 8 <svg
9 class="w-4 h-4" 9 class="w-4 h-4"
10 aria-hidden="true" 10 aria-hidden="true"
11 fill="currentColor" 11 fill="currentColor"
12 viewBox="0 0 20 20" 12 viewBox="0 0 20 20"
13 > 13 >
14 <path 14 <path
15 fill-rule="evenodd" 15 fill-rule="evenodd"
16 d="M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z" 16 d="M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z"
17 clip-rule="evenodd" 17 clip-rule="evenodd"
18 ></path> 18 ></path>
19 </svg> 19 </svg>
20 </div> 20 </div>
21 <form action="" method="POST"> 21 <form action="" method="POST">
22 <div style="float:left;"><input 22 <div style="float:left;"><input
23 class="w-full pl-8 pr-2 text-sm text-gray-700 placeholder-gray-600 bg-gray-100 border-0 rounded-md dark:placeholder-gray-500 dark:focus:shadow-outline-gray dark:focus:placeholder-gray-600 dark:bg-gray-700 dark:text-gray-200 focus:placeholder-gray-500 focus:bg-white focus:border-purple-300 focus:outline-none focus:shadow-outline-purple form-input" 23 class="w-full pl-8 pr-2 text-sm text-gray-700 placeholder-gray-600 bg-gray-100 border-0 rounded-md dark:placeholder-gray-500 dark:focus:shadow-outline-gray dark:focus:placeholder-gray-600 dark:bg-gray-700 dark:text-gray-200 focus:placeholder-gray-500 focus:bg-white focus:border-purple-300 focus:outline-none focus:shadow-outline-purple form-input"
24 style="width: 400px" 24 style="width: 400px"
25 type="text" 25 type="text"
26 placeholder="Искать..." 26 placeholder="Искать..."
27 aria-label="Search" 27 aria-label="Search"
28 /></div> 28 /></div>
29 <div style="float: left"> 29 <div style="float: left">
30 <button type="submit" class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple">Искать</button> 30 <button type="submit" class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple">Искать</button>
31 </div> 31 </div>
32 </form>--> 32 </form>-->
33 @endsection 33 @endsection
34 34
35 @section('content') 35 @section('content')
36 <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block"> 36 <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block">
37 <div class="w-full overflow-x-auto"> 37 <div class="w-full overflow-x-auto">
38 <a 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" href="{{ route('admin.job-titles.create') }}">Создать должность</a><br><br> 38 <a 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" href="{{ route('admin.job-titles.create') }}">Создать должность</a><br><br>
39 <table class="w-full whitespace-no-wrap"> 39 <table class="w-full whitespace-no-wrap">
40 <thead> 40 <thead>
41 <tr 41 <tr
42 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" 42 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"
43 > 43 >
44 <th class="px-4 py-3">№</th> 44 <th class="px-4 py-3">№</th>
45 <th class="px-4 py-3">Родитель</th> 45 <th class="px-4 py-3">Родитель</th>
46 <th class="px-4 py-3">Должность</th> 46 <th class="px-4 py-3">Должность</th>
47 <th class="px-4 py-3">Сортировка</th> 47 <th class="px-4 py-3">Сортировка</th>
48 <th class="px-4 py-3">Дата создания</th> 48 <th class="px-4 py-3">Дата создания</th>
49 <th class="px-4 py-3">Изменить</th> 49 <th class="px-4 py-3">Изменить</th>
50 </tr> 50 </tr>
51 </thead> 51 </thead>
52 <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"> 52 <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800">
53 @foreach($Jobs as $job) 53 @foreach($Jobs as $job)
54 <tr class="text-gray-700 dark:text-gray-400"> 54 <tr class="text-gray-700 dark:text-gray-400">
55 <td class="px-4 py-3"> 55 <td class="px-4 py-3 text-xs">
56 {{$job->id}} 56 {{$job->id}}
57 </td> 57 </td>
58 <td class="px-4 py-3"> 58 <td class="px-4 py-3 text-xs">
59 @if (empty($job->parent->id)) 59 @if (empty($job->parent->id))
60 Не задан 60 Не задан
61 @else 61 @else
62 {{$job->parent->name}} ({{$job->parent->id}}) 62 {{ mb_strimwidth($job->parent->name, 0, 35, "...") }}({{$job->parent->id}})
63 @endif 63 @endif
64 </td> 64 </td>
65 <td class="px-4 py-3"> 65 <td class="px-4 py-3 text-xs">
66 {{$job->name}} 66 {{ mb_strimwidth($job->name, 0, 35, "...") }}
67 </td> 67 </td>
68 <td class="px-4 py-3"> 68 <td class="px-4 py-3 text-xs">
69 {{$job->sort}} 69 {{$job->sort}}
70 </td> 70 </td>
71 <td class="px-4 py-3 text-sm"> 71 <td class="px-4 py-3 text-sm text-xs">
72 {{ $job->created_at }} 72 {{ $job->created_at }}
73 </td> 73 </td>
74 <td class="px-4 py-3 text-sm_"> 74 <td class="px-4 py-3 text-sm_ text-xs">
75 <form action="{{ route('admin.job-titles.destroy', ['job_title' => $job->id]) }}" method="POST"> 75 <form action="{{ route('admin.job-titles.destroy', ['job_title' => $job->id]) }}" method="POST">
76 <a href="{{ route('admin.job-titles.edit', ['job_title' => $job->id]) }}">Изменить</a> | 76 <a href="{{ route('admin.job-titles.edit', ['job_title' => $job->id]) }}">Изменить</a> |
77 @csrf 77 @csrf
78 @method('DELETE') 78 @method('DELETE')
79 <input class="btn btn-danger" type="submit" value="Удалить"/> 79 <input class="btn btn-danger" type="submit" value="Удалить"/>
80 </form> 80 </form>
81 </td> 81 </td>
82 </tr> 82 </tr>
83 @endforeach 83 @endforeach
84 </tbody> 84 </tbody>
85 </table> 85 </table>
86 </div> 86 </div>
87 87
88 <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"> 88 <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">
89 <?=$Jobs->appends($_GET)->links('admin.pagginate'); ?> 89 <?=$Jobs->appends($_GET)->links('admin.pagginate'); ?>
90 </div> 90 </div>
91 </div> 91 </div>
92 @endsection 92 @endsection
93 93