title = Yii::t('product', 'Variants for ') . $product->lang->title; $this->params[ 'breadcrumbs' ][] = [ 'label' => Yii::t('product', 'Products'), 'url' => [ 'manage/index' ], ]; $this->params[ 'breadcrumbs' ][] = [ 'label' => $product->lang->title, 'url' => [ 'manage/view', 'id' => $product->id, ], ]; $this->params[ 'breadcrumbs' ][] = \Yii::t('product', 'Variants'); ?>
= Html::a( Yii::t('product', 'Create Variant'), Url::toRoute( [ 'create', 'product_id' => $product->id, ] ), [ 'class' => 'btn btn-success' ] ) ?>
= GridView::widget( [ 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [ [ 'attribute' => 'variantName', 'value' => 'lang.title', ], 'sku', 'price', 'price_old', 'stock', 'image.imageUrl:image', [ 'class' => 'yii\grid\ActionColumn', 'buttons' => [ 'view' => function ($url, $model) { return Html::a( '', Url::to( [ 'view', 'product_id' => $model->product_id, 'id' => $model->id, ] ), [ 'title' => \Yii::t('app', "Просмотр"), ] ); }, 'update' => function ($url, $model) { return Html::a( '', Url::to( [ 'update', 'product_id' => $model->product_id, 'id' => $model->id, ] ), [ 'title' => \Yii::t('app', "Редактировать"), ] ); }, 'delete' => function ($url, $model) { return Html::a( '', Url::to( [ 'delete', 'product_id' => $model->product_id, 'id' => $model->id, ] ), [ 'title' => Yii::t('yii', 'Delete'), 'data-confirm' => Yii::t('yii', 'Are you sure to delete this item?'), 'data-method' => 'post', ] ); }, ], ], ], ] ); ?>