view.php 779 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. use yii\helpers\Html;
  3. use yii\widgets\DetailView;
  4. /** @var yii\web\View $this */
  5. /** @var manager\models\Comments $model */
  6. $this->title = $model->id;
  7. $this->params['breadcrumbs'][] = ['label' => 'Comments', 'url' => ['index']];
  8. $this->params['breadcrumbs'][] = $this->title;
  9. \yii\web\YiiAsset::register($this);
  10. ?>
  11. <div class="comments-view">
  12. <?= DetailView::widget([
  13. 'model' => $model,
  14. 'attributes' => [
  15. 'id',
  16. 'news_id',
  17. 'visible',
  18. 'message:ntext',
  19. 'ip_address',
  20. 'user_agent:ntext',
  21. [
  22. 'label' => 'User Agent - компактный',
  23. 'value' => md5( $model->user_agent )
  24. ],
  25. 'created_by_user_id',
  26. 'created_at',
  27. ],
  28. ]) ?>
  29. </div>