Blame view

frontend/views/site/contact.php 5.63 KB
ae432de6   Alexey Boroda   first commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
  <?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();
      
      $this->title = \Yii::t('app', 'Contact');
      $this->params[ 'breadcrumbs' ][] = $this->title;
      
      $js = <<< JS
  window.lat = {$settings->lat};
  window.lon = {$settings->lon};
  JS;
      
      $this->registerJs($js, View::POS_END);
  ?>
  
7832919c   Alexey Boroda   -Ready
29
  
ae432de6   Alexey Boroda   first commit
30
  <div id="content">
7832919c   Alexey Boroda   -Ready
31
32
33
34
35
36
37
38
39
    <div class="container" id="contact">
      
      <section>
        
        <div class="row">
          <div class="col-md-12">
            <section>
              <div class="heading">
                <h2>Мы работаем для вас</h2>
ae432de6   Alexey Boroda   first commit
40
              </div>
ae432de6   Alexey Boroda   first commit
41
              
7832919c   Alexey Boroda   -Ready
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
              <p class="lead">Мы всегда готовы помочь вам выбрать оптимальный вариант оборудования, который покроет ваши потребности и не ударит по карману. Также будем рады ответить на все возникшие вопросы.</p>
              <p>Пожалуйста, оставьте ваши данные и мы свяжемся с вами в ближайшее время.</p>
            </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>
              <h3>Адрес</h3>
              <p><?php if (!empty($settings->street)) {
                      echo $settings->street . ',';
                  } ?> <?php
                      if (!empty($settings->house)) {
                          echo $settings->house;
ae432de6   Alexey Boroda   first commit
64
65
                      }
                  ?>
7832919c   Alexey Boroda   -Ready
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
                <br/><?php if (!empty($settings->index)) {
                      echo $settings->index . ',';
                  } ?>
                <br/><?php
                      if (!empty($settings->city)) {
                          echo $settings->city . ',';
                      }
                  ?> <strong><?php if (!empty($settings->country)) {
                          echo $settings->country;
                      } ?></strong>
              </p>
            </div>
            <!-- /.box-simple -->
          </div>
          
          
          <div class="col-md-4">
            
            <div class="box-simple">
              <div class="icon">
                <i class="fa fa-phone"></i>
              </div>
              <h3>Телефоны</h3>
              <p><strong><?php if (!empty($settings->phone)) {
                          echo $settings->phone;
                      } ?></strong>
              <p><strong><?php if (!empty($settings->phone2)) {
                          echo $settings->phone2;
                      } ?></strong>
              </p>
            </div>
            <!-- /.box-simple -->
          
          </div>
          
          <div class="col-md-4">
            
            <div class="box-simple">
              <div class="icon">
                <i class="fa fa-envelope"></i>
ae432de6   Alexey Boroda   first commit
106
              </div>
7832919c   Alexey Boroda   -Ready
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
              <h3>Электронный адрес</h3>
              <ul class="list-style-none" style="padding-left: 0">
                  <?php if (!empty($settings->email)) { ?>
                    <li><strong><a href="mailto:<?= $settings->email; ?>"><?= $settings->email; ?></a></strong>
                    </li>
                  <?php } ?>
              </ul>
            </div>
            <!-- /.box-simple -->
          </div>
        </div>
      
      </section>
      
      <section>
        
        <div class="row">
ae432de6   Alexey Boroda   first commit
124
          
7832919c   Alexey Boroda   -Ready
125
126
127
128
129
          <div class="col-md-12  text-center">
            <div class="heading">
              <h2>Возникли вопросы или предложения?</h2>
            </div>
          </div>
ae432de6   Alexey Boroda   first commit
130
          
7832919c   Alexey Boroda   -Ready
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
          <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 col-xs-12">
                  <?= $form->field($contact, 'name')
                           ->textInput(); ?>
              </div>
              
              <div class="col-sm-12 col-xs-12">
                  <?= $form->field($contact, 'email')
                           ->textInput(); ?>
              </div>
              
              <div class="col-sm-12 col-xs-12">
                  <?= $form->field($contact, 'phone')
                           ->textInput(); ?>
              </div>
              
              <div class="col-sm-12 col-xs-12">
                  <?= $form->field($contact, 'message')
                           ->textarea(
                               [
                                   'rows' => 3,
                               ]
                           ) ?>
              </div>
ae432de6   Alexey Boroda   first commit
163
              
7832919c   Alexey Boroda   -Ready
164
165
166
167
              <div class="col-sm-12 col-xs-12 text-center">
                  <?php
                      echo Html::submitButton(
                          Html::tag('i', '', [ 'class' => 'fa fa-envelope-o' ]) . ' Отправить',
ae432de6   Alexey Boroda   first commit
168
                          [
7832919c   Alexey Boroda   -Ready
169
                              'class' => 'btn btn-template-main',
ae432de6   Alexey Boroda   first commit
170
                          ]
7832919c   Alexey Boroda   -Ready
171
172
                      )
                  ?>
ae432de6   Alexey Boroda   first commit
173
              </div>
7832919c   Alexey Boroda   -Ready
174
175
176
            </div>
            <!-- /.row -->
              <?php $form::end(); ?>
ae432de6   Alexey Boroda   first commit
177
          
7832919c   Alexey Boroda   -Ready
178
179
180
181
          
          </div>
        </div>
        <!-- /.row -->
ae432de6   Alexey Boroda   first commit
182
      
7832919c   Alexey Boroda   -Ready
183
184
185
186
187
      </section>
    
    
    </div>
    <!-- /#contact.container -->
ae432de6   Alexey Boroda   first commit
188
  </div>
ae432de6   Alexey Boroda   first commit
189
190
191
192
  
  <div id="map">
  
  </div>