Blame view

frontend/views/layouts/main.php 16.6 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');

065e6a52   Administrator   image size
23
      $this->registerJsFile (Yii::$app->request->baseUrl . '/js/basket.js', ['position' => View::POS_END, 'depends' => ['yii\web\JqueryAsset']]);

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

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

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

065e6a52   Administrator   image size
27
      $this->registerJsFile (Yii::$app->request->baseUrl . '/js/call.js', ['position' => View::POS_END, 'depends' => ['yii\web\JqueryAsset']]);

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

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

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

0cdfad3f   Виталий   Веталь
31
  

065e6a52   Administrator   image size
32
  $this->registerJsFile (Yii::$app->request->baseUrl . '/js/fix_height.js', ['position' => View::POS_END, 'depends' => ['yii\web\JqueryAsset']]);

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

3f2bc3d0   Administrator   first commit
34
35
36
37
38
39
40
41
42
43
44
45
46
      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
47
48
      // jquery-migrate

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

3a8a9bd9   Administrator   image size
49
          'position' => View::POS_END,

ccc7a9d3   Karnovsky A   Karnovsky 12052016
50
51
          'depends' => ['yii\web\JqueryAsset']

      ]);

3f2bc3d0   Administrator   first commit
52
  

ccc7a9d3   Karnovsky A   Karnovsky 12052016
53
54
55
      // 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',[

3a8a9bd9   Administrator   image size
56
          'position' => View::POS_END,

ccc7a9d3   Karnovsky A   Karnovsky 12052016
57
58
          'depends' => ['yii\web\JqueryAsset']

      ]);

3f2bc3d0   Administrator   first commit
59
  

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

3f2bc3d0   Administrator   first commit
61
62
          $('.jcarousel').jcarousel({

              vertical: true,

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

3f2bc3d0   Administrator   first commit
64
65
66
          });

      ", View::POS_READY);

  

fed9ec18   Administrator   image size
67
68
69
70
71
72
73
74
75
76
  $this->registerJs("

  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){

      (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),

  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)

  })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

  

  ga('create', 'UA-75674711-1', 'auto');

  ga('send', 'pageview');

      ", View::POS_BEGIN);

  

3f2bc3d0   Administrator   first commit
77
78
79
80
81
82
83
84
85
  // 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   проапдейтил роли
86
87
          <title><?= Seo::widget([ 'row'=>'title'])?></title>

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

3f2bc3d0   Administrator   first commit
88
89
90
91
92
          <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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
      <?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   -
114
115
                  <form method="get" action="/catalog">

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

3f2bc3d0   Administrator   first commit
116
117
118
119
                          type="submit" value="    "/>

                  </form>

              </div>

              <div class="fr">

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

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

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

3f2bc3d0   Administrator   first commit
123
124
                      <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
125
                  <?php endif; ?>

3f2bc3d0   Administrator   first commit
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
              </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   проапдейтил роли
144
  <!--                <a href="#" id='call'>Обратный звонок</a>-->

3f2bc3d0   Administrator   first commit
145
146
147
148
149
              </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
150
                  <div class="compare"><?php /*= CompareWidget::widget () */?></div>

3f2bc3d0   Administrator   first commit
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
                  <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
171
              <?= $this->render('main-menu', Category::find ()->all())?>

3f2bc3d0   Administrator   first commit
172
173
              <div class="both"></div>

          </div>

3f2bc3d0   Administrator   first commit
174
  

4aa696e9   Виталий   Веталь
175
176
177
          <div class="wrapper_all">

              <?= $content ?>

          </div>

3f2bc3d0   Administrator   first commit
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
248
249
250
251
252
253
254
255
256
257
258
259
260
261
  

      </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
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
                      /*

                                      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
283
                                          {

ccc7a9d3   Karnovsky A   Karnovsky 12052016
284
285
286
287
288
289
290
291
292
293
294
295
296
                                              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
297
                                          }

7ba4acc5   Administrator   after marge
298
  

ccc7a9d3   Karnovsky A   Karnovsky 12052016
299
300
301
302
                                           echo '

                                          </ul>

                                      </div>';

                      */

3f2bc3d0   Administrator   first commit
303
304
305
306
307
308
309
310
311
312
                  ?>

              </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
313
                      <li><a href="<?= Url::to (['event/index']) ?>">Акции</a></li>

3f2bc3d0   Administrator   first commit
314
315
316
317
318
319
320
321
322
323
324
325
326
                      <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
327
328
                      $subscribe = new Subscribe;

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

3f2bc3d0   Administrator   first commit
329
                  ?>

90a6ed1a   Administrator   basket
330
331
                  <?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
332
333
334
335
336
337
338
339
340
341
342
343
344
345
                  <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
346
  

3f2bc3d0   Administrator   first commit
347
348
349
350
351
352
353
354
355
356
357
              </div>

  

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

  

          </div>

  

      </div>

  

  

      <div class="fotter">

          <div class="wrap">

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

3f2bc3d0   Administrator   first commit
359
360
361
362
363
364
365
366
              <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
367
368
369
      </body>

      </html>

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