Commit e905cec2e3ac20308528eb1a4dc638899df8ceb2

Authored by Андрей Ларионов
1 parent 86a17538a5

Диалоговые окна удаления в работодателях и рекламе

Showing 3 changed files with 111 additions and 4 deletions Inline Diff

resources/views/admin/employer/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', '.checkban', function () { 6 $(document).on('click', '.checkban', function () {
7 var this_ = $(this); 7 var this_ = $(this);
8 var value = this_.val(); 8 var value = this_.val();
9 var ajax_block = $('#ajax_block'); 9 var ajax_block = $('#ajax_block');
10 var bool = 0; 10 var bool = 0;
11 11
12 if(this.checked){ 12 if(this.checked){
13 bool = 1; 13 bool = 1;
14 } else { 14 } else {
15 bool = 0; 15 bool = 0;
16 } 16 }
17 17
18 $.ajax({ 18 $.ajax({
19 type: "GET", 19 type: "GET",
20 url: "{{ url()->full()}}", 20 url: "{{ url()->full()}}",
21 data: "id=" + value + "&is_ban=" + bool, 21 data: "id=" + value + "&is_ban=" + bool,
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 }); 37 });
38 </script> 38 </script>
39 <script> 39 <script>
40 const btns = document.querySelectorAll('.btn_del'); 40 const btns = document.querySelectorAll('.btn_del');
41 btns.forEach(btn => { 41 btns.forEach(btn => {
42 btn.addEventListener('click', (e) => { 42 btn.addEventListener('click', (e) => {
43 console.log('click button'); 43 console.log('click button');
44 let id = e.target.id; 44 let id = e.target.id;
45 let form = document.getElementById("form_modal_del"); 45 let form = document.getElementById("form_modal_del");
46 form.action = "<?=$_SERVER['HTTP_REFERER']?>/delete/"+e.target.getAttribute('data-employer')+'/'+e.target.getAttribute('data-user'); 46 form.action = "<?=$_SERVER['REDIRECT_URL']?>/delete/"+e.target.getAttribute('data-employer')+'/'+e.target.getAttribute('data-user');
47 //document.getElementById("title_modal").innerHTML = id; 47 //document.getElementById("title_modal").innerHTML = id;
48 console.log(e.target.getAttribute('data-employer')); 48 console.log(e.target.getAttribute('data-employer'));
49 console.log(e.target.getAttribute('data-user')); 49 console.log(e.target.getAttribute('data-user'));
50 50
51 }); 51 });
52 }); 52 });
53 </script> 53 </script>
54 @endsection 54 @endsection
55 55
56 @section('search') 56 @section('search')
57 @include('admin.find_employer', ['select_category' => $select_category]) 57 @include('admin.find_employer', ['select_category' => $select_category])
58 @endsection 58 @endsection
59 59
60 @section('modal') 60 @section('modal')
61 @include('admin.employer.modal') 61 @include('admin.employer.modal')
62 @endsection 62 @endsection
63 63
64 @section('content') 64 @section('content')
65 <div class="grid gap-6 mb-8 md:grid-cols-2 xl:grid-cols-4"> 65 <div class="grid gap-6 mb-8 md:grid-cols-2 xl:grid-cols-4">
66 66
67 <div class="flex items-center p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800"> 67 <div class="flex items-center p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800">
68 <div class="p-3 mr-4 text-orange-500 bg-orange-100 rounded-full dark:text-orange-100 dark:bg-orange-500"> 68 <div class="p-3 mr-4 text-orange-500 bg-orange-100 rounded-full dark:text-orange-100 dark:bg-orange-500">
69 <svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"> 69 <svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
70 <path 70 <path
71 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> 71 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>
72 </svg> 72 </svg>
73 </div> 73 </div>
74 <div> 74 <div>
75 <p class="mb-2 text-sm font-medium text-gray-600 dark:text-gray-400"> 75 <p class="mb-2 text-sm font-medium text-gray-600 dark:text-gray-400">
76 Всего работодателей 76 Всего работодателей
77 </p> 77 </p>
78 <p class="text-lg font-semibold text-gray-700 dark:text-gray-200"> 78 <p class="text-lg font-semibold text-gray-700 dark:text-gray-200">
79 {{ $all_employer }} 79 {{ $all_employer }}
80 </p> 80 </p>
81 </div> 81 </div>
82 </div> 82 </div>
83 </div> 83 </div>
84 84
85 <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block"> 85 <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block">
86 <div class="w-full overflow-x-auto"> 86 <div class="w-full overflow-x-auto">
87 <table class="w-full whitespace-no-wrap"> 87 <table class="w-full whitespace-no-wrap">
88 <thead> 88 <thead>
89 <tr 89 <tr
90 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" 90 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"
91 > 91 >
92 <th class="px-4 py-3">№</th> 92 <th class="px-4 py-3">№</th>
93 <th class="px-4 py-3">Лого</th> 93 <th class="px-4 py-3">Лого</th>
94 <th class="px-4 py-3">Название компании/Email/Тел/Пароль</th> 94 <th class="px-4 py-3">Название компании/Email/Тел/Пароль</th>
95 <th class="px-4 py-3">Категория</th> 95 <th class="px-4 py-3">Категория</th>
96 <th class="px-4 py-3">Комментарий</th> 96 <th class="px-4 py-3">Комментарий</th>
97 <th class="px-4 py-3">Дата регистрации</th> 97 <th class="px-4 py-3">Дата регистрации</th>
98 <th class="px-4 py-3">Редакт.</th> 98 <th class="px-4 py-3">Редакт.</th>
99 </tr> 99 </tr>
100 </thead> 100 </thead>
101 <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"> 101 <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800">
102 @foreach($users as $user) 102 @foreach($users as $user)
103 <tr class="text-gray-700 dark:text-gray-400"> 103 <tr class="text-gray-700 dark:text-gray-400">
104 <td class="px-4 py-3"> 104 <td class="px-4 py-3">
105 {{$user->id}} 105 {{$user->id}}
106 </td> 106 </td>
107 <td class="px-4 py-3"> 107 <td class="px-4 py-3">
108 @if (isset($user->emp_logo) && ($user->emp_logo)) 108 @if (isset($user->emp_logo) && ($user->emp_logo))
109 <div class="flex items-center text-sm"> 109 <div class="flex items-center text-sm">
110 <div 110 <div
111 class="relative hidden w-8 h-8 mr-3 rounded-full md:block" 111 class="relative hidden w-8 h-8 mr-3 rounded-full md:block"
112 > 112 >
113 <img 113 <img
114 class="object-cover w-full h-full rounded-full" 114 class="object-cover w-full h-full rounded-full"
115 src="{{ asset(Storage::url($user->emp_logo)) }}" 115 src="{{ asset(Storage::url($user->emp_logo)) }}"
116 alt="" 116 alt=""
117 loading="lazy" 117 loading="lazy"
118 /> 118 />
119 <div 119 <div
120 class="absolute inset-0 rounded-full shadow-inner" 120 class="absolute inset-0 rounded-full shadow-inner"
121 aria-hidden="true" 121 aria-hidden="true"
122 ></div> 122 ></div>
123 </div> 123 </div>
124 </div> 124 </div>
125 @else 125 @else
126 - 126 -
127 @endif 127 @endif
128 </td> 128 </td>
129 129
130 <td class="px-4 py-3"> 130 <td class="px-4 py-3">
131 <div class="flex items-center text-sm"> 131 <div class="flex items-center text-sm">
132 <div> 132 <div>
133 <p class="font-semibold">{{$user->name}}</p> 133 <p class="font-semibold">{{$user->name}}</p>
134 <p class="font-semibold">{{ empty($user->employers->email) ? $user->email : $user->employers->email }}</p> 134 <p class="font-semibold">{{ empty($user->employers->email) ? $user->email : $user->employers->email }}</p>
135 <p class="text-xs text-gray-600 dark:text-gray-400"> 135 <p class="text-xs text-gray-600 dark:text-gray-400">
136 {{ empty($user->employers->telephone) ? $user->telephone : $user->employers->telephone }} 136 {{ empty($user->employers->telephone) ? $user->telephone : $user->employers->telephone }}
137 </p> 137 </p>
138 <p class="text-xs text-gray-600 dark:text-gray-400"> 138 <p class="text-xs text-gray-600 dark:text-gray-400">
139 @if (!empty($user->pubpassword)) 139 @if (!empty($user->pubpassword))
140 {{ base64_decode($user->pubpassword) }} 140 {{ base64_decode($user->pubpassword) }}
141 @endif 141 @endif
142 </p> 142 </p>
143 </div> 143 </div>
144 </div> 144 </div>
145 145
146 </td> 146 </td>
147 <td class="px-4 py-3 text-sm"> 147 <td class="px-4 py-3 text-sm">
148 {{ $user->category }} 148 {{ $user->category }}
149 </td> 149 </td>
150 <td class="px-4 py-3 text-sm"> 150 <td class="px-4 py-3 text-sm">
151 @if (!empty($user->comment_admin)) 151 @if (!empty($user->comment_admin))
152 152
153 <a style="text-decoration: underline;" href="{{ route('admin.comment-employer', ['employer' => $user->emp_id]) }}">Есть</a> 153 <a style="text-decoration: underline;" href="{{ route('admin.comment-employer', ['employer' => $user->emp_id]) }}">Есть</a>
154 @else 154 @else
155 Нет 155 Нет
156 @endif 156 @endif
157 </td> 157 </td>
158 <td class="px-4 py-3 text-sm"> 158 <td class="px-4 py-3 text-sm">
159 {{ date('d.m.Y', strtotime($user->created_at)) }} 159 {{ date('d.m.Y', strtotime($user->created_at)) }}
160 </td> 160 </td>
161 <td class="px-4 py-3 text-sm"> 161 <td class="px-4 py-3 text-sm">
162 @if (!empty($user->emp_id)) 162 @if (!empty($user->emp_id))
163 <a href="{{ route('admin.employer-profile', ['employer' => $user->emp_id]) }}">Изменить</a> | 163 <a href="{{ route('admin.employer-profile', ['employer' => $user->emp_id]) }}">Изменить</a> |
164 <a @click="openModal" style="cursor: pointer;" data-employer="{{$user->emp_id}}" data-user="{{$user->user_id}}" class="btn_del btn btn-danger">Удалить</a> 164 <a @click="openModal" style="cursor: pointer;" data-employer="{{$user->emp_id}}" data-user="{{$user->user_id}}" class="btn_del btn btn-danger">Удалить</a>
165 @endif 165 @endif
166 </td> 166 </td>
167 <!--<td class="px-4 py-3 text-sm"> 167 <!--<td class="px-4 py-3 text-sm">
168 @if ($user->usr_id > 1) 168 @if ($user->usr_id > 1)
169 <input type="checkbox" class="checkban" value="{{$user->usr_id}}" name="ban_{{$user->usr_id}}" {{ ($user->is_ban) ? "checked" : "" }}/> 169 <input type="checkbox" class="checkban" value="{{$user->usr_id}}" name="ban_{{$user->usr_id}}" {{ ($user->is_ban) ? "checked" : "" }}/>
170 @endif 170 @endif
171 </td>--> 171 </td>-->
172 </tr> 172 </tr>
173 @endforeach 173 @endforeach
174 </tbody> 174 </tbody>
175 </table> 175 </table>
176 </div> 176 </div>
177 177
178 <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"> 178 <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">
179 <?=$users->appends($_GET)->links('admin.pagginate'); ?> 179 <?=$users->appends($_GET)->links('admin.pagginate'); ?>
180 </div> 180 </div>
181 </div> 181 </div>
182 @endsection 182 @endsection
183 183
resources/views/admin/reclames/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', '.btn-eye', function () { 6 $(document).on('click', '.btn-eye', function () {
7 var this_ = $(this); 7 var this_ = $(this);
8 var status_ = this_.attr('data-status'); 8 var status_ = this_.attr('data-status');
9 var id_ = this_.attr('data-id'); 9 var id_ = this_.attr('data-id');
10 var ajax_block = $('#ajax_block'); 10 var ajax_block = $('#ajax_block');
11 11
12 $.ajax({ 12 $.ajax({
13 type: "GET", 13 type: "GET",
14 url: "{{ url()->full()}}", 14 url: "{{ url()->full()}}",
15 data: "id=" + id_ + "&status=" + status_, 15 data: "id=" + id_ + "&status=" + status_,
16 success: function (data) { 16 success: function (data) {
17 console.log('Обновление таблицы '); 17 console.log('Обновление таблицы ');
18 //data = JSON.parse(data); 18 //data = JSON.parse(data);
19 //console.log(data); 19 //console.log(data);
20 ajax_block.html(data); 20 ajax_block.html(data);
21 }, 21 },
22 headers: { 22 headers: {
23 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') 23 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
24 }, 24 },
25 error: function (data) { 25 error: function (data) {
26 console.log('Error: ' + data); 26 console.log('Error: ' + data);
27 } 27 }
28 }); 28 });
29 }); 29 });
30 }); 30 });
31 </script> 31 </script>
32
33 <script>
34 const btns = document.querySelectorAll('.btn_del');
35 btns.forEach(btn => {
36 btn.addEventListener('click', (e) => {
37 console.log('click button');
38 //let id = e.target.id;
39 let form = document.getElementById("form_modal_del");
40 form.action = "<?=$_SERVER['REDIRECT_URL'];?>/delete/"+e.target.getAttribute('data-reclame');
41 //document.getElementById("title_modal").innerHTML = id;
42 console.log(e.target.getAttribute('data-employer'));
43 console.log(e.target.getAttribute('data-user'));
44
45 });
46 });
47 </script>
48 @endsection
49
50 @section('modal')
51 @include('admin.reclames.modal')
32 @endsection 52 @endsection
33 53
34 @section('search') 54 @section('search')
35 55
36 @endsection 56 @endsection
37 57
38 @section('content') 58 @section('content')
39 59
40 <a href="{{ route('admin.add-reclames') }}" style="width: 160px" 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"> 60 <a href="{{ route('admin.add-reclames') }}" style="width: 160px" 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">
41 Добавить рекламу 61 Добавить рекламу
42 </a> 62 </a>
43 <br> 63 <br>
64 <pre><? //print_r($_SERVER);?></pre>
44 <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block"> 65 <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block">
45 66
46 <div class="w-full overflow-x-auto"> 67 <div class="w-full overflow-x-auto">
47 <table class="w-full whitespace-no-wrap"> 68 <table class="w-full whitespace-no-wrap">
48 <thead> 69 <thead>
49 <tr 70 <tr
50 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" 71 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"
51 > 72 >
52 <th class="px-4 py-3">№</th> 73 <th class="px-4 py-3">№</th>
53 <th class="px-4 py-3">Имя в админке/Заголовок</th> 74 <th class="px-4 py-3">Имя в админке/Заголовок</th>
54 <th class="px-4 py-3">Позиция</th> 75 <th class="px-4 py-3">Позиция</th>
55 <th class="px-4 py-3">Клики</th> 76 <th class="px-4 py-3">Клики</th>
56 <th class="px-4 py-3">Редактировать</th> 77 <th class="px-4 py-3">Редактировать</th>
57 </tr> 78 </tr>
58 </thead> 79 </thead>
59 <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"> 80 <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800">
60 @foreach($reclames as $reclame) 81 @foreach($reclames as $reclame)
61 <tr class="text-gray-700 dark:text-gray-400"> 82 <tr class="text-gray-700 dark:text-gray-400">
62 <td class="px-4 py-3"> 83 <td class="px-4 py-3">
63 {{$reclame->id}} 84 {{$reclame->id}}
64 </td> 85 </td>
65 <td class="px-4 py-3"> 86 <td class="px-4 py-3">
66 <div class="flex items-center text-sm"> 87 <div class="flex items-center text-sm">
67 <div> 88 <div>
68 <p class="font-semibold"> 89 <p class="font-semibold">
69 {{$reclame->name}} 90 {{$reclame->name}}
70 </p> 91 </p>
71 <p class="text-xs text-gray-600 dark:text-gray-400"> 92 <p class="text-xs text-gray-600 dark:text-gray-400">
72 {{$reclame->title}} 93 {{$reclame->title}}
73 </p> 94 </p>
74 <p class="text-xs text-gray-600 dark:text-gray-400"> 95 <p class="text-xs text-gray-600 dark:text-gray-400">
75 {{$reclame->link}} 96 {{$reclame->link}}
76 </p> 97 </p>
77 </div> 98 </div>
78 </div> 99 </div>
79 </td> 100 </td>
80 <td class="px-4 py-3"> 101 <td class="px-4 py-3">
81 {{$reclame->position}} 102 {{$reclame->position}}
82 </td> 103 </td>
83 104
84 <td class="px-4 py-3"> 105 <td class="px-4 py-3">
85 {{$reclame->col_vo_click}} 106 {{$reclame->col_vo_click}}
86 </td> 107 </td>
87 <td class="px-4 py-3 text-sm_"> 108 <td class="px-4 py-3 text-sm_">
88 <form action="{{ route('admin.delete-reclames', ['reclame' => $reclame->id]) }}" method="POST"> 109 <form action="{{ route('admin.delete-reclames', ['reclame' => $reclame->id]) }}" method="POST">
89 <a href="{{ route('admin.edit-reclames', ['reclame' => $reclame->id]) }}" style="float:left">Изменить |</a> 110 <a href="{{ route('admin.edit-reclames', ['reclame' => $reclame->id]) }}" style="float:left">Изменить |</a>
90 @csrf 111 @csrf
91 @method('DELETE') 112 @method('DELETE')
92 @if ($reclame->is_hidden) 113 @if ($reclame->is_hidden)
93 <img class="btn-eye" name="btn_close_{{$reclame->id}}" data-status="close" data-id="{{$reclame->id}}" src="{{asset('/assets/img/close-eye.png')}}" style="width:25px; float:left; margin: 0px 5px 0px 5px; cursor: pointer;" /> 114 <img class="btn-eye" name="btn_close_{{$reclame->id}}" data-status="close" data-id="{{$reclame->id}}" src="{{asset('/assets/img/close-eye.png')}}" style="width:25px; float:left; margin: 0px 5px 0px 5px; cursor: pointer;" />
94 <p style="float:left">|</p>
95 @else 115 @else
96 <img class="btn-eye" name="btn_open_{{$reclame->id}}" data-status="open" data-id="{{$reclame->id}}" src="{{asset('/assets/img/open-eye.png')}}" style="width:25px; float: left; margin: 0px 5px 0px 5px; cursor: pointer;"/> 116 <img class="btn-eye" name="btn_open_{{$reclame->id}}" data-status="open" data-id="{{$reclame->id}}" src="{{asset('/assets/img/open-eye.png')}}" style="width:25px; float: left; margin: 0px 5px 0px 5px; cursor: pointer;"/>
97 <p style="float:left">|</p>
98 @endif 117 @endif
99 118
100 <input class="btn btn-danger" type="submit" style="float:left" value="Удалить"/> 119 <a @click="openModal" style="cursor: pointer;" data-reclame="{{$reclame->id}}" class="btn_del btn btn-danger">| Удалить</a>
120 <!--<input class="btn btn-danger" type="submit" style="float:left" value="Удалить"/>-->
101 </form> 121 </form>
102 </td> 122 </td>
103 </tr> 123 </tr>
104 @endforeach 124 @endforeach
105 </tbody> 125 </tbody>
106 </table> 126 </table>
107 </div> 127 </div>
108 128
109 <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"> 129 <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">
110 <?=$reclames->appends($_GET)->links('admin.pagginate'); ?> 130 <?=$reclames->appends($_GET)->links('admin.pagginate'); ?>
111 </div> 131 </div>
112 </div> 132 </div>
resources/views/admin/reclames/modal.blade.php
File was created 1 <!-- Modal backdrop. This what you want to place close to the closing body tag -->
2 <div
3 x-show="isModalOpen"
4 x-transition:enter="transition ease-out duration-150"
5 x-transition:enter-start="opacity-0"
6 x-transition:enter-end="opacity-100"
7 x-transition:leave="transition ease-in duration-150"
8 x-transition:leave-start="opacity-100"
9 x-transition:leave-end="opacity-0"
10 class="fixed inset-0 z-30 flex items-end bg-black bg-opacity-50 sm:items-center sm:justify-center"
11 >
12 <!-- Modal -->
13 <div
14 x-show="isModalOpen"
15 x-transition:enter="transition ease-out duration-150"
16 x-transition:enter-start="opacity-0 transform translate-y-1/2"
17 x-transition:enter-end="opacity-100"
18 x-transition:leave="transition ease-in duration-150"
19 x-transition:leave-start="opacity-100"
20 x-transition:leave-end="opacity-0 transform translate-y-1/2"
21 @click.away="closeModal"
22 @keydown.escape="closeModal"
23 class="w-full px-6 py-4 overflow-hidden bg-white rounded-t-lg dark:bg-gray-800 sm:rounded-lg sm:m-4 sm:max-w-xl"
24 role="dialog"
25 id="modal"
26 >
27 <!-- Remove header if you don't want a close icon. Use modal body to place modal tile. -->
28 <header class="flex justify-end">
29 <button
30 class="inline-flex items-center justify-center w-6 h-6 text-gray-400 transition-colors duration-150 rounded dark:hover:text-gray-200 hover: hover:text-gray-700"
31 aria-label="close"
32 @click="closeModal"
33 >
34 <svg
35 class="w-4 h-4"
36 fill="currentColor"
37 viewBox="0 0 20 20"
38 role="img"
39 aria-hidden="true"
40 >
41 <path
42 d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z"
43 clip-rule="evenodd"
44 fill-rule="evenodd"
45 ></path>
46 </svg>
47 </button>
48 </header>
49 <!-- Modal body -->
50 <div class="mt-4 mb-6">
51 <!-- Modal title -->
52 <p
53 class="mb-2 text-lg font-semibold text-gray-700 dark:text-gray-300"
54 >
55 Вы действительно хотите удалить данную рекламу?
56 </p>
57 <!-- Modal description -->
58 <p class="text-sm text-gray-700 dark:text-gray-400">
59 Это приведет к удалению всей информации о рекламе<br>
60 на данном проекте.
61 </p>
62 </div>
63 <footer
64 class="flex flex-col items-center justify-end px-6 py-3 -mx-6 -mb-4 space-y-4 sm:space-y-0 sm:space-x-6 sm:flex-row bg-gray-50 dark:bg-gray-800"
65 >
66 <button
67 @click="closeModal"
68 class="w-full px-5 py-3 text-sm font-medium leading-5 text-white text-gray-700 transition-colors duration-150 border border-gray-300 rounded-lg dark:text-gray-400 sm:px-4 sm:py-2 sm:w-auto active:bg-transparent hover:border-gray-500 focus:border-gray-500 active:text-gray-500 focus:outline-none focus:shadow-outline-gray"
69 >
70 Отмена
71 </button>
72 <form id="form_modal_del" name="form_modal_del" action="/employer-profile/delete/{employer}/{user}" method="POST">
73 @csrf
74 @method('DELETE')
75 <p id="url"></p>
76 <button
77 type="submit"
78 class="w-full px-5 py-3 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-lg sm:w-auto sm:px-4 sm:py-2 active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple"
79 >
80 Удалить
81 </button>
82 </form>
83
84 </footer>
85 </div>
86 </div>
87 <!-- End of modal backdrop -->
88