You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.0 KiB

  1. <?php
  2. use yii\helpers\Html;
  3. use yii\widgets\DetailView;
  4. /* @var $this yii\web\View */
  5. /* @var $model antgoods\models\ars\Category */
  6. $this->title = $model->name;
  7. $this->params['breadcrumbs'][] = ['label' => '后台商品分类', 'url' => ['index']];
  8. $this->params['breadcrumbs'][] = $this->title;
  9. \yii\web\YiiAsset::register($this);
  10. ?>
  11. <div class="category-view">
  12. <p>
  13. <?= Html::a('返回列表', ['index'], ['class' => 'btn btn-success']) ?>
  14. </p>
  15. <?= DetailView::widget([
  16. 'model' => $model,
  17. 'attributes' => [
  18. 'id',
  19. 'name',
  20. 'pid',
  21. 'goods_count',
  22. 'sort_order',
  23. 'icon_type',
  24. 'icon',
  25. [
  26. 'attribute' => 'is_show',
  27. 'value' => function ($model) {
  28. return $model->is_show == \antgoods\models\ars\Category::IS_SHOW_DISPLAY ? '显示':'隐藏';
  29. }
  30. ],
  31. 'created_at:datetime',
  32. 'updated_at:datetime',
  33. ],
  34. ]) ?>
  35. </div>