From 923cadac306d7783977493eee6b5263a61d044b8 Mon Sep 17 00:00:00 2001 From: yarik Date: Tue, 8 Nov 2016 19:09:32 +0200 Subject: [PATCH] Small fixes 8.11.16 --- common/behaviors/AjaxFilter.php | 0 common/models/ArticlesLang.php | 4 ++-- common/modules/language/components/LanguageUrlManager.php | 3 ++- frontend/controllers/BasketController.php | 2 +- frontend/controllers/SiteController.php | 5 ++++- frontend/views/project/_list_item.php | 2 ++ frontend/views/site/contact.php | 53 +++++++++++++++++++---------------------------------- frontend/web/css/style.min.css | 1 - 8 files changed, 30 insertions(+), 40 deletions(-) mode change 100755 => 100644 common/behaviors/AjaxFilter.php diff --git a/common/behaviors/AjaxFilter.php b/common/behaviors/AjaxFilter.php old mode 100755 new mode 100644 index cd7673b..cd7673b --- a/common/behaviors/AjaxFilter.php +++ b/common/behaviors/AjaxFilter.php diff --git a/common/models/ArticlesLang.php b/common/models/ArticlesLang.php index 018c411..101bb89 100755 --- a/common/models/ArticlesLang.php +++ b/common/models/ArticlesLang.php @@ -28,8 +28,8 @@ class ArticlesLang extends \yii\db\ActiveRecord public static function primaryKey() { return [ - 'articles_id' => Yii::t('app', 'articles_id'), - 'language_id' => Yii::t('app', 'language_id'), + 'articles_id', + 'language_id', ]; } diff --git a/common/modules/language/components/LanguageUrlManager.php b/common/modules/language/components/LanguageUrlManager.php index 54f7a29..96c8d22 100755 --- a/common/modules/language/components/LanguageUrlManager.php +++ b/common/modules/language/components/LanguageUrlManager.php @@ -33,4 +33,5 @@ return '/'.$language->url.$url; } } - } \ No newline at end of file + } + \ No newline at end of file diff --git a/frontend/controllers/BasketController.php b/frontend/controllers/BasketController.php index 321b6d0..e107dd3 100755 --- a/frontend/controllers/BasketController.php +++ b/frontend/controllers/BasketController.php @@ -29,7 +29,7 @@ ], ]; } - + public function actionIndex() { $response = \Yii::$app->response; diff --git a/frontend/controllers/SiteController.php b/frontend/controllers/SiteController.php index a3c0e71..a6d92e7 100755 --- a/frontend/controllers/SiteController.php +++ b/frontend/controllers/SiteController.php @@ -150,7 +150,10 @@ */ public function actionContact() { - return $this->render('contact'); + $page = Page::find()->with('lang')->where(['id' => 6])->one(); + return $this->render('contact', [ + 'page' => $page, + ]); } /** diff --git a/frontend/views/project/_list_item.php b/frontend/views/project/_list_item.php index 44e04c1..fdb15e3 100755 --- a/frontend/views/project/_list_item.php +++ b/frontend/views/project/_list_item.php @@ -35,6 +35,8 @@ ]); } ?> + +
lang->description_preview?:$model->lang->description; diff --git a/frontend/views/site/contact.php b/frontend/views/site/contact.php index a4bc6d0..8b8ed20 100755 --- a/frontend/views/site/contact.php +++ b/frontend/views/site/contact.php @@ -2,26 +2,15 @@ /** * @var $this yii\web\View + * @var $page Page */ - $this->title = 'Контакты'; + use common\models\Page; + + $this->title = $page->lang->title; $this->params[ 'breadcrumbs' ][] = $this->title; -?> -
title; ?>
-
-
-
Центральный офис
-
-

Адрес: г. Киев, ул. Богатырская, 11, оф. 703

-

- Тел. основной: (044) 503-73-76,
- Контрактный отдел: (044) 503-00-33,
- Отдел по работе с дизайнерами и архитекторами: (044) 503-00-30 -

-
-

e-mail: info@witex.ua

- registerJs(" + $this->registerJs( + " function initMap() { var myLatLng = {lat: 50.524860, lng: 30.482552}; var map = new google.maps.Map(document.getElementById('contact-map'), { @@ -34,20 +23,16 @@ title: 'ВІТЕКС УКРАЇНА!' }); } - ", $this::POS_BEGIN); - ?> - registerJsFile('https://maps.googleapis.com/maps/api/js?key=AIzaSyCaeB8Lppsl-JqjsGWVHxxMQ3WqU8vGlOQ&callback=initMap'); - ?> -
-
Восточная дирекция
-
-

Тел: (067) 620-30-70

-

- e-mail: arcady.aviraimov@witex.com.ua,
- e-mail: arcady.aviraimov@witex.com.ua,
- dmitriy.goloperov@witex.com.ua -

-
-
-
\ No newline at end of file + ", + $this::POS_BEGIN + ); + $this->registerJsFile( + 'https://maps.googleapis.com/maps/api/js?key=AIzaSyCaeB8Lppsl-JqjsGWVHxxMQ3WqU8vGlOQ&callback=initMap' + ); +?> +
title; ?>
+
+ lang->body; + ?> +
diff --git a/frontend/web/css/style.min.css b/frontend/web/css/style.min.css index 47fc872..991b4b2 100755 --- a/frontend/web/css/style.min.css +++ b/frontend/web/css/style.min.css @@ -2612,7 +2612,6 @@ ul.breadcrumb li a { .new_article-img { width: 50%; float: left; - margin-right: 15px; padding-right: 15px; margin-bottom: 10px } -- libgit2 0.21.4