view.php 884 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. use yii\helpers\Html;
  3. use yii\widgets\DetailView;
  4. /* @var $this yii\web\View */
  5. /* @var $model app\models\Posts */
  6. $this->title = $model->id;
  7. $this->params['breadcrumbs'][] = ['label' => 'Posts', 'url' => ['index']];
  8. $this->params['breadcrumbs'][] = $this->title;
  9. ?>
  10. <div class="posts-view">
  11. <p>
  12. <?= Html::a('Update', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
  13. <?= Html::a('Delete', ['delete', 'id' => $model->id], [
  14. 'class' => 'btn btn-danger',
  15. 'data' => [
  16. 'confirm' => 'Are you sure you want to delete this item?',
  17. 'method' => 'post',
  18. ],
  19. ]) ?>
  20. </p>
  21. <?= DetailView::widget([
  22. 'model' => $model,
  23. 'attributes' => [
  24. 'id',
  25. 'page',
  26. 'text:ntext',
  27. 'status',
  28. ],
  29. ]) ?>
  30. </div>