Blame view

frontend/views/products/index.php 3.42 KB
ecf49b1b   Administrator   second
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
  <?php

  use yii\helpers\Url;

      use yii\helpers\Html;

      use yii\widgets\Breadcrumbs;

      use app\models\Catalog;

      use yii\bootstrap\ActiveForm;

      use yii\helpers\ArrayHelper;

      use yii\web\View;

      use yii\widgets\LinkPager;

      use app\models\Filters;

      use app\models\Type;

      use app\models\Brends;

      use app\components\FiltersWidget;

      use app\components\BrendsWidget;

  

  ?>

  <?php

  $this->params['catalog_id'] = $catalog->id;

      $this->title = $catalog->meta_title;

      $this->registerMetaTag (['name' => 'description', 'content' => $catalog->meta_description]);

      $this->registerMetaTag (['name' => 'keywords', 'content' => $catalog->meta_keywords]);

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

3a8a9bd9   Administrator   image size
23
24
      $this->registerJsFile (Yii::$app->request->baseUrl . '/js/jquery.ui-slider.js', ['position' => View::POS_END, 'depends' => ['yii\web\JqueryAsset']]);

      $this->registerJsFile (Yii::$app->request->baseUrl . '/js/begunok.js', ['position' => View::POS_END, 'depends' => ['yii\web\JqueryAsset']]);

ecf49b1b   Administrator   second
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
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
      $this->params['breadcrumbs'][] = ['label' => 'Каталог', 'url' => ['/catalog/all']];

      if (! empty($catalog->parent)) $this->params['breadcrumbs'][] = ['label' => $catalog->parent->name, 'url' => ['products/index', 'translit' => $catalog->parent->translit]];

      $this->params['breadcrumbs'][] = ['label' => $catalog->name]; 

  ?>

  <nav class="bread-crumbs">

      <?= Breadcrumbs::widget ([

          'links' => $this->params['breadcrumbs'],

      ])

      ?>

  

  

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

  </nav>

  

  

  <div class="loyout">

      <div class="leftbar">

          <img src="<?= Yii::$app->request->baseUrl ?>/img/new_coll.png" width="112" height="22"/><br/>

          <img src="<?= Yii::$app->request->baseUrl ?>/img/pro.png" width="42" height="22"/>

  

          <?= BrendsWidget::widget (['translit' => $catalog->translit, 'catalog_id' => $catalog->id]) ?>

  

          <?= FiltersWidget::widget (['translit' => $catalog->translit, 'catalog_id' => $catalog->id]) ?>

  

          <div class="cost_box filters">

              <div class="begin">Цена</div>

              <?php $form = ActiveForm::begin (['enableClientScript' => false]); ?>

              <input type="hidden" value="500" id="max"/>

              <div class="sliderCont">

                  <div id="begunok"></div>

              </div>

              <div class="formCost">

                  <?php echo $form->field ($modelProducts, 'minCost'); ?>

                  <?php echo $form->field ($modelProducts, 'maxCost'); ?>

              </div>

              <?php echo Html::submitButton (' Искать ', ['class' => 'submit4', 'style' => 'margin-left:50px;']); ?>

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

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

          </div>

  

      </div>

      <div class="content">

  

  

          <h1><?= $catalog->name ?></h1>

          <div class="products pn">

  

              <ul>

  

                  <?php foreach ($products as $item): ?>

                      <li class="item">

                          <?= $this->render ('_product', ['item' => $item, 'num' => 3]) ?>

                      </li>

                  <?php endforeach; ?>

  

              </ul>

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

          </div>

  

          <?= LinkPager::widget ([

              'pagination'       => $pages,

              'registerLinkTags' => true,

          ]); ?>

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

  

      </div>

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

  

  

  </div>