Commit f64f4890ff41431894a83ea4705ddcd550249123
1 parent
586cff8470
Exists in
master
and in
1 other branch
Блейды и контроллеры для августовского аддона сайта
Showing 7 changed files with 110 additions and 62 deletions Side-by-side Diff
app/Http/Controllers/Admin/AdminController.php
... | ... | @@ -147,6 +147,8 @@ class AdminController extends Controller |
147 | 147 | } |
148 | 148 | |
149 | 149 | public function index_admin(Request $request) { |
150 | + $title = 'Админка - Администраторы системы'; | |
151 | + | |
150 | 152 | if ($request->ajax()) { |
151 | 153 | $user = User::find($request->id); |
152 | 154 | $request->offsetUnset('id'); |
... | ... | @@ -158,7 +160,7 @@ class AdminController extends Controller |
158 | 160 | if ($request->ajax()) { |
159 | 161 | return view('admin.users.index_ajax', compact('users')); |
160 | 162 | } else { |
161 | - return view('admin.users.index', compact('users')); | |
163 | + return view('admin.users.index', compact('users', 'title')); | |
162 | 164 | } |
163 | 165 | } |
164 | 166 | |
... | ... | @@ -320,4 +322,38 @@ class AdminController extends Controller |
320 | 322 | return redirect()->route('admin.config'); |
321 | 323 | } |
322 | 324 | |
325 | + // кабинет - редактор сайта | |
326 | + public function editor() { | |
327 | + return; | |
328 | + } | |
329 | + | |
330 | + // кабинет - редактор шапки-футера сайта | |
331 | + public function editblocks() { | |
332 | + return; | |
333 | + } | |
334 | + | |
335 | + // кабинет - редактор должности на главной | |
336 | + public function job_titles_main() { | |
337 | + return; | |
338 | + } | |
339 | + | |
340 | + // кабинет - редактор работодатели на главной | |
341 | + public function employers_main() { | |
342 | + return; | |
343 | + } | |
344 | + | |
345 | + // кабинет - редактор seo-сайта | |
346 | + public function editor_seo() { | |
347 | + return; | |
348 | + } | |
349 | + | |
350 | + // кабинет - редактор страниц | |
351 | + public function editor_pages() { | |
352 | + return; | |
353 | + } | |
354 | + | |
355 | + // кабинет - реклама сайта | |
356 | + public function reclames() { | |
357 | + return; | |
358 | + } | |
323 | 359 | } |
app/Http/Controllers/Admin/UsersController.php
... | ... | @@ -9,6 +9,8 @@ use Illuminate\Http\Request; |
9 | 9 | class UsersController extends Controller |
10 | 10 | { |
11 | 11 | public function index(Request $request) { |
12 | + $title = 'Админка - Пользователи системы'; | |
13 | + | |
12 | 14 | if ($request->ajax()) { |
13 | 15 | $user = User::find($request->id); |
14 | 16 | $request->offsetUnset('id'); |
... | ... | @@ -20,7 +22,7 @@ class UsersController extends Controller |
20 | 22 | if ($request->ajax()) { |
21 | 23 | return view('admin.users.index_ajax', compact('users')); |
22 | 24 | } else { |
23 | - return view('admin.users.index', compact('users')); | |
25 | + return view('admin.users.index', compact('users', 'title')); | |
24 | 26 | } |
25 | 27 | } |
26 | 28 |
resources/views/admin/employer/index.blade.php
... | ... | @@ -52,7 +52,7 @@ |
52 | 52 | <th class="px-4 py-3">Имя</th> |
53 | 53 | <th class="px-4 py-3">Дата регистрации</th> |
54 | 54 | <th class="px-4 py-3">Изменить</th> |
55 | - <th class="px-4 py-3">Блокировать</th> | |
55 | + <th class="px-4 py-3">Бан</th> | |
56 | 56 | </tr> |
57 | 57 | </thead> |
58 | 58 | <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"> |
resources/views/admin/users/index.blade.php
1 | -@extends('layout.admin', ['title' => 'Админка - Пользователи системы']) | |
1 | +@extends('layout.admin', ['title' => $title]) | |
2 | 2 | |
3 | 3 | @section('script') |
4 | 4 | <script> |
... | ... | @@ -80,7 +80,7 @@ |
80 | 80 | <th class="px-4 py-3">Имя</th> |
81 | 81 | <th class="px-4 py-3">Email/логин</th> |
82 | 82 | <th class="px-4 py-3">Работодатель/работник/администратор</th> |
83 | - <th class="px-4 py-3">Заблокированный</th> | |
83 | + <th class="px-4 py-3">Бан</th> | |
84 | 84 | <th class="px-4 py-3">Новый</th> |
85 | 85 | <th class="px-4 py-3">Дата регистрации</th> |
86 | 86 | </tr> |
resources/views/admin/worker/index.blade.php
... | ... | @@ -52,7 +52,7 @@ |
52 | 52 | <th class="px-4 py-3">% заполнения анкеты</th> |
53 | 53 | <th class="px-4 py-3">Дата регистрации</th> |
54 | 54 | <th class="px-4 py-3">Изменить</th> |
55 | - <th class="px-4 py-3">Блокировать</th> | |
55 | + <th class="px-4 py-3">Бан</th> | |
56 | 56 | </tr> |
57 | 57 | </thead> |
58 | 58 | <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"> |
resources/views/layout/admin.blade.php
... | ... | @@ -27,10 +27,8 @@ |
27 | 27 | class="z-20 hidden w-64 overflow-y-auto bg-white dark:bg-gray-800 md:block flex-shrink-0" |
28 | 28 | > |
29 | 29 | <div class="py-4 text-gray-500 dark:text-gray-400"> |
30 | - <a | |
31 | - class="ml-6 text-lg font-bold text-gray-800 dark:text-gray-200" | |
32 | - href="{{ route('admin.index') }}" | |
33 | - > | |
30 | + <a class="ml-6 text-lg font-bold text-gray-800 dark:text-gray-200" | |
31 | + href="{{ route('admin.index') }}"> | |
34 | 32 | Админка |
35 | 33 | </a> |
36 | 34 | <ul class="mt-6"> |
... | ... | @@ -256,7 +254,7 @@ |
256 | 254 | d="M4 5a1 1 0 011-1h14a1 1 0 011 1v2a1 1 0 01-1 1H5a1 1 0 01-1-1V5zM4 13a1 1 0 011-1h6a1 1 0 011 1v6a1 1 0 01-1 1H5a1 1 0 01-1-1v-6zM16 13a1 1 0 011-1h2a1 1 0 011 1v6a1 1 0 01-1 1h-2a1 1 0 01-1-1v-6z" |
257 | 255 | ></path> |
258 | 256 | </svg> |
259 | - <span class="ml-4">Страницы</span> | |
257 | + <span class="ml-4">Редактор</span> | |
260 | 258 | </span> |
261 | 259 | <svg |
262 | 260 | class="w-4 h-4" |
... | ... | @@ -282,34 +280,26 @@ |
282 | 280 | class="p-2 mt-2 space-y-2 overflow-hidden text-sm font-medium text-gray-500 rounded-md shadow-inner bg-gray-50 dark:text-gray-400 dark:bg-gray-900" |
283 | 281 | aria-label="submenu" |
284 | 282 | > |
285 | - <li | |
286 | - class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200" | |
287 | - > | |
288 | - <a class="w-full" href="pages/login.html">Login</a> | |
283 | + <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200"> | |
284 | + <a class="w-full" href="{{ route('admin.editor-site') }}">Редактор сайта</a> | |
289 | 285 | </li> |
290 | - <li | |
291 | - class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200" | |
292 | - > | |
293 | - <a class="w-full" href="pages/create-account.html"> | |
294 | - Create account | |
295 | - </a> | |
286 | + <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200"> | |
287 | + <a class="w-full" href="{{ route('admin.edit-blocks') }}">Шапка-футер сайта</a> | |
296 | 288 | </li> |
297 | - <li | |
298 | - class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200" | |
299 | - > | |
300 | - <a class="w-full" href="pages/forgot-password.html"> | |
301 | - Forgot password | |
302 | - </a> | |
289 | + <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200"> | |
290 | + <a class="w-full" href="{{ route('admin.reclames') }}">Реклама</a> | |
303 | 291 | </li> |
304 | - <li | |
305 | - class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200" | |
306 | - > | |
307 | - <a class="w-full" href="pages/404.html">404</a> | |
292 | + <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200"> | |
293 | + <a class="w-full" href="{{ route('admin.editor-seo') }}">SEO сайта</a> | |
308 | 294 | </li> |
309 | - <li | |
310 | - class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200" | |
311 | - > | |
312 | - <a class="w-full" href="pages/blank.html">Blank</a> | |
295 | + <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200"> | |
296 | + <a class="w-full" href="{{ route('admin.editor-pages') }}">Редактор страниц</a> | |
297 | + </li> | |
298 | + <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200"> | |
299 | + <a class="w-full" href="{{ route('admin.job-titles-main') }}">Должности на главной</a> | |
300 | + </li> | |
301 | + <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200"> | |
302 | + <a class="w-full" href="{{ route('admin.employers-main') }}">Работодатели на главной</a> | |
313 | 303 | </li> |
314 | 304 | </ul> |
315 | 305 | </template> |
... | ... | @@ -575,7 +565,7 @@ |
575 | 565 | d="M4 5a1 1 0 011-1h14a1 1 0 011 1v2a1 1 0 01-1 1H5a1 1 0 01-1-1V5zM4 13a1 1 0 011-1h6a1 1 0 011 1v6a1 1 0 01-1 1H5a1 1 0 01-1-1v-6zM16 13a1 1 0 011-1h2a1 1 0 011 1v6a1 1 0 01-1 1h-2a1 1 0 01-1-1v-6z" |
576 | 566 | ></path> |
577 | 567 | </svg> |
578 | - <span class="ml-4">Страницы</span> | |
568 | + <span class="ml-4">Редактор</span> | |
579 | 569 | </span> |
580 | 570 | <svg |
581 | 571 | class="w-4 h-4" |
... | ... | @@ -601,35 +591,28 @@ |
601 | 591 | class="p-2 mt-2 space-y-2 overflow-hidden text-sm font-medium text-gray-500 rounded-md shadow-inner bg-gray-50 dark:text-gray-400 dark:bg-gray-900" |
602 | 592 | aria-label="submenu" |
603 | 593 | > |
604 | - <li | |
605 | - class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200" | |
606 | - > | |
607 | - <a class="w-full" href="pages/login.html">Login</a> | |
594 | + <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200"> | |
595 | + <a class="w-full" href="{{ route('admin.editor-site') }}">Редактор сайта</a> | |
608 | 596 | </li> |
609 | - <li | |
610 | - class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200" | |
611 | - > | |
612 | - <a class="w-full" href="pages/create-account.html"> | |
613 | - Create account | |
614 | - </a> | |
597 | + <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200"> | |
598 | + <a class="w-full" href="{{ route('admin.edit-blocks') }}">Шапка-футер сайта</a> | |
615 | 599 | </li> |
616 | - <li | |
617 | - class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200" | |
618 | - > | |
619 | - <a class="w-full" href="pages/forgot-password.html"> | |
620 | - Forgot password | |
621 | - </a> | |
600 | + <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200"> | |
601 | + <a class="w-full" href="{{ route('admin.reclames') }}">Реклама</a> | |
622 | 602 | </li> |
623 | - <li | |
624 | - class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200" | |
625 | - > | |
626 | - <a class="w-full" href="pages/404.html">404</a> | |
603 | + <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200"> | |
604 | + <a class="w-full" href="{{ route('admin.editor-seo') }}">SEO сайта</a> | |
627 | 605 | </li> |
628 | - <li | |
629 | - class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200" | |
630 | - > | |
631 | - <a class="w-full" href="pages/blank.html">Blank</a> | |
606 | + <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200"> | |
607 | + <a class="w-full" href="{{ route('admin.editor-pages') }}">Редактор страниц</a> | |
608 | + </li> | |
609 | + <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200"> | |
610 | + <a class="w-full" href="{{ route('admin.job-titles-main') }}">Должности на главной</a> | |
632 | 611 | </li> |
612 | + <li class="px-2 py-1 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200"> | |
613 | + <a class="w-full" href="{{ route('admin.employers-main') }}">Работодатели на главной</a> | |
614 | + </li> | |
615 | + | |
633 | 616 | </ul> |
634 | 617 | </template> |
635 | 618 | </li> |
routes/web.php
... | ... | @@ -100,9 +100,9 @@ Route::group([ |
100 | 100 | // кабинет профиль работник - форма |
101 | 101 | Route::post('worker-profile/{worker}', [WorkersController::class, 'form_update_worker'])->name('worker-profile'); |
102 | 102 | |
103 | - // кабинет настройки - форма | |
103 | + // кабинет настройки сайта - форма | |
104 | 104 | Route::get('config', [AdminController::class, 'config_form'])->name('config'); |
105 | - // кабинет настройки сохранение формы | |
105 | + // кабинет настройки сайта сохранение формы | |
106 | 106 | Route::post('config', [AdminController::class, 'store_config'])->name('store_config'); |
107 | 107 | |
108 | 108 | // кабинет - пользователи |
... | ... | @@ -139,4 +139,31 @@ Route::group([ |
139 | 139 | |
140 | 140 | // кабинет - список админов |
141 | 141 | Route::get('group-admin', [AdminController::class, 'index'])->name('group-admin'); |
142 | + | |
143 | + /////редактор////// кабинет - редактор сайта | |
144 | + Route::get('editor-site', [AdminController::class, 'editor'])->name('editor-site'); | |
145 | + | |
146 | + // кабинет - редактор шапки-футера сайта | |
147 | + Route::get('edit-blocks', [AdminController::class, 'editblocks'])->name('edit-blocks'); | |
148 | + | |
149 | + // кабинет - редактор должности на главной | |
150 | + Route::get('job-titles-main', [AdminController::class, 'job_titles_main'])->name('job-titles-main'); | |
151 | + | |
152 | + // кабинет - редактор работодатели на главной | |
153 | + Route::get('employers-main', [AdminController::class, 'employers_main'])->name('employers-main'); | |
154 | + | |
155 | + // кабинет - редактор seo-сайта | |
156 | + Route::get('editor-seo', [AdminController::class, 'editor_seo'])->name('editor-seo'); | |
157 | + | |
158 | + // кабинет - редактор страниц | |
159 | + Route::get('editor-pages', [AdminController::class, 'editor_pages'])->name('editor-pages'); | |
160 | + | |
161 | + // кабинет - реклама сайта | |
162 | + Route::get('reclames', [AdminController::class, 'reclames'])->name('reclames'); | |
163 | + | |
164 | + | |
165 | + | |
166 | + | |
167 | + | |
168 | + | |
142 | 169 | }); |