Commit 923cadac306d7783977493eee6b5263a61d044b8

Authored by Yarik
1 parent 44986c1c

Small fixes 8.11.16

common/behaviors/AjaxFilter.php 100755 → 100644
common/models/ArticlesLang.php
@@ -28,8 +28,8 @@ class ArticlesLang extends \yii\db\ActiveRecord @@ -28,8 +28,8 @@ class ArticlesLang extends \yii\db\ActiveRecord
28 public static function primaryKey() 28 public static function primaryKey()
29 { 29 {
30 return [ 30 return [
31 - 'articles_id' => Yii::t('app', 'articles_id'),  
32 - 'language_id' => Yii::t('app', 'language_id'), 31 + 'articles_id',
  32 + 'language_id',
33 ]; 33 ];
34 } 34 }
35 35
common/modules/language/components/LanguageUrlManager.php
@@ -33,4 +33,5 @@ @@ -33,4 +33,5 @@
33 return '/'.$language->url.$url; 33 return '/'.$language->url.$url;
34 } 34 }
35 } 35 }
36 - }  
37 \ No newline at end of file 36 \ No newline at end of file
  37 + }
  38 +
38 \ No newline at end of file 39 \ No newline at end of file
frontend/controllers/BasketController.php
@@ -29,7 +29,7 @@ @@ -29,7 +29,7 @@
29 ], 29 ],
30 ]; 30 ];
31 } 31 }
32 - 32 +
33 public function actionIndex() 33 public function actionIndex()
34 { 34 {
35 $response = \Yii::$app->response; 35 $response = \Yii::$app->response;
frontend/controllers/SiteController.php
@@ -150,7 +150,10 @@ @@ -150,7 +150,10 @@
150 */ 150 */
151 public function actionContact() 151 public function actionContact()
152 { 152 {
153 - return $this->render('contact'); 153 + $page = Page::find()->with('lang')->where(['id' => 6])->one();
  154 + return $this->render('contact', [
  155 + 'page' => $page,
  156 + ]);
154 } 157 }
155 158
156 /** 159 /**
frontend/views/project/_list_item.php
@@ -35,6 +35,8 @@ @@ -35,6 +35,8 @@
35 ]); 35 ]);
36 } 36 }
37 ?> 37 ?>
  38 + </div>
  39 + <div class="new_article-img">
38 <div class="brand-list-desc-txt"> 40 <div class="brand-list-desc-txt">
39 <?php 41 <?php
40 echo $model->lang->description_preview?:$model->lang->description; 42 echo $model->lang->description_preview?:$model->lang->description;
frontend/views/site/contact.php
@@ -2,26 +2,15 @@ @@ -2,26 +2,15 @@
2 2
3 /** 3 /**
4 * @var $this yii\web\View 4 * @var $this yii\web\View
  5 + * @var $page Page
5 */ 6 */
6 7
7 - $this->title = 'Контакты'; 8 + use common\models\Page;
  9 +
  10 + $this->title = $page->lang->title;
8 $this->params[ 'breadcrumbs' ][] = $this->title; 11 $this->params[ 'breadcrumbs' ][] = $this->title;
9 -?>  
10 -<div class="section-box box-title-1 uppercase"><?= $this->title; ?></div>  
11 -<div class="section-box box-brand margin_bottom_30">  
12 - <div class="row">  
13 - <div class="col-xs-12 col-sm-12 col-md-12 title-contacts">Центральный офис</div>  
14 - <div class="col-xs-12 col-sm-12 col-md-12 service-txt">  
15 - <p>Адрес: г. Киев, ул. Богатырская, 11, оф. 703 </p>  
16 - <p>  
17 - Тел. основной: (044) 503-73-76,<br/>  
18 - Контрактный отдел: (044) 503-00-33,<br/>  
19 - Отдел по работе с дизайнерами и архитекторами: (044) 503-00-30  
20 - </p>  
21 - <div id="contact-map" style="height:600px; width: 100%"></div>  
22 - <p>e-mail: info@witex.ua</p>  
23 - <?php  
24 - $this->registerJs(" 12 + $this->registerJs(
  13 + "
25 function initMap() { 14 function initMap() {
26 var myLatLng = {lat: 50.524860, lng: 30.482552}; 15 var myLatLng = {lat: 50.524860, lng: 30.482552};
27 var map = new google.maps.Map(document.getElementById('contact-map'), { 16 var map = new google.maps.Map(document.getElementById('contact-map'), {
@@ -34,20 +23,16 @@ @@ -34,20 +23,16 @@
34 title: 'ВІТЕКС УКРАЇНА!' 23 title: 'ВІТЕКС УКРАЇНА!'
35 }); 24 });
36 } 25 }
37 - ", $this::POS_BEGIN);  
38 - ?>  
39 - <?php  
40 - $this->registerJsFile('https://maps.googleapis.com/maps/api/js?key=AIzaSyCaeB8Lppsl-JqjsGWVHxxMQ3WqU8vGlOQ&callback=initMap');  
41 - ?>  
42 - </div>  
43 - <div class="col-xs-12 col-sm-12 col-md-12 title-contacts">Восточная дирекция</div>  
44 - <div class="col-xs-12 col-sm-12 col-md-12 service-txt">  
45 - <p>Тел: (067) 620-30-70</p>  
46 - <p>  
47 - e-mail: arcady.aviraimov@witex.com.ua, <br/>  
48 - e-mail: arcady.aviraimov@witex.com.ua, <br/>  
49 - dmitriy.goloperov@witex.com.ua  
50 - </p>  
51 - </div>  
52 - </div>  
53 -</div>  
54 \ No newline at end of file 26 \ No newline at end of file
  27 + ",
  28 + $this::POS_BEGIN
  29 + );
  30 + $this->registerJsFile(
  31 + 'https://maps.googleapis.com/maps/api/js?key=AIzaSyCaeB8Lppsl-JqjsGWVHxxMQ3WqU8vGlOQ&callback=initMap'
  32 + );
  33 +?>
  34 +<div class="section-box box-title-1 uppercase"><?= $this->title; ?></div>
  35 +<div class="section-box box-brand margin_bottom_30">
  36 + <?php
  37 + echo $page->lang->body;
  38 + ?>
  39 +</div>
frontend/web/css/style.min.css
@@ -2612,7 +2612,6 @@ ul.breadcrumb li a { @@ -2612,7 +2612,6 @@ ul.breadcrumb li a {
2612 .new_article-img { 2612 .new_article-img {
2613 width: 50%; 2613 width: 50%;
2614 float: left; 2614 float: left;
2615 - margin-right: 15px;  
2616 padding-right: 15px; 2615 padding-right: 15px;
2617 margin-bottom: 10px 2616 margin-bottom: 10px
2618 } 2617 }