Blame view

frontend/views/site/contact.php 4.58 KB
298bc0f4   Alexey Boroda   first commit
1
2
3
4
5
6
7
8
  <?php
      
      /**
       * @var View     $this
       * @var Feedback $contact
       * @var \artbox\core\forms\Module $module;
       */
      
929c9486   alex   Поредактировал фо...
9
      use frontend\models\Feedback;
298bc0f4   Alexey Boroda   first commit
10
11
12
      use common\models\Settings;
      use frontend\assets\MapAsset;
      use yii\helpers\Html;
298bc0f4   Alexey Boroda   first commit
13
      use yii\web\View;
8d88a552   alex   Add Google Recapt...
14
  use yii\widgets\ActiveForm;
298bc0f4   Alexey Boroda   first commit
15
16
17
18
      
      MapAsset::register($this);
      $settings = Settings::getInstance();
      
0d556e29   Anastasia   translations
19
      $this->title = \Yii::t('app', 'Contacts');
298bc0f4   Alexey Boroda   first commit
20
21
22
23
24
25
26
27
28
29
30
31
32
      $this->params[ 'breadcrumbs' ][] = $this->title;
      
      $js = <<< JS
  window.lat = {$settings->lat};
  window.lon = {$settings->lon};
  JS;
      
      $this->registerJs($js, View::POS_END);
      $module = \Yii::$app->getModule('contact');
  ?>
  
  <div id="content">
      <div class="container" id="contact">
298bc0f4   Alexey Boroda   first commit
33
34
35
36
37
38
39
40
          <section>
              
              <div class="row">
                  <div class="col-md-4">
                      <div class="box-simple">
                          <div class="icon">
                              <i class="fa fa-map-marker"></i>
                          </div>
39b74e50   Виталий   translate
41
                          <h3><?=\Yii::t('app', 'Address')?></h3>
298bc0f4   Alexey Boroda   first commit
42
43
                          <p>
                              <?php
06a9fe94   Anastasia   - address
44
45
                                  if (!empty( $settings->address )) {
                                      echo $settings->address;
298bc0f4   Alexey Boroda   first commit
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
                                  }
                              ?>
                          </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>
39b74e50   Виталий   translate
62
63
                                  <h3><?=\Yii::t('app', 'phone')?></h3>
                                 <p>
298bc0f4   Alexey Boroda   first commit
64
65
                                      <?php
                                          echo Html::a(Html::tag('strong', $settings->phone), 'tel:' . $settings->phone);
82c0ed3a   alex   Добавил 2й телефо...
66
                                          if (!empty( $settings->phone2 )) {
ad777c59   alex   Поправил баг с 2м...
67
                                              echo '<br>';
245556ec   alex   Поправил баг с 2м...
68
                                              echo Html::a(
2ed86dda   alex   Поправил баг с 2м...
69
70
                                                  Html::tag('strong', $settings->phone2),
                                                  "tel:" . $settings->phone2
245556ec   alex   Поправил баг с 2м...
71
                                              );
82c0ed3a   alex   Добавил 2й телефо...
72
                                          }
298bc0f4   Alexey Boroda   first commit
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
                                      ?>
                                  </p>
                              </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>
39b74e50   Виталий   translate
91
                                  <h3>e-mail</h3>
298bc0f4   Alexey Boroda   first commit
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
                                  <ul class="list-style-none">
                                      <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">
0d556e29   Anastasia   translations
118
                          <h2> <?=\Yii::t('app', 'Contact form')?> </h2>
298bc0f4   Alexey Boroda   first commit
119
120
                      </div>
                  </div>
71912755   alex   Убрал маску с тел...
121
  
298bc0f4   Alexey Boroda   first commit
122
                  <div class="col-md-8 col-md-offset-2">
8d88a552   alex   Add Google Recapt...
123
124
125
  
  
  	                <?= $module->renderForm($this) ?>
298bc0f4   Alexey Boroda   first commit
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
                    
                  </div>
              </div>
              <!-- /.row -->
          
          </section>
      
      
      </div>
      <!-- /#contact.container -->
  </div>
  <!-- /#content -->
  
  <div id="map">
  
  </div>