title = $model->name;
$this->params['breadcrumbs'][] = ['label' => Yii::t('common', 'Goods'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
= Html::a(Yii::t('common', '更新商品'), ['update', 'id' => $model->id], ['class' => 'btn btn-success']) ?>
= Html::a(Yii::t('common', '删除商品'), ['delete', 'id' => $model->id], [
'class' => 'btn btn-danger',
'data' => [
'confirm' => Yii::t('common', 'Are you sure you want to delete this item?'),
'method' => 'post',
],
]) ?>
= DetailView::widget([
'model' => $model,
'attributes' => [
'id',
'cat.title:text:分类',
'store.name:text:商家',
'name',
'desc',
'origin_price',
'price',
'actual_sales',
'virtual_sales',
'actual_views',
'virtual_views',
'stock',
[
'attribute' => 'cover',
'format' => ['image'],
'contentOptions' => ['class' => 'media-content']
],
// [
// 'attribute' => 'banner',
// 'format' => ['images'],
// 'contentOptions' => ['class' => 'media-content']
// ],
[
'attribute' => 'picture',
'format' => ['images'],
'contentOptions' => ['class' => 'media-content']
],
'created_at:datetime',
'updated_at:datetime',
[
'attribute' => 'status',
'value' => Goods::getStatusList($model->status),
],
],
]) ?>
registerJs($js);
?>