diff --git a/app/Http/Controllers/Admin/JobTitlesController.php b/app/Http/Controllers/Admin/JobTitlesController.php index 232875e..dbbfe0a 100644 --- a/app/Http/Controllers/Admin/JobTitlesController.php +++ b/app/Http/Controllers/Admin/JobTitlesController.php @@ -16,10 +16,19 @@ class JobTitlesController extends Controller * * @return \Illuminate\Http\Response */ - public function index() + public function index(Request $request) { - $Jobs = Job_title::query()->where('is_remove', '=', '0')-> - orderByDesc('sort')->orderBy('name')->paginate(15); + if ($request->has('sort')) { + $Jobs = Job_title::query()->where('is_remove', '=', '0'); + if ($request->get('sort') == 'up') + $Jobs = $Jobs->orderBy('sort')->orderBy('name')->paginate(15); + else + $Jobs = $Jobs->orderByDesc('sort')->orderBy('name')->paginate(15); + } else { + $Jobs = Job_title::query()->where('is_remove', '=', '0')-> + orderByDesc('sort')->orderBy('name')->paginate(15); + } + return view('admin.job_titles.index', compact('Jobs')); } diff --git a/app/Http/Controllers/Admin/MsgAnswersController.php b/app/Http/Controllers/Admin/MsgAnswersController.php index a1c4597..c4c6a37 100644 --- a/app/Http/Controllers/Admin/MsgAnswersController.php +++ b/app/Http/Controllers/Admin/MsgAnswersController.php @@ -107,7 +107,7 @@ class MsgAnswersController extends Controller $id_admin = Auth::user()->id; $users = User::query()->OrderBy('name')->where('is_bd', '=', '0')->get(); - $Msgs = Message::with('user_from')->with('user_to')->with('response') + $Msgs = Message::with('user_from')->with('user_to') //->with('response') ->where(function($query) use ($id_admin) { $query->where('user_id', '=', $id_admin) ->orWhere('to_user_id', '=', $id_admin); diff --git a/app/Http/Controllers/EmployerController.php b/app/Http/Controllers/EmployerController.php index 90ad08b..9479f9a 100644 --- a/app/Http/Controllers/EmployerController.php +++ b/app/Http/Controllers/EmployerController.php @@ -226,10 +226,12 @@ class EmployerController extends Controller switch ($sort) { case 'name_up': $vacancy_list = $vacancy_list->orderBy('name')->orderBy('id'); break; case 'name_down': $vacancy_list = $vacancy_list->orderByDesc('name')->orderby('id'); break; + case 'nopublic': $vacancy_list = $vacancy_list->OrderBy('active_is')->orderBy('id'); break; + case 'public': $vacancy_list = $vacancy_list->OrderByDesc('active_is')->orderBy('id'); break; case 'created_at_up': $vacancy_list = $vacancy_list->OrderBy('created_at')->orderBy('id'); break; case 'created_at_down': $vacancy_list = $vacancy_list->orderByDesc('created_at')->orderBy('id'); break; - case 'default': $vacancy_list = $vacancy_list->orderBy('id')->orderby('updated_at'); break; - default: $vacancy_list = $vacancy_list->orderBy('id')->orderby('updated_at'); break; + case 'default': $vacancy_list = $vacancy_list->orderbyDesc('updated_at')->orderBy('name'); break; + default: $vacancy_list = $vacancy_list->orderByDesc('id')->orderbyDesc('updated_at'); break; } } $vacancy_list = $vacancy_list->paginate(4); diff --git a/app/Http/Controllers/PagesController.php b/app/Http/Controllers/PagesController.php index 2a5ae74..77e8f60 100644 --- a/app/Http/Controllers/PagesController.php +++ b/app/Http/Controllers/PagesController.php @@ -16,8 +16,9 @@ class PagesController extends Controller { public function pages(pages $pages) { $page = pages::query()->where('slug', $pages->slug)->first(); + $slug = $pages->slug; - return view('pages', compact('page')); + return view('pages', compact('page', 'slug')); } public function form_feedback(RequestSendAdmin $request){ diff --git a/resources/views/TITLE_TEXT.blade.php b/resources/views/TITLE_TEXT.blade.php new file mode 100644 index 0000000..83ecec1 --- /dev/null +++ b/resources/views/TITLE_TEXT.blade.php @@ -0,0 +1,18 @@ +
+ 555+ + Резюме + Банальные, но неопровержимые выводы, а также элементы политического процесса лишь добавляют + фракционных разногласий и призваны к ответу. +
+
+ 1 001+ + Вакансий + В рамках спецификации современных стандартов, диаграммы связей заблокированы в рамках своих + собственных рациональных ограничений. +
+
+ 265 + Компаний + Но сторонники тоталитаризма в науке заблокированы в рамках своих собственных рациональных + ограничений. +
diff --git a/resources/views/admin/answers/index.blade.php b/resources/views/admin/answers/index.blade.php index 37394f2..83354f9 100644 --- a/resources/views/admin/answers/index.blade.php +++ b/resources/views/admin/answers/index.blade.php @@ -98,7 +98,11 @@ {{$answer->id}} - {{$answer->employer->name_company}} + @if (isset($answer->employer->name_company)) + {{$answer->employer->name_company}} + @else + Не определено + @endif {{$answer->user->name}} diff --git a/resources/views/admin/job_titles/index.blade.php b/resources/views/admin/job_titles/index.blade.php index a16d6c8..4b11e1f 100644 --- a/resources/views/admin/job_titles/index.blade.php +++ b/resources/views/admin/job_titles/index.blade.php @@ -1,6 +1,33 @@ @extends('layout.admin', ['title' => 'Админка - Справочник Должности']) @section('script') + @endsection @section('search') @@ -20,7 +47,7 @@ Родитель Должность Видимость - Сортировка + Сортировка ↑↓ Дата создания Изменить diff --git a/resources/views/employers/list_vacancy.blade.php b/resources/views/employers/list_vacancy.blade.php index a7672f0..1ecef2d 100644 --- a/resources/views/employers/list_vacancy.blade.php +++ b/resources/views/employers/list_vacancy.blade.php @@ -67,11 +67,13 @@
diff --git a/resources/views/employers/subcribe.blade.php b/resources/views/employers/subcribe.blade.php index 60014c6..c3a867d 100644 --- a/resources/views/employers/subcribe.blade.php +++ b/resources/views/employers/subcribe.blade.php @@ -18,7 +18,7 @@ - @include('employers.menu', ['item' => 12]) + @include('employers.menu', ['item' => 11])
diff --git a/resources/views/index.blade.php b/resources/views/index.blade.php index d951c9d..05eaf4c 100644 --- a/resources/views/index.blade.php +++ b/resources/views/index.blade.php @@ -69,24 +69,7 @@
-
- 500+ - Резюме - Банальные, но неопровержимые выводы, а также элементы политического процесса лишь добавляют - фракционных разногласий и призваны к ответу. -
-
- 1 000+ - Вакансий - В рамках спецификации современных стандартов, диаграммы связей заблокированы в рамках своих - собственных рациональных ограничений. -
-
- 265 - Компаний - Но сторонники тоталитаризма в науке заблокированы в рамках своих собственных рациональных - ограничений. -
+ @include('TITLE_TEXT')
diff --git a/resources/views/pages.blade.php b/resources/views/pages.blade.php index 0d0dbf6..bd9a93c 100644 --- a/resources/views/pages.blade.php +++ b/resources/views/pages.blade.php @@ -16,6 +16,11 @@ @endif

{{ $page->name }}

{!! $page->anons !!}

+ @if ($slug == 'Usloviya-razmescheniya') +
+ Список компаний +
+ @endif