Blame view

common/modules/product/views/variant/create.php 1.53 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
      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
8af13427   Yarik   For leha commit.
14
       * @var ProductVariantLang[] $modelLangs
d55d2fe0   Yarik   Multilanguage
15
16
       * @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
          'url'   => [ '/product/manage/index' ],
      ];
      $this->params[ 'breadcrumbs' ][] = [
8af13427   Yarik   For leha commit.
25
          'label' => $product->lang->title,
5c2eb7c8   Yarik   Big commit almost...
26
27
          'url'   => [
              '/product/manage/view',
8af13427   Yarik   For leha commit.
28
              'id' => $product->id,
5c2eb7c8   Yarik   Big commit almost...
29
          ],
4e55ce81   Yarik   Another one admin...
30
31
32
      ];
      $this->params[ 'breadcrumbs' ][] = [
          'label' => Yii::t('product', 'Variants'),
5c2eb7c8   Yarik   Big commit almost...
33
34
          'url'   => [
              'index',
8af13427   Yarik   For leha commit.
35
              'product_id' => $product->id,
5c2eb7c8   Yarik   Big commit almost...
36
          ],
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
      
8af13427   Yarik   For leha commit.
44
45
46
47
48
49
50
51
52
53
      <?= $this->render(
          '_form',
          [
              'model'      => $model,
              'modelLangs' => $modelLangs,
              'groups'     => $groups,
              'stocks'     => $stocks,
              'product'    => $product,
          ]
      ) ?>
d8c1a2e0   Yarik   Big commit artbox
54
55
  
  </div>