Commit b949de7153e667342f7c281d0b64fb93d4e1f1d9

Authored by alex
1 parent 14f1c77d

add eng translates

frontend/views/layouts/main.php
... ... @@ -762,8 +762,8 @@ _________________________________________________________ -->
762 762  
763 763 if (!empty($settings->street)) {
764 764  
765   - echo ($notEng)?$settings->street
766   - :'m. Poznyaki, st. Sribnokilskaya';
  765 + echo (($notEng)?$settings->street
  766 + :'m. Poznyaki, st. Sribnokilskaya');
767 767 if (!empty($settings->house)) {
768 768 echo " " .
769 769 $settings->house
... ... @@ -773,11 +773,12 @@ _________________________________________________________ -->
773 773 echo Html::tag('br');
774 774 }
775 775 if (!empty($settings->city)) {
776   - echo ($notEng)?$settings->city:"Kyiv";
  776 + echo (($notEng)?$settings->city:"Kyiv");
777 777 echo Html::tag('br');
778 778 }
779 779 if (!empty($settings->country)) {
780   - echo Html::tag('strong', ($notEng)?$settings->country:"Ukraine");
  780 + echo Html::tag('strong',
  781 + (($notEng)?$settings->country:"Ukraine"));
781 782 }
782 783 ?>
783 784 </p>
... ...
frontend/views/site/contact.php
1 1 <?php
2   -
3   - /**
4   - * @var View $this
5   - * @var Feedback $contact
6   - */
7   -
8   - use artbox\core\models\Feedback;
9   - use common\models\Settings;
10   - use frontend\assets\MapAsset;
11   - use yii\helpers\Html;
12   - use yii\bootstrap\ActiveForm;
13   - use yii\web\View;
14   -
15   - MapAsset::register($this);
16   - $settings = Settings::getInstance();
17   -
18   - $this->title = \Yii::t('app', 'Контакты');
19   - $this->params[ 'breadcrumbs' ][] = $this->title;
20   -
21   - $js = <<< JS
  2 +
  3 +/**
  4 + * @var View $this
  5 + * @var Feedback $contact
  6 + */
  7 +
  8 +use artbox\core\models\Feedback;
  9 +use common\models\Settings;
  10 +use frontend\assets\MapAsset;
  11 +use yii\helpers\Html;
  12 +use yii\bootstrap\ActiveForm;
  13 +use yii\web\View;
  14 +
  15 +MapAsset::register($this);
  16 +$settings = Settings::getInstance();
  17 +
  18 +$this->title = \Yii::t('app', 'Контакты');
  19 +$this->params[ 'breadcrumbs' ][] = $this->title;
  20 +
  21 +$js = <<< JS
22 22 window.lat = {$settings->lat};
23 23 window.lon = {$settings->lon};
24 24 JS;
25   -
26   - $this->registerJs($js, View::POS_END);
  25 +
  26 +$this->registerJs($js, View::POS_END);
27 27 ?>
28 28  
29 29 <div id="content">
30 30 <div class="container" id="contact">
31   -
  31 +
32 32 <section>
33   -
  33 +
34 34 <div class="row">
35 35 <div class="col-md-12">
36 36 <section>
37 37  
38   - <?php
39   -// echo '<p class="lead">Are you curious about something? Do you have some kind of problem with our products? As am hastily invited settled at limited civilly fortune me. Really spring in extent an by. Judge but built gay party world. Of so am
40   -// he remember although required. Bachelor unpacked be advanced at. Confined in declared marianne is vicinity.</p>
41   -// <p>Please feel free to contact us, our customer service center is working for you 24/7.</p>';
42   - ?>
  38 + <?php
  39 + // echo '<p class="lead">Are you curious about something? Do you have some kind of problem with our products? As am hastily invited settled at limited civilly fortune me. Really spring in extent an by. Judge but built gay party world. Of so am
  40 + // he remember although required. Bachelor unpacked be advanced at. Confined in declared marianne is vicinity.</p>
  41 + // <p>Please feel free to contact us, our customer service center is working for you 24/7.</p>';
  42 + ?>
43 43  
44 44 </section>
45 45 </div>
46 46 </div>
47   -
  47 +
48 48 </section>
49 49 <section>
50   -
  50 +
51 51 <div
52   - class="row"
53   - itemscope
54   - itemtype="http://schema.org/Organization"
  52 + class="row"
  53 + itemscope
  54 + itemtype="http://schema.org/Organization"
55 55 >
56 56 <div class="col-md-4">
57 57 <div
58   - class="box-simple"
59   - itemprop="address"
60   - itemscope
61   - itemtype="http://schema.org/PostalAddress"
  58 + class="box-simple"
  59 + itemprop="address"
  60 + itemscope
  61 + itemtype="http://schema.org/PostalAddress"
62 62 >
63 63 <div class="icon">
64 64 <i class="fa fa-map-marker"></i>
65 65 </div>
66 66 <h3><?=\Yii::t('app', 'Адрес')?></h3>
67 67 <p>
68   - <?php
69   - if (!empty( $settings->street )) {
70   - $notEn = (\artbox\core\models\Language::getCurrent()->url !== 'en')?true:false;
71   - echo "<span itemprop=\"streetAddress\">".
72   - $notEn?
73   - $settings->street
74   - :'m. Poznyaki, st. Sribnokilskaya'
75   - ;
76   - if (!empty( $settings->house )) {
77   - echo " " . $settings->house;
78   - }
79   - echo "</span>";
80   - echo Html::tag('br');
81   - }
82   - if (!empty( $settings->city )) {
83   - echo "<span itemprop=\"addressLocality\">".
84   -
85   - $notEn?$settings->city
86   - :'Kyiv'
87   - ."</span>";
88   - if (!empty( $settings->country )) {
89   - echo Html::tag('strong', ", <span itemprop=\"addressCountry\">" .
90   - $notEn?
  68 + <?php
  69 + $notEn = (\artbox\core\models\Language::getCurrent()->url !== 'en')?true:false;
  70 +
  71 + if (!empty( $settings->street )) {
  72 +
  73 + echo "<span itemprop=\"streetAddress\">";
  74 + echo ($notEn)?
  75 + $settings->street
  76 + :'m. Poznyaki, st. Sribnokilskaya'
  77 + ;
  78 + if (!empty( $settings->house )) {
  79 + echo " " . $settings->house;
  80 + }
  81 + echo "</span>";
  82 + echo Html::tag('br');
  83 + }
  84 + if (!empty( $settings->city )) {
  85 + echo "<span itemprop=\"addressLocality\">";
  86 + echo
  87 + ($notEn)?$settings->city
  88 + :'Kyiv'
  89 + ."</span>";
  90 + if (!empty( $settings->country )) {
  91 + echo Html::tag('strong', ", <span itemprop=\"addressCountry\">" .
  92 + (($notEn)?
91 93 $settings->country
92   - :'Ukraine'
93   - ."</span>");
94   - }
95   - }
96   - ?>
  94 + :'Ukraine')
  95 + ."</span>");
  96 + }
  97 + }
  98 + ?>
97 99 </p>
98 100 </div>
99 101 <!-- /.box - simple-->
100 102 </div>
101   -
102   -
  103 +
  104 +
103 105 <div class="col-md-4">
104   - <?php
105   - if (!empty( $settings->phone )) {
106   - ?>
107   - <div class="box-simple">
108   - <div class="icon">
109   - <i class="fa fa-phone"></i>
110   - </div>
111   - <h3> <?=\Yii::t('app','Телефон')?> </h3>
112   - <?php
113   -// echo '<p class="text-muted"> This number is toll free if calling from Great Britain otherwise we advise you to use the electronic form of communication .</p>';
114   - ?>
115   - <p>
116   - <?php
117   - echo Html::a(Html::tag('strong', "<span itemprop=\"telephone\">".$settings->phone."</span>"), 'tel:' . $settings->phone);
118   - echo Html::tag('div', "<span itemprop=\"telephone\">".$settings->phone2."</span>");
119   - ?>
120   - </p>
  106 + <?php
  107 + if (!empty( $settings->phone )) {
  108 + ?>
  109 + <div class="box-simple">
  110 + <div class="icon">
  111 + <i class="fa fa-phone"></i>
121 112 </div>
122   - <!-- /.box - simple-->
123   - <?php
124   - }
125   - ?>
  113 + <h3> <?=\Yii::t('app','Телефон')?> </h3>
  114 + <?php
  115 + // echo '<p class="text-muted"> This number is toll free if calling from Great Britain otherwise we advise you to use the electronic form of communication .</p>';
  116 + ?>
  117 + <p>
  118 + <?php
  119 + echo Html::a(Html::tag('strong', "<span itemprop=\"telephone\">".$settings->phone."</span>"), 'tel:' . $settings->phone);
  120 + echo Html::tag('div', "<span itemprop=\"telephone\">".$settings->phone2."</span>");
  121 + ?>
  122 + </p>
  123 + </div>
  124 + <!-- /.box - simple-->
  125 + <?php
  126 + }
  127 + ?>
126 128 </div>
127   -
128   - <?php
129   - if (!empty( $settings->email )) {
130   - ?>
131   - <div class="col-md-4">
132   -
133   - <div class="box-simple">
134   - <div class="icon">
135   - <i class="fa fa-envelope"></i>
136   - </div>
137   - <h3> E-mail </h3>
138   - <?php
139   -// echo '<p class="text-muted"> Please feel free to write an email to us or to use our electronic ticketing system .</p>';
140   - ?>
141   - <ul class="list-style-none">
142   - <li>
143   - <?php
144   - echo Html::a(
145   - Html::tag('strong', "<span itemprop=\"email\">".$settings->email."</span>"),
146   - 'mailto:' . $settings->email
147   - );
148   - ?>
149   - </li>
150   - </ul>
  129 +
  130 + <?php
  131 + if (!empty( $settings->email )) {
  132 + ?>
  133 + <div class="col-md-4">
  134 +
  135 + <div class="box-simple">
  136 + <div class="icon">
  137 + <i class="fa fa-envelope"></i>
151 138 </div>
152   - <!-- /.box - simple-->
  139 + <h3> E-mail </h3>
  140 + <?php
  141 + // echo '<p class="text-muted"> Please feel free to write an email to us or to use our electronic ticketing system .</p>';
  142 + ?>
  143 + <ul class="list-style-none">
  144 + <li>
  145 + <?php
  146 + echo Html::a(
  147 + Html::tag('strong', "<span itemprop=\"email\">".$settings->email."</span>"),
  148 + 'mailto:' . $settings->email
  149 + );
  150 + ?>
  151 + </li>
  152 + </ul>
153 153 </div>
154   - <?php
155   - }
156   - ?>
  154 + <!-- /.box - simple-->
  155 + </div>
  156 + <?php
  157 + }
  158 + ?>
157 159 </div>
158   -
  160 +
159 161 </section>
160   -
  162 +
161 163 <section>
162   -
  164 +
163 165 <div class="row text-center">
164   -
  166 +
165 167 <div class="col-md-12">
166 168 <div class="heading">
167 169 <h2> <?=\Yii::t('app', 'Связаться с нами1')?> </h2>
168 170 </div>
169 171 </div>
170   -
  172 +
171 173 <div class="col-md-8 col-md-offset-2">
172   - <?php $form = ActiveForm::begin(
173   - [
174   - 'id' => 'contact-form',
175   - 'method' => 'POST',
176   - 'action' => '/site/feedback',
177   - ]
178   - ); ?>
  174 + <?php $form = ActiveForm::begin(
  175 + [
  176 + 'id' => 'contact-form',
  177 + 'method' => 'POST',
  178 + 'action' => '/site/feedback',
  179 + ]
  180 + ); ?>
179 181 <div class="row">
180   -
181   - <?= Html::hiddenInput('type', 'write_us');?>
182   -
  182 +
  183 + <?= Html::hiddenInput('type', 'write_us');?>
  184 +
183 185 <div class="col-sm-12">
184   - <?= $form->field($contact, 'name')
185   - ->textInput()
186   - ->label(\Yii::t('app', 'Имя')); ?>
  186 + <?= $form->field($contact, 'name')
  187 + ->textInput()
  188 + ->label(\Yii::t('app', 'Имя')); ?>
187 189 </div>
188   -
  190 +
189 191 <div class="col-sm-6">
190   - <?= $form->field($contact, 'email')
191   - ->textInput()
192   - ->label(\Yii::t('app','Email')); ?>
  192 + <?= $form->field($contact, 'email')
  193 + ->textInput()
  194 + ->label(\Yii::t('app','Email')); ?>
193 195 </div>
194 196 <div class="col-sm-6">
195   - <?= $form->field($contact, 'phone')
196   - ->textInput()
197   - ->label(\Yii::t('app','Телефон')); ?>
  197 + <?= $form->field($contact, 'phone')
  198 + ->textInput()
  199 + ->label(\Yii::t('app','Телефон')); ?>
198 200 </div>
199 201 <div class="col-sm-12">
200   - <?= $form->field($contact, 'message')
201   - ->textarea(
202   - [
203   - 'rows' => 3,
204   - ]
205   - )
206   - ->label(\Yii::t('app', 'Сообщение')); ?>
  202 + <?= $form->field($contact, 'message')
  203 + ->textarea(
  204 + [
  205 + 'rows' => 3,
  206 + ]
  207 + )
  208 + ->label(\Yii::t('app', 'Сообщение')); ?>
207 209 </div>
208   -
  210 +
209 211 <div class="col-sm-12 text-center">
210   - <?= Html::submitButton(
211   - '<i class="fa fa-envelope-o"></i> '.\Yii::t('app', 'Сообщение'),
212   - [
213   - 'class' => 'btn btn-template-main',
214   - ]
215   - ) ?>
216   -
  212 + <?= Html::submitButton(
  213 + '<i class="fa fa-envelope-o"></i> '.\Yii::t('app', 'Сообщение'),
  214 + [
  215 + 'class' => 'btn btn-template-main',
  216 + ]
  217 + ) ?>
  218 +
217 219 </div>
218 220 </div>
219 221 <!-- /.row -->
220   - <?php ActiveForm::end(); ?>
  222 + <?php ActiveForm::end(); ?>
221 223 </div>
222 224 </div>
223 225 <!-- /.row -->
224   -
  226 +
225 227 </section>
226   -
227   -
  228 +
  229 +
228 230 </div>
229 231 <!-- /#contact.container -->
230 232 </div>
... ...