view.php 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. use yii\helpers\Html;
  3. use yii\widgets\DetailView;
  4. /* @var $this yii\web\View */
  5. /* @var $model common\models\Module */
  6. $this->title = $model->name;
  7. $this->params['breadcrumbs'][] = ['label' => Yii::t('common', 'Modules'), 'url' => ['index']];
  8. $this->params['breadcrumbs'][] = $this->title;
  9. ?>
  10. <div class="module-view">
  11. <p>
  12. <?= Html::a(Yii::t('common', 'Update'), ['update', 'id' => $model->id], ['class' => 'btn btn-success']) ?>
  13. <?= Html::a(Yii::t('common', 'Delete'), ['delete', 'id' => $model->id], [
  14. 'class' => 'btn btn-danger',
  15. 'data' => [
  16. 'confirm' => Yii::t('common', '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. 'name',
  26. 'title',
  27. 'status',
  28. 'author',
  29. 'desc',
  30. 'created_at:datetime',
  31. 'updated_at:datetime',
  32. ],
  33. ]) ?>
  34. </div>