Blame view

frontend/views/site/contact.php 7.94 KB
06692811   Eugeny Galkovskiy   first commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
  <?php
      
      /**
       * @var View     $this
       * @var Feedback $contact
       */
      
      use artbox\core\models\Feedback;
      use common\models\Settings;
      use frontend\assets\MapAsset;
      use yii\helpers\Html;
      use yii\bootstrap\ActiveForm;
      use yii\web\View;
      
      MapAsset::register($this);
      $settings = Settings::getInstance();
      
ca22b6dc   Timur Kastemirov   h1 in site pages
18
19
      $this->params['h1'] = \Yii::t('app', 'menu-contacts');
      $this->params[ 'breadcrumbs' ][] = $this->params['h1'];
06692811   Eugeny Galkovskiy   first commit
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
      
      $js = <<< JS
  window.lat = {$settings->lat};
  window.lon = {$settings->lon};
  JS;
      
      $this->registerJs($js, View::POS_END);
  ?>
  
  <div id="content">
      <div class="container" id="contact">
          
          <section>
              
              <div class="row">
                  <div class="col-md-12">
                      <section>
                          <div class="heading">
be3cfcb8   Eugeny Galkovskiy   translates
38
                              <h2><?= \Yii::t('app', 'contact_title') ?></h2>
06692811   Eugeny Galkovskiy   first commit
39
40
                          </div>
                          
be3cfcb8   Eugeny Galkovskiy   translates
41
                          <p class="lead"><?= \Yii::t('app', 'contact_text1') ?></p>
06692811   Eugeny Galkovskiy   first commit
42
43
44
45
46
47
48
49
50
51
52
53
54
                      </section>
                  </div>
              </div>
          
          </section>
          <section>
              
              <div class="row">
                  <div class="col-md-4">
                      <div class="box-simple">
                          <div class="icon">
                              <i class="fa fa-map-marker"></i>
                          </div>
be3cfcb8   Eugeny Galkovskiy   translates
55
                          <h3><?= \Yii::t('app', 'contact_adr') ?></h3>
06692811   Eugeny Galkovskiy   first commit
56
57
58
                          <p>
                              <?php
                                  if (!empty( $settings->street )) {
efe446f8   Eugeny Galkovskiy   translates contac...
59
                                      echo \Yii::t('app', $settings->street);
06692811   Eugeny Galkovskiy   first commit
60
                                      if (!empty( $settings->house )) {
efe446f8   Eugeny Galkovskiy   translates contac...
61
                                          echo " " . \Yii::t('app', $settings->house);
06692811   Eugeny Galkovskiy   first commit
62
63
64
65
                                      }
                                      echo Html::tag('br');
                                  }
                                  if (!empty( $settings->city )) {
efe446f8   Eugeny Galkovskiy   translates contac...
66
                                      echo \Yii::t('app', $settings->city);
06692811   Eugeny Galkovskiy   first commit
67
                                      if (!empty( $settings->country )) {
efe446f8   Eugeny Galkovskiy   translates contac...
68
                                          echo Html::tag('strong', ", " . \Yii::t('app', $settings->country));
06692811   Eugeny Galkovskiy   first commit
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
                                      }
                                  }
                              ?>
                          </p>
                      </div>
                      <!-- /.box - simple-->
                  </div>
                  
                  
                  <div class="col-md-4">
                      <?php
                          if (!empty( $settings->phone )) {
                              ?>
                              <div class="box-simple">
                                  <div class="icon">
                                      <i class="fa fa-phone"></i>
                                  </div>
be3cfcb8   Eugeny Galkovskiy   translates
86
87
                                  <h3> <?= \Yii::t('app', 'Phone') ?> </h3>
                                  <p class="text-muted"> <?= \Yii::t('app', 'ContactPhone') ?></p>
06692811   Eugeny Galkovskiy   first commit
88
89
90
91
92
                                  <p>
                                      <?php
                                          echo Html::a(Html::tag('strong', $settings->phone), 'tel:' . $settings->phone);
                                      ?>
                                  </p>
58d8192e   Eugeny Galkovskiy   translates
93
94
95
96
97
                                  <p>
                                      <?php
                                          echo Html::a(Html::tag('strong', $settings->phone2), 'tel:' . $settings->phone2);
                                      ?>
                                  </p>
06692811   Eugeny Galkovskiy   first commit
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
                              </div>
                              <!-- /.box - simple-->
                              <?php
                          }
                      ?>
                  </div>
                  
                  <?php
                      if (!empty( $settings->email )) {
                          ?>
                          <div class="col-md-4">
                              
                              <div class="box-simple">
                                  <div class="icon">
                                      <i class="fa fa-envelope"></i>
                                  </div>
be3cfcb8   Eugeny Galkovskiy   translates
114
                                  <h3> <?= \Yii::t('app', 'ContactEmail') ?> </h3>
06f72359   Eugeny Galkovskiy   header size
115
                                  <ul class="list-style-none" style="padding: 0;">
06692811   Eugeny Galkovskiy   first commit
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
                                      <li>
                                          <?php
                                              echo Html::a(
                                                  Html::tag('strong', $settings->email),
                                                  'mailto:' . $settings->email
                                              );
                                          ?>
                                      </li>
                                  </ul>
                              </div>
                              <!-- /.box - simple-->
                          </div>
                          <?php
                      }
                  ?>
              </div>
          
          </section>
          
          <section>
              
              <div class="row text-center">
                  
                  <div class="col-md-12">
                      <div class="heading">
be3cfcb8   Eugeny Galkovskiy   translates
141
                          <h2> <?= \Yii::t('app', 'ContactUs') ?> </h2>
06692811   Eugeny Galkovskiy   first commit
142
143
144
145
146
147
148
149
150
151
152
153
154
155
                      </div>
                  </div>
                  
                  <div class="col-md-8 col-md-offset-2">
                      <?php $form = ActiveForm::begin(
                          [
                              'id' => 'contact-form',
                              'method' => 'POST',
                              'action' => '/site/feedback',
                          ]
                      ); ?>
                      <div class="row">
                          <div class="col-sm-12">
                              <?= $form->field($contact, 'name')
50cf76a2   Eugeny Galkovskiy   translates
156
                                       ->textInput()->label(\Yii::t('app', 'formname')); ?>
06692811   Eugeny Galkovskiy   first commit
157
158
159
160
                          </div>
                          
                          <div class="col-sm-6">
                              <?= $form->field($contact, 'email')
94fc00a8   Eugeny Galkovskiy   main page + carou...
161
                                       ->textInput()->label('Email'); ?>
06692811   Eugeny Galkovskiy   first commit
162
163
164
                          </div>
                          <div class="col-sm-6">
                              <?= $form->field($contact, 'phone')
50cf76a2   Eugeny Galkovskiy   translates
165
                                       ->textInput()->label(\Yii::t('app', 'formtheme')); ?>
06692811   Eugeny Galkovskiy   first commit
166
167
168
169
170
171
172
                          </div>
                          <div class="col-sm-12">
                              <?= $form->field($contact, 'message')
                                       ->textarea(
                                           [
                                               'rows' => 3,
                                           ]
50cf76a2   Eugeny Galkovskiy   translates
173
                                       )->label(\Yii::t('app', 'formmess')); ?>
06692811   Eugeny Galkovskiy   first commit
174
175
176
177
                          </div>
                          
                          <div class="col-sm-12 text-center">
                              <?= Html::submitButton(
be3cfcb8   Eugeny Galkovskiy   translates
178
                                  '<i class="fa fa-envelope-o"></i> '.\Yii::t('app', 'LeaveMessage'),
06692811   Eugeny Galkovskiy   first commit
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
                                  [
                                      'class' => 'btn btn-template-main',
                                  ]
                              ) ?>
                          
                          </div>
                      </div>
                      <!-- /.row -->
                      <?php ActiveForm::end(); ?>
                  </div>
              </div>
              <!-- /.row -->
          
          </section>
      
      
      </div>
      <!-- /#contact.container -->
  </div>
  <!-- /#content -->
94fc00a8   Eugeny Galkovskiy   main page + carou...
199
200
201
  <div id="get-it">
      <div class="container">
          <div class="col-md-8 col-sm-12">
be3cfcb8   Eugeny Galkovskiy   translates
202
              <h3><?= \Yii::t('app', 'CALLBACK') ?></h3>
94fc00a8   Eugeny Galkovskiy   main page + carou...
203
204
          </div>
          <div class="col-md-4 col-sm-12">
be3cfcb8   Eugeny Galkovskiy   translates
205
              <a href="#" class="btn btn-template-transparent-primary" data-toggle="modal" data-target="#feedback-modal"><?= \Yii::t('app', 'callme') ?></a>
94fc00a8   Eugeny Galkovskiy   main page + carou...
206
207
208
          </div>
      </div>
  </div>
06692811   Eugeny Galkovskiy   first commit
209
210
211
  <div id="map">
  
  </div>