From 1f651082fb1e422125260c2ed35eed904e49d43e Mon Sep 17 00:00:00 2001 From: Yarik Date: Tue, 16 Feb 2016 10:15:03 +0200 Subject: [PATCH] test --- frontend/controllers/CompanyController.php | 7 +++++++ frontend/controllers/PerformerController.php | 17 +++++++---------- frontend/views/company/portfolio-view.php | 11 +++++++++++ frontend/views/performer/portfolio-view.php | 11 +++++++++++ 4 files changed, 36 insertions(+), 10 deletions(-) create mode 100644 frontend/views/company/portfolio-view.php create mode 100644 frontend/views/performer/portfolio-view.php diff --git a/frontend/controllers/CompanyController.php b/frontend/controllers/CompanyController.php index 2234130..b0a4ed7 100755 --- a/frontend/controllers/CompanyController.php +++ b/frontend/controllers/CompanyController.php @@ -83,6 +83,13 @@ class CompanyController extends Controller ]); } + public function actionPortfolioView($company_id /*, $portfolio_id*/) + { + $company = User::findOne($company_id); + + return $this->render('portfolio-view', ['company' => $company]); + } + public function actionTeam($company_id) { $company = User::findOne($company_id); diff --git a/frontend/controllers/PerformerController.php b/frontend/controllers/PerformerController.php index a1828cd..9f0ae22 100755 --- a/frontend/controllers/PerformerController.php +++ b/frontend/controllers/PerformerController.php @@ -23,9 +23,7 @@ class PerformerController extends Controller { public $layout = 'performer'; public $user; - - - + public $defaultAction = 'common'; /** * @inheritdoc @@ -43,13 +41,6 @@ class PerformerController extends Controller ]; } - - public function actionIndex() - { - $this->redirect('site/index'); - - } - public function actionCommon($performer_id) { @@ -138,6 +129,12 @@ class PerformerController extends Controller ]); } + public function actionPortfolioView($performer_id/*, $portfolio_id*/) + { + $user = User::findOne($performer_id); + return $this->render('portfolio-view', ['user' => $user]); + } + public function actionBlogList($performer_id) { $user = User::findOne($performer_id); diff --git a/frontend/views/company/portfolio-view.php b/frontend/views/company/portfolio-view.php new file mode 100644 index 0000000..7150a70 --- /dev/null +++ b/frontend/views/company/portfolio-view.php @@ -0,0 +1,11 @@ +params['company'] = $company; + +$this->title = 'My Yii Application'; +?> \ No newline at end of file diff --git a/frontend/views/performer/portfolio-view.php b/frontend/views/performer/portfolio-view.php new file mode 100644 index 0000000..814d009 --- /dev/null +++ b/frontend/views/performer/portfolio-view.php @@ -0,0 +1,11 @@ +params['user'] = $user; + +$this->title = 'My Yii Application'; +?> \ No newline at end of file -- libgit2 0.21.4