diff --git a/frontend/controllers/SiteController.php b/frontend/controllers/SiteController.php index 870ec6f..aeddffa 100755 --- a/frontend/controllers/SiteController.php +++ b/frontend/controllers/SiteController.php @@ -1,8 +1,9 @@ render('index'); } - + /** * Displays contact page. * @@ -68,7 +69,7 @@ ] ); } - + /** * Displays about page. * @@ -78,7 +79,7 @@ { return $this->render('about'); } - + /** * Action to view robots.txt file dinamycli * @@ -99,23 +100,23 @@ $response->headers->set('Content-Type', 'text/plain'); return $this->renderFile($meta[ 'uri' ]); } - + public function actionFeedback() { Yii::$app->response->format = Response::FORMAT_JSON; - + /** * @var Mailer $mailer */ $mailer = \Yii::$app->get('smtpmailer'); $settings = Settings::getInstance(); - + if (empty(Yii::$app->request->post())) { throw new BadRequestHttpException(); } else { $model = new Feedback(); if ($model->load(Yii::$app->request->post()) && $model->save()) { - + $mailer->compose( 'feedback', [ @@ -126,7 +127,7 @@ ->setTo($settings->email) ->setSubject(\Yii::t('app', 'Feedback')) ->send(); - + return [ 'success' => true, 'message' => 'Success message', @@ -145,18 +146,47 @@ } } } - - public function actionAppment(){ + + public function actionAppment() + { return $this->render('appment'); } - - public function actionPrice(){ - $page_stom = Page::find()->with('lang')->where(['id' => 3])->one(); - $page_cosm = Page::find()->with('lang')->where(['id' => 4])->one(); - - return $this->render('price',[ - 'page_stom' => $page_stom, - 'page_cosm' => $page_cosm, - ]); + + public function actionPrice() + { + $page_stom = Page::find() + ->with('lang') + ->where([ 'id' => 3 ]) + ->one(); + $page_cosm = Page::find() + ->with('lang') + ->where([ 'id' => 4 ]) + ->one(); + + return $this->render( + 'price', + [ + 'page_stom' => $page_stom, + 'page_cosm' => $page_cosm, + ] + ); + } + + public function actionComments() + { + $model = new CommentModel( + [ + 'id' => 1, + ] + ); + + $this->view->params[ 'breadcrumbs' ][] = \Yii::t('app', 'Комментарии'); + + return $this->render( + 'comments', + [ + 'model' => $model, + ] + ); } } diff --git a/frontend/models/CommentPage.php b/frontend/models/CommentPage.php new file mode 100644 index 0000000..39d5861 --- /dev/null +++ b/frontend/models/CommentPage.php @@ -0,0 +1,15 @@ + function (ActiveQuery $query) { $query->with('lang.alias') - ->where(['in_menu' => true]) + ->where([ 'in_menu' => true ]) ->orderBy([ 'sort' => SORT_ASC ]); }, ] @@ -78,171 +78,171 @@ beginBody() ?> - ga_code)) { ?> - - + ga('create', 'ga_code?>', 'auto'); + ga('send', 'pageview'); + + +
- -
-
-
-
- - -
-
- -
-
+ +
+
+
+
+ + +
+
+
+
- +
+
- - - - -