Commit 923cadac306d7783977493eee6b5263a61d044b8
1 parent
44986c1c
Small fixes 8.11.16
Showing
8 changed files
with
30 additions
and
40 deletions
Show diff stats
common/models/ArticlesLang.php
... | ... | @@ -28,8 +28,8 @@ class ArticlesLang extends \yii\db\ActiveRecord |
28 | 28 | public static function primaryKey() |
29 | 29 | { |
30 | 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
frontend/controllers/BasketController.php
frontend/controllers/SiteController.php
... | ... | @@ -150,7 +150,10 @@ |
150 | 150 | */ |
151 | 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
frontend/views/site/contact.php
... | ... | @@ -2,26 +2,15 @@ |
2 | 2 | |
3 | 3 | /** |
4 | 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 | 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 | 14 | function initMap() { |
26 | 15 | var myLatLng = {lat: 50.524860, lng: 30.482552}; |
27 | 16 | var map = new google.maps.Map(document.getElementById('contact-map'), { |
... | ... | @@ -34,20 +23,16 @@ |
34 | 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 | 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