Blame view

frontend/views/layouts/main.php 16 KB
3f2bc3d0   Administrator   first commit
1
  <?php

90a6ed1a   Administrator   basket
2
  

ccc7a9d3   Karnovsky A   Karnovsky 12052016
3
4
5
6
7
8
9
10
11
12
13
      use yii\helpers\Html;

      use yii\helpers\Url;

      use frontend\assets\AppAsset;

      use yii\web\View;

      use frontend\components\Text;

      use frontend\components\BgWidget;

  //    use frontend\components\CompareWidget;

      use frontend\components\HreflangWidget;

      use common\models\Subscribe;

      use yii\widgets\ActiveForm;

      use common\modules\product\models\Category;

4495dea0   Administrator   проапдейтил роли
14
      use frontend\widgets\Seo;

ccc7a9d3   Karnovsky A   Karnovsky 12052016
15
16
17
  

      AppAsset::register ($this);

      $this->registerJs ("

3f2bc3d0   Administrator   first commit
18
19
20
21
22
      $('.phone .more').bind('click',function(){

          $('.phone .more_block').toggle();

      });

  ", View::POS_READY, 'phone');

  //$this->registerCssFile(Yii::$app->request->BaseUrl.'/css/style.css');

ccc7a9d3   Karnovsky A   Karnovsky 12052016
23
24
      $this->registerJsFile (Yii::$app->request->baseUrl . '/js/basket.js', ['position' => View::POS_HEAD, 'depends' => ['yii\web\JqueryAsset']]);

      $this->registerJs ("

3f2bc3d0   Administrator   first commit
25
26
      $('#basket').basket();

  ", View::POS_READY, 'basket');

ccc7a9d3   Karnovsky A   Karnovsky 12052016
27
28
      $this->registerJsFile (Yii::$app->request->baseUrl . '/js/call.js', ['position' => View::POS_HEAD, 'depends' => ['yii\web\JqueryAsset']]);

      $this->registerJs ("

3f2bc3d0   Administrator   first commit
29
30
      $('#call').call({token:'" . Yii::$app->request->getCsrfToken () . "'});

  ", View::POS_READY, 'call');

ccc7a9d3   Karnovsky A   Karnovsky 12052016
31
      $this->registerJs ("

3f2bc3d0   Administrator   first commit
32
33
34
35
36
37
38
39
40
41
42
43
44
      var activeTab = $('.social li:first a').attr('id');

      $('.'+activeTab+'_box').show();

      $('.social li').click(function(){

      $('.hide').hide();

      var activeTab = $(this).find('a').attr('id');

      //alert(activeTab);

      $('.'+activeTab+'_box').show();

      return false;

  });

  ", View::POS_READY, 'social');

  

  // AssetBundle jcarousel :D

  

ccc7a9d3   Karnovsky A   Karnovsky 12052016
45
46
47
48
49
      // jquery-migrate

      $this->registerJsFile('http://code.jquery.com/jquery-migrate-1.3.0.js',[

          'position' => View::POS_HEAD,

          'depends' => ['yii\web\JqueryAsset']

      ]);

3f2bc3d0   Administrator   first commit
50
  

ccc7a9d3   Karnovsky A   Karnovsky 12052016
51
52
53
54
55
56
      // jcarousel

      $this->registerCssFile(Yii::$app->request->BaseUrl.'/js/jsor-jcarousel-7bb2e0a/skins/tango/skin.css');

      $this->registerJsFile(Yii::$app->request->baseUrl.'/js/jsor-jcarousel-7bb2e0a/lib/jquery.jcarousel.min.js',[

          'position' => View::POS_HEAD,

          'depends' => ['yii\web\JqueryAsset']

      ]);

3f2bc3d0   Administrator   first commit
57
  

ccc7a9d3   Karnovsky A   Karnovsky 12052016
58
      $this->registerJs("

3f2bc3d0   Administrator   first commit
59
60
          $('.jcarousel').jcarousel({

              vertical: true,

761f904f   Виталий   Веталь
61
              scroll: 1

3f2bc3d0   Administrator   first commit
62
63
64
65
66
67
68
69
70
71
72
73
          });

      ", View::POS_READY);

  

  // AssetBundle jcarousel :D [close]

  

  ?>

  <?php $this->beginPage () ?>

      <!DOCTYPE html>

      <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?= Yii::$app->language ?>">

      <head>

          <meta charset="<?= Yii::$app->charset ?>"/>

          <?= Html::csrfMetaTags () ?>

4495dea0   Administrator   проапдейтил роли
74
75
          <title><?= Seo::widget([ 'row'=>'title'])?></title>

          <?= Seo::widget([ 'row'=>'description'])?>

3f2bc3d0   Administrator   first commit
76
77
78
79
80
          <link rel="shortcut icon" href="<?= Yii::$app->request->baseUrl ?>/img/favicon.ico" type="image/x-icon"/>

          <?= HreflangWidget::widget ([]) ?>

          <?php $this->head () ?>

      </head>

      <body>

3f2bc3d0   Administrator   first commit
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
      <?php $this->beginBody () ?>

      <?= BgWidget::widget () ?>

  

  

  

      <?= $this->render ('/basket/_popup') ?>

  

  

      <nav class="top">

          <div class="wrap">

              <div class="fl">

                  <ul>

                      <li><a href="<?= Url::to (['text/index', 'translit' => 'oplata_i_dostavka']) ?>">Оплата и

                              доставка</a></li>

                      <li><a href="<?= Url::to (['text/index', 'translit' => 'contacts']) ?>">Контакты</a></li>

                      <li><a href="<?= Url::to (['text/index', 'translit' => 'help']) ?>"

                             id='help'><span>Помощь</span></a></li>

                  </ul>

                  <div class="both"></div>

              </div>

              <div class="search">

c34b3aa0   Karnovsky A   -
102
103
                  <form method="get" action="/catalog">

                      <input type="text" name="word" value='<?= ! empty($_GET['word']) ? Html::encode ($_GET['word']) : '' ?>'/><input

3f2bc3d0   Administrator   first commit
104
105
106
107
                          type="submit" value="    "/>

                  </form>

              </div>

              <div class="fr">

90a6ed1a   Administrator   basket
108
                  <?php if (Yii::$app->user->isGuest): ?>

3f2bc3d0   Administrator   first commit
109
                      <a href="<?= Url::to (['login/index']) ?>" id='login'><span>Личный кабинет</span></a>

90a6ed1a   Administrator   basket
110
                  <?php else: ?>

3f2bc3d0   Administrator   first commit
111
112
                      <a href="<?= Url::to (['iam/index']) ?>"><?= Text::getShort (Yii::$app->user->identity->username, 20) ?></a>

                      <a href="<?= Url::to (['login/logout']) ?>" class='logout'>Выход</a>

90a6ed1a   Administrator   basket
113
                  <?php endif; ?>

3f2bc3d0   Administrator   first commit
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
              </div>

              <div class="both"></div>

          </div>

      </nav>

  

  

      <div class="wrap br f">

  

          <div class="header">

              <div class="phone">

                  <div class="tel">

                      (044) 303 90 15 <!--span class="more"></span-->

                      <div class="more_block">

                          (044) 303-90-10<br/>

                          (044) 428-65-38<br/>

                          (050) 382-03-00

                      </div>

                  </div>

d50572a4   Administrator   проапдейтил роли
132
  <!--                <a href="#" id='call'>Обратный звонок</a>-->

3f2bc3d0   Administrator   first commit
133
134
135
136
137
              </div>

              <div class="basket">

                  <div id="basket" class="info">Корзина <span>0</span></div>

                  <span class="more"></span>

                  <div class="both"></div>

ccc7a9d3   Karnovsky A   Karnovsky 12052016
138
                  <div class="compare"><?php /*= CompareWidget::widget () */?></div>

3f2bc3d0   Administrator   first commit
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
                  <div class="basket_hovered">

                      <div class="basket_hovered_white"></div>

                      <div class="basket_items">

  

                          Загрузка...

  

                      </div>

  

                      <div style="float:right;"><a href="<?= Url::to (['basket/index']) ?>" class="submit4 bottom3"

                                                   style="color: #ffffff;">Оформить заказ</a></div>

  

                  </div>

              </div>

              <div class="logo"><a href="<?= Url::to (['site/index']) ?>" title="Рюкзачок"><span>Рюкзачок</span></a></div>

  

              <div class="both"></div>

          </div>

  

  

          <div class="menu">

84b2aead   Administrator   add active menu
159
              <?= $this->render('main-menu', Category::find ()->all())?>

3f2bc3d0   Administrator   first commit
160
161
              <div class="both"></div>

          </div>

3f2bc3d0   Administrator   first commit
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
  

          <?= $content ?>

  

      </div>

  

      <div class="bottom">

          <div class="wrap">

              <div class="rightbar2">

  

                  <div class="socialbox">

                      <div class="vk_box hide">

                          <script type="text/javascript" src="//vk.com/js/api/openapi.js?116"></script>

  

                          <!-- VK Widget -->

                          <div id="vk_groups"></div>

                          <script type="text/javascript">

                              VK.Widgets.Group("vk_groups", {

                                  mode: 0,

                                  width: "320",

                                  height: "213",

                                  color1: 'FFFFFF',

                                  color2: '2B587A',

                                  color3: '5B7FA6'

                              }, 99037905);

                          </script>

                      </div>

                      <div class="fb_box hide">

                          <div id="fb-root"></div>

                          <script>(function (d, s, id) {

                                  var js, fjs = d.getElementsByTagName(s)[0];

                                  if (d.getElementById(id)) return;

                                  js = d.createElement(s);

                                  js.id = id;

                                  js.src = "//connect.facebook.net/ru_RU/sdk.js#xfbml=1&version=v2.4";

                                  fjs.parentNode.insertBefore(js, fjs);

                              }(document, 'script', 'facebook-jssdk'));</script>

                          <div class="fb-page" data-href="https://www.facebook.com/pages/Rukzachokcomua/1031766016856430"

                               data-width="320" data-height="213" data-small-header="false"

                               data-adapt-container-width="true" data-hide-cover="false" data-show-facepile="true"

                               data-show-posts="true">

                              <div class="fb-xfbml-parse-ignore">

                                  <blockquote cite="https://www.facebook.com/pages/Rukzachokcomua/1031766016856430"><a

                                          href="https://www.facebook.com/pages/Rukzachokcomua/1031766016856430">Rukzachok.com.ua</a>

                                  </blockquote>

                              </div>

                          </div>

                      </div>

  

                      <div class="gp_box hide">

  

                          <script src="https://apis.google.com/js/platform.js" async defer>

                              {

                                  lang: 'ru'

                              }

                          </script>

  

                          <div class="g-page" data-href="https://plus.google.com/106638911242676218673"

                               data-rel="publisher"></div>

                      </div>

  

                      <div class="ok_box hide">

                          <div id="ok_group_widget"></div>

                          <script>

                              !function (d, id, did, st) {

                                  var js = d.createElement("script");

                                  js.src = "http://connect.ok.ru/connect.js";

                                  js.onload = js.onreadystatechange = function () {

                                      if (!this.readyState || this.readyState == "loaded" || this.readyState == "complete") {

                                          if (!this.executed) {

                                              this.executed = true;

                                              setTimeout(function () {

                                                  OK.CONNECT.insertGroupWidget(id, did, st);

                                              }, 0);

                                          }

                                      }

                                  }

                                  d.documentElement.appendChild(js);

                              }(document, "ok_group_widget", "52719911305396", "{width:320,height:213}");

                          </script>

  

  

                      </div>

                      <div class="tw_box hide">Пока нет!</div>

  

                  </div>

                  <?php

ccc7a9d3   Karnovsky A   Karnovsky 12052016
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
                      /*

                                      echo '<p class="txts">';

  

                                              $ids = ViewProduct::listView ();

                                              if (! empty($ids))

                                              {

                                                  $products = Products::find ()->where (['id' => ViewProduct::listView ()])->all ();

                                                  echo 'Вы просматривали';

                                              }

                                              else

                                              {

                                                  $products = Products::find ()->where (['new' => '1'])->orderBy ('id DESC')->innerJoinWith (['cost'])->groupBy ('id')->limit (4)->all ();

                                                  echo 'Товары со скидкой';

                                              }

                                      echo '</p>';

  

                                      echo '

                                      <div class="view_carousel">

                                          <ul class="view_products jcarousel-skin-tango2">';

  

                                          foreach ($products as $item)

7ba4acc5   Administrator   after marge
269
                                          {

ccc7a9d3   Karnovsky A   Karnovsky 12052016
270
271
272
273
274
275
276
277
278
279
280
281
282
                                              if (! empty ($item->cost))

                                              {

                                                  echo '

                                                  <li>

                                                      <div class="bg-img-foot-wr">

                                                          <a class="bg-img-foot" href="'.Url::to (['products/show', 'translit_rubric' => $item->catalog->translit, 'translit' => $item->translit, 'id' => $item->id]) .'">

                                                          <img src="'.Yii::$app->request->baseUrl . '/upload/products/ico/' . $item->imageAvator.'" border="0"/></a>

                                                      </div>

                                                      <a href="'. Url::to (['products/show', 'translit_rubric' => $item->catalog->translit, 'translit' => $item->translit, 'id' => $item->id]) .'" class="name">'.$item->name.'</a>

                                                      <p class="cost">'.$item->cost->cost.' грн.</p>

                                                      <div class="both"></div>

                                                  </li>';

                                              }

7ba4acc5   Administrator   after marge
283
                                          }

7ba4acc5   Administrator   after marge
284
  

ccc7a9d3   Karnovsky A   Karnovsky 12052016
285
286
287
288
                                           echo '

                                          </ul>

                                      </div>';

                      */

3f2bc3d0   Administrator   first commit
289
290
291
292
293
294
295
296
297
298
                  ?>

              </div>

  

              <div class="leftbar">

                  <ul>

                      <li><a href="<?= Url::to (['text/index', 'translit' => 'contacts']) ?>">Контакты</a></li>

                      <li><a href="<?= Url::to (['articles/index']) ?>">Блог</a></li>

                      <li><a href="<?= Url::to (['text/index', 'translit' => 'oplata_i_dostavka']) ?>">Оплата и

                              доставка</a></li>

                      <li><a href="<?= Url::to (['iam/index']) ?>">Личный кабинет</a></li>

84b2aead   Administrator   add active menu
299
                      <li><a href="<?= Url::to (['event/index']) ?>">Акции</a></li>

3f2bc3d0   Administrator   first commit
300
301
302
303
304
305
306
307
308
309
310
311
312
                      <li><a href="<?= Url::to (['text/index', 'translit' => 'about']) ?>">О магазине</a></li>

                  </ul>

  

  

                  <div class="phones">

                      (044) 303 90 15

                  </div>

  

              </div>

  

              <div class="content2">

                  <p class="txts">Подписаться на акции</p>

                  <?php

ccc7a9d3   Karnovsky A   Karnovsky 12052016
313
314
                      $subscribe = new Subscribe;

                      $form = ActiveForm::begin (['action' => '/subscribe']);

3f2bc3d0   Administrator   first commit
315
                  ?>

90a6ed1a   Administrator   basket
316
317
                  <?php echo $form->field ($subscribe, 'email')->textInput (['placeholder' => 'E-mail', 'enableAjaxValidation' => true])->label (false); ?>

                  <?= $form->field ($subscribe, 'sale')->dropDownList (['10' => '10%', '20' => '20%'], ['prompt' => 'Скидка', 'enableAjaxValidation' => true])->label (false); ?>

3f2bc3d0   Administrator   first commit
318
319
320
321
322
323
324
325
326
327
328
329
330
331
                  <div class="saletxt">укажите желаемый размер скидки</div>

                  <?php echo Html::submitButton (' Подписаться ', ['class' => 'submit4m']); ?>

                  <?php ActiveForm::end (); ?>

                  <div class="both"></div>

                  <br><br><br>

  

                  <ul class="social">

                      <li><a class="vk" id="vk" target="_blank">vk.com</a></li>

                      <li><a class="fb" id="fb">facebook.com</a></li>

                      <li><a class="ok" id="ok" target="_blank">odnoklassniki.ru</a></li>

                      <li><a class="gp" id="gp" href="https://plus.google.com/+ArtwebUaAgency" target="_blank">plus.google.com</a>

                      </li>

                  </ul>

                  <div class="both"></div>

ccc7a9d3   Karnovsky A   Karnovsky 12052016
332
  

3f2bc3d0   Administrator   first commit
333
334
335
336
337
338
339
340
341
342
343
              </div>

  

              <div class="both"></div>

  

          </div>

  

      </div>

  

  

      <div class="fotter">

          <div class="wrap">

90a6ed1a   Administrator   basket
344
              <div class="fl">© <?= date('Y')?> Rukzachok. Все права защищены.</div>

3f2bc3d0   Administrator   first commit
345
346
347
348
349
350
351
352
              <div class="fr"><a href="http://artweb.ua" target="_blank">Создание сайтов</a> <img

                      src="<?= Yii::$app->request->baseUrl ?>/img/artweb.png" width="58" height="17" alt="ArtWeb Studio"/>

              </div>

              <div class="both"></div>

          </div>

      </div>

  

      <?php $this->endBody () ?>

3f2bc3d0   Administrator   first commit
353
354
355
      </body>

      </html>

  <?php $this->endPage () ?>