view.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?php
  2. use yii\helpers\Html;
  3. use yii\widgets\DetailView;
  4. /** @var yii\web\View $this */
  5. /** @var app\models\Page $model */
  6. $this->title = $model->title;
  7. $this->params['breadcrumbs'][] = ['label' => 'Pages', 'url' => ['index']];
  8. $this->params['breadcrumbs'][] = $this->title;
  9. \yii\web\YiiAsset::register($this);
  10. ?>
  11. <div class="page-view">
  12. <h1><?= Html::encode($this->title) ?></h1>
  13. <p>
  14. <?= Html::a('Update', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
  15. <?= Html::a('Delete', ['delete', 'id' => $model->id], [
  16. 'class' => 'btn btn-danger',
  17. 'data' => [
  18. 'confirm' => 'Are you sure you want to delete this item?',
  19. 'method' => 'post',
  20. ],
  21. ]) ?>
  22. </p>
  23. <?= DetailView::widget([
  24. 'model' => $model,
  25. 'attributes' => [
  26. 'id',
  27. 'status',
  28. 'menu',
  29. 'created',
  30. 'updated',
  31. 'create_user_id',
  32. 'update_user_id',
  33. 'parent_id',
  34. 'title',
  35. 'title_menu',
  36. 'title_seo',
  37. 'description_seo',
  38. 'keywords_seo',
  39. 'key',
  40. 'norder',
  41. 'path',
  42. 'content:ntext',
  43. 'index_controller',
  44. 'index_action',
  45. 'view_controller',
  46. 'view_action',
  47. 'index_params',
  48. 'lang',
  49. 'layout',
  50. ],
  51. ]) ?>
  52. </div>