From 45dc5d7077acf55e526e404b346917acb23259db Mon Sep 17 00:00:00 2001 From: zhegal Date: Tue, 6 Feb 2018 18:11:42 +0200 Subject: [PATCH] individual page --- frontend/controllers/ObjectController.php | 2 +- frontend/controllers/SiteController.php | 23 ++++++++++++++++++++++- frontend/views/layouts/main.php | 36 +++++++++++++++++++----------------- frontend/views/site/individual.php | 123 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------- 4 files changed, 158 insertions(+), 26 deletions(-) diff --git a/frontend/controllers/ObjectController.php b/frontend/controllers/ObjectController.php index 941051c..873efac 100644 --- a/frontend/controllers/ObjectController.php +++ b/frontend/controllers/ObjectController.php @@ -16,7 +16,7 @@ public function actionIndex() { - + $objects = Objectkb::find() ->where(['status'=>true]) ->with("lang.alias") diff --git a/frontend/controllers/SiteController.php b/frontend/controllers/SiteController.php index 164c40f..0c79256 100644 --- a/frontend/controllers/SiteController.php +++ b/frontend/controllers/SiteController.php @@ -110,7 +110,28 @@ public function actionIndividual() { - return $this->render('individual'); + + $objects = Objectkb::find() + ->with('lang.alias') + ->where( + [ + 'id' => [ + 7, + 37, + 38, + 39, + ], + ] + ) + ->orderBy('id') + ->all(); + + return $this->render( + 'individual', + [ + 'objects' => $objects, + ] + ); } // частное лицо public function actionLegal() diff --git a/frontend/views/layouts/main.php b/frontend/views/layouts/main.php index 3bbb38e..062d0c3 100644 --- a/frontend/views/layouts/main.php +++ b/frontend/views/layouts/main.php @@ -94,25 +94,27 @@
-
+ \ No newline at end of file -- libgit2 0.21.4