From 272ce2898cac07f38663a4902940f47f254a3d70 Mon Sep 17 00:00:00 2001 From: Yarik Date: Thu, 19 May 2016 13:59:55 +0300 Subject: [PATCH] test --- frontend/controllers/CompanyController.php | 13 +++++++++++++ frontend/controllers/PerformerController.php | 13 +++++++++++++ frontend/views/layouts/performer.php | 70 ++++++++++++++++++++++++++++++++++++++++------------------------------ frontend/web/css/style.css | 8 ++++++++ 4 files changed, 74 insertions(+), 30 deletions(-) diff --git a/frontend/controllers/CompanyController.php b/frontend/controllers/CompanyController.php index 6f33380..0e2e63d 100755 --- a/frontend/controllers/CompanyController.php +++ b/frontend/controllers/CompanyController.php @@ -39,6 +39,19 @@ $company_id = $action->controller->actionParams[ 'company_id' ]; $user = User::findOne($company_id); if(!empty( $user->userInfo )) { + if($user->userInfo->is_freelancer xor $user->userInfo->is_customer) { + $type = $action->controller->actionParams['type']; + $get = \Yii::$app->request->get(); + if(!empty($type)) { + if($user->userInfo->is_freelancer && $type == 'customer') { + $get['type'] = 'implementer'; + $this->redirect(array_merge([$action->id], $get)); + } elseif($user->userInfo->is_customer && $type == 'implementer') { + $get['type'] = 'customer'; + $this->redirect(array_merge([$action->id], $get)); + } + } + } $user->userInfo->updateCounters([ 'view_count' => 1 ]); } } diff --git a/frontend/controllers/PerformerController.php b/frontend/controllers/PerformerController.php index b19016c..b514097 100755 --- a/frontend/controllers/PerformerController.php +++ b/frontend/controllers/PerformerController.php @@ -37,6 +37,19 @@ $performer_id = $action->controller->actionParams[ 'performer_id' ]; $user = User::findOne($performer_id); if(!empty( $user->userInfo )) { + if($user->userInfo->is_freelancer xor $user->userInfo->is_customer) { + $type = $action->controller->actionParams['type']; + $get = \Yii::$app->request->get(); + if(!empty($type)) { + if($user->userInfo->is_freelancer && $type == 'customer') { + $get['type'] = 'implementer'; + $this->redirect(array_merge([$action->id], $get)); + } elseif($user->userInfo->is_customer && $type == 'implementer') { + $get['type'] = 'customer'; + $this->redirect(array_merge([$action->id], $get)); + } + } + } $user->userInfo->updateCounters([ 'view_count' => 1 ]); } } diff --git a/frontend/views/layouts/performer.php b/frontend/views/layouts/performer.php index 3975b94..61e70f2 100755 --- a/frontend/views/layouts/performer.php +++ b/frontend/views/layouts/performer.php @@ -139,39 +139,49 @@ diff --git a/frontend/web/css/style.css b/frontend/web/css/style.css index 404a72a..61355a4 100755 --- a/frontend/web/css/style.css +++ b/frontend/web/css/style.css @@ -2421,6 +2421,14 @@ input[type=file]::-webkit-file-upload-button { margin-top: -1px; } +.performance-vacancy-sidebar-company-job ul li span.activejob_span { + text-decoration: underline; + color: #69d34b; + position: relative; + height: 22px; + line-height: 22px; +} + .sidebar-droped-wr a { color: inherit !important; text-decoration: none !important; -- libgit2 0.21.4