Blame view

common/modules/product/views/variant/create.php 1.5 KB
d8c1a2e0   Yarik   Big commit artbox
1
  <?php
d55d2fe0   Yarik   Multilanguage
2
      
4e55ce81   Yarik   Another one admin...
3
      use common\modules\product\models\Product;
d55d2fe0   Yarik   Multilanguage
4
5
6
7
8
9
10
11
12
13
14
15
16
      use common\modules\product\models\ProductStock;
      use common\modules\product\models\ProductVariant;
      use common\modules\product\models\ProductVariantLang;
      use yii\db\ActiveQuery;
      use yii\helpers\Html;
      use yii\web\View;
      
      /**
       * @var View                 $this
       * @var ProductVariant       $model
       * @var ProductVariantLang[] $model_langs
       * @var ActiveQuery          $groups
       * @var ProductStock[]       $stocks
4e55ce81   Yarik   Another one admin...
17
       * @var Product              $product
d55d2fe0   Yarik   Multilanguage
18
       */
4e55ce81   Yarik   Another one admin...
19
      $this->title = Yii::t('product', 'Create Variant');
d55d2fe0   Yarik   Multilanguage
20
21
      $this->params[ 'breadcrumbs' ][] = [
          'label' => Yii::t('product', 'Products'),
4e55ce81   Yarik   Another one admin...
22
23
24
25
          'url'   => [ '/product/manage/index' ],
      ];
      $this->params[ 'breadcrumbs' ][] = [
          'label' => $product->lang->name,
5c2eb7c8   Yarik   Big commit almost...
26
27
28
29
          'url'   => [
              '/product/manage/view',
              'id' => $product->product_id,
          ],
4e55ce81   Yarik   Another one admin...
30
31
32
      ];
      $this->params[ 'breadcrumbs' ][] = [
          'label' => Yii::t('product', 'Variants'),
5c2eb7c8   Yarik   Big commit almost...
33
34
35
36
          'url'   => [
              'index',
              'product_id' => $product->product_id,
          ],
d55d2fe0   Yarik   Multilanguage
37
38
      ];
      $this->params[ 'breadcrumbs' ][] = $this->title;
d8c1a2e0   Yarik   Big commit artbox
39
40
  ?>
  <div class="product-create">
d55d2fe0   Yarik   Multilanguage
41
      
d8c1a2e0   Yarik   Big commit artbox
42
      <h1><?= Html::encode($this->title) ?></h1>
d55d2fe0   Yarik   Multilanguage
43
      
d8c1a2e0   Yarik   Big commit artbox
44
      <?= $this->render('_form', [
d55d2fe0   Yarik   Multilanguage
45
46
47
48
          'model'       => $model,
          'model_langs' => $model_langs,
          'groups'      => $groups,
          'stocks'      => $stocks,
4e55ce81   Yarik   Another one admin...
49
          'product'     => $product,
d8c1a2e0   Yarik   Big commit artbox
50
51
52
      ]) ?>
  
  </div>