save.php
2.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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
<?php
/**
* @var \yii\web\View $this
* @var Languages $languages
* @var \artbox\catalog\catalog\models\Product $product
* @var \artbox\catalog\catalog\models\ProductLang[] $productLangs
* @var \artbox\core\models\Alias[] $aliases
* @var array $brands
* @var array $options
* @var \artbox\catalog\catalog\models\Variant[] $variants
* @var array $categoriesData
* @var array $categoriesOptions
*/
use artbox\catalog\assets\ProductsAsset;
use artbox\core\services\Languages;
$this->title = $product->isNewRecord ? \Yii::t('core', 'Add product') : \Yii::t(
'app',
'Редактировать: {product}',
[
'product' => $product->language->title,
]
);
$this->params[ 'breadcrumbs' ][] = [
'url' => [ '/catalog/product' ],
'label' => \Yii::t('app', 'Товары'),
];
$this->params[ 'breadcrumbs' ][] = $this->title;
ProductsAsset::register($this);
?>
<div class="adm-create">
<div class="x_panel">
<div class="x_title"><h2><?php echo $this->title; ?></h2>
<div class="clearfix"></div>
</div>
<div class="style lang-page-block-wr">
<div class="lang-page-block">
<?php foreach ($languages->getActive() as $language) { ?>
<span class="<?= $language->default ? 'active' : '' ?>"><?= $language->url ?></span>
<?php } ?>
</div>
<div class="lang-page-block-text">
<span class="active">Языковой блок</span>
<span>Оcновной блок</span>
<span>SEO</span>
<span>Варианты</span>
<span>Галерея</span>
</div>
</div>
</div>
<div class="fix-absolute-panel"></div>
<?= $this->render(
'_form',
[
'product' => $product,
'productLangs' => $productLangs,
'aliases' => $aliases,
'languages' => $languages,
'brands' => $brands,
'categoriesOptions' => $categoriesOptions,
'categoriesData' => $categoriesData,
'options' => $options,
'variants' => $variants,
]
) ?>
</div>