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.

47 lines
1.2 KiB

  1. <?php
  2. use backend\modules\shop\models\ars\Comment;
  3. use yii\helpers\Html;
  4. use yii\widgets\DetailView;
  5. /* @var $this yii\web\View */
  6. /* @var $model backend\modules\shop\models\ars\Comment */
  7. $this->title = $model->id;
  8. $this->params['breadcrumbs'][] = ['label' => 'Comments', 'url' => ['index']];
  9. $this->params['breadcrumbs'][] = $this->title;
  10. \yii\web\YiiAsset::register($this);
  11. ?>
  12. <div class="comment-view">
  13. <p>
  14. <?= Html::a('返回列表', ['index'], ['class' => 'btn btn-success']) ?>
  15. </p>
  16. <?= DetailView::widget([
  17. 'model' => $model,
  18. 'attributes' => [
  19. 'id',
  20. 'user_id',
  21. [
  22. 'attribute' => 'order_goods_id',
  23. 'value' => function ($model) {
  24. return $model->orderGoods->goods_name;
  25. },
  26. 'label' => '商品名称'
  27. ],
  28. 'star',
  29. 'content:ntext',
  30. [
  31. 'attribute' => 'status',
  32. 'value' => function ($model) {
  33. return Comment::$commentStatus[$model->status];
  34. },
  35. 'label' => '状态'
  36. ],
  37. 'updated_at:datetime',
  38. 'created_at:datetime',
  39. ],
  40. ]) ?>
  41. </div>