From f64f4890ff41431894a83ea4705ddcd550249123 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9=20=20=D0=9B=D0=B0=D1=80?= =?UTF-8?q?=D0=B8=D0=BE=D0=BD=D0=BE=D0=B2?= Date: Mon, 4 Sep 2023 21:23:47 +0700 Subject: [PATCH] =?UTF-8?q?=D0=91=D0=BB=D0=B5=D0=B9=D0=B4=D1=8B=20=D0=B8=20=D0?= =?UTF-8?q?=BA=D0=BE=D0=BD=D1=82=D1=80=D0=BE=D0=BB=D0=BB=D0=B5=D1=80=D1=8B=20?= =?UTF-8?q?=D0=B4=D0=BB=D1=8F=20=D0=B0=D0=B2=D0=B3=D1=83=D1=81=D1=82=D0=BE=D0?= =?UTF-8?q?=B2=D1=81=D0=BA=D0=BE=D0=B3=D0=BE=20=D0=B0=D0=B4=D0=B4=D0=BE=D0=BD?= =?UTF-8?q?=D0=B0=20=D1=81=D0=B0=D0=B9=D1=82=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/Admin/AdminController.php | 38 +++++++++- app/Http/Controllers/Admin/UsersController.php | 4 +- resources/views/admin/employer/index.blade.php | 2 +- resources/views/admin/users/index.blade.php | 4 +- resources/views/admin/worker/index.blade.php | 2 +- resources/views/layout/admin.blade.php | 91 ++++++++++-------------- routes/web.php | 31 +++++++- 7 files changed, 110 insertions(+), 62 deletions(-) diff --git a/app/Http/Controllers/Admin/AdminController.php b/app/Http/Controllers/Admin/AdminController.php index ea33764..9b0d1cd 100644 --- a/app/Http/Controllers/Admin/AdminController.php +++ b/app/Http/Controllers/Admin/AdminController.php @@ -147,6 +147,8 @@ class AdminController extends Controller } public function index_admin(Request $request) { + $title = 'Админка - Администраторы системы'; + if ($request->ajax()) { $user = User::find($request->id); $request->offsetUnset('id'); @@ -158,7 +160,7 @@ class AdminController extends Controller if ($request->ajax()) { return view('admin.users.index_ajax', compact('users')); } else { - return view('admin.users.index', compact('users')); + return view('admin.users.index', compact('users', 'title')); } } @@ -320,4 +322,38 @@ class AdminController extends Controller return redirect()->route('admin.config'); } + // кабинет - редактор сайта + public function editor() { + return; + } + + // кабинет - редактор шапки-футера сайта + public function editblocks() { + return; + } + + // кабинет - редактор должности на главной + public function job_titles_main() { + return; + } + + // кабинет - редактор работодатели на главной + public function employers_main() { + return; + } + + // кабинет - редактор seo-сайта + public function editor_seo() { + return; + } + + // кабинет - редактор страниц + public function editor_pages() { + return; + } + + // кабинет - реклама сайта + public function reclames() { + return; + } } diff --git a/app/Http/Controllers/Admin/UsersController.php b/app/Http/Controllers/Admin/UsersController.php index 6d02900..6006242 100644 --- a/app/Http/Controllers/Admin/UsersController.php +++ b/app/Http/Controllers/Admin/UsersController.php @@ -9,6 +9,8 @@ use Illuminate\Http\Request; class UsersController extends Controller { public function index(Request $request) { + $title = 'Админка - Пользователи системы'; + if ($request->ajax()) { $user = User::find($request->id); $request->offsetUnset('id'); @@ -20,7 +22,7 @@ class UsersController extends Controller if ($request->ajax()) { return view('admin.users.index_ajax', compact('users')); } else { - return view('admin.users.index', compact('users')); + return view('admin.users.index', compact('users', 'title')); } } diff --git a/resources/views/admin/employer/index.blade.php b/resources/views/admin/employer/index.blade.php index 9cb5f91..d273c3b 100644 --- a/resources/views/admin/employer/index.blade.php +++ b/resources/views/admin/employer/index.blade.php @@ -52,7 +52,7 @@ Имя Дата регистрации Изменить - Блокировать + Бан diff --git a/resources/views/admin/users/index.blade.php b/resources/views/admin/users/index.blade.php index d887df4..fa8175d 100644 --- a/resources/views/admin/users/index.blade.php +++ b/resources/views/admin/users/index.blade.php @@ -1,4 +1,4 @@ -@extends('layout.admin', ['title' => 'Админка - Пользователи системы']) +@extends('layout.admin', ['title' => $title]) @section('script')