view.php 990 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. use yii\helpers\Html;
  3. use yii\widgets\DetailView;
  4. /* @var $this yii\web\View */
  5. /* @var $model common\models\Comment */
  6. $this->title = $model->id;
  7. $this->params['breadcrumbs'][] = ['label' => '评论', 'url' => ['index']];
  8. $this->params['breadcrumbs'][] = $this->title;
  9. ?>
  10. <div class="comment-view">
  11. <p>
  12. <?= Html::a(Yii::t('common', 'Delete'), ['delete', 'id' => $model->id], [
  13. 'class' => 'btn btn-danger',
  14. 'data' => [
  15. 'confirm' => Yii::t('common', 'Are you sure you want to delete this item?'),
  16. 'method' => 'post',
  17. ],
  18. ]) ?>
  19. </p>
  20. <?= DetailView::widget([
  21. 'model' => $model,
  22. 'attributes' => [
  23. 'id',
  24. 'user_id',
  25. 'type',
  26. 'type_id',
  27. 'content:ntext',
  28. 'created_at:datetime',
  29. 'updated_at:datetime',
  30. 'parent_id',
  31. 'up',
  32. 'down',
  33. ],
  34. ]) ?>
  35. </div>