From a6fd26194159a4b4a3058aaf1af0687ac39b342c Mon Sep 17 00:00:00 2001 From: zhegal Date: Fri, 9 Feb 2018 18:24:00 +0200 Subject: [PATCH] правки --- frontend/controllers/SiteController.php | 15 ++++++++++++++- frontend/views/layouts/main.php | 8 ++++---- frontend/views/object/index.php | 8 +------- frontend/views/site/about.php | 72 ++---------------------------------------------------------------------- 4 files changed, 21 insertions(+), 82 deletions(-) diff --git a/frontend/controllers/SiteController.php b/frontend/controllers/SiteController.php index 7748894..5df7774 100644 --- a/frontend/controllers/SiteController.php +++ b/frontend/controllers/SiteController.php @@ -2,6 +2,7 @@ namespace frontend\controllers; + use artbox\core\models\Page; use common\models\Feedback; use common\models\Settings; use common\models\Slider; @@ -10,6 +11,7 @@ use yii\swiftmailer\Mailer; use yii\web\BadRequestHttpException; use yii\web\Controller; + use yii\web\NotFoundHttpException; use yii\web\Response; use common\models\Objectkb; @@ -105,7 +107,18 @@ */ public function actionAbout() { - return $this->render('about'); + $page = Page::find()->with('lang') + ->where(['id' => 3])->one(); + + if ($page) { + return $this->render('about', [ + 'page' => $page, + ]); + + } else { + throw new NotFoundHttpException(); + } + } public function actionIndividual() diff --git a/frontend/views/layouts/main.php b/frontend/views/layouts/main.php index edbab04..5a1434a 100644 --- a/frontend/views/layouts/main.php +++ b/frontend/views/layouts/main.php @@ -152,10 +152,10 @@ diff --git a/frontend/views/site/about.php b/frontend/views/site/about.php index 2a13435..36ac0bc 100644 --- a/frontend/views/site/about.php +++ b/frontend/views/site/about.php @@ -4,8 +4,7 @@ /** * @var View $this - */ - /** + * @var \artbox\core\models\Page $page * @var SeoComponent $seo */ $seo = \Yii::$app->get('seo'); @@ -15,74 +14,7 @@
- -
-

-
- -

- -
-
- -
-
-
-
-
-
- -
-
-
-
- -
-
-

-

-
-
-
-
-
-
- -
-
-

-

-
-
-
-
-

-

-

-
-
- -
-
-
-
-
- -
-
-
- -
- -
+ lang->body?>
-- libgit2 0.21.4