view.php 981 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. use yii\helpers\Html;
  3. use yii\widgets\DetailView;
  4. /* @var $this yii\web\View */
  5. /* @var $model rbac\models\Menu */
  6. $this->title = $model->name;
  7. $this->params['breadcrumbs'][] = ['label' => Yii::t('rbac', 'Menus'), 'url' => ['index']];
  8. $this->params['breadcrumbs'][] = $this->title;
  9. ?>
  10. <div class="menu-view">
  11. <p>
  12. <?= Html::a(Yii::t('rbac', 'Update'), ['update', 'id' => $model->id], ['class' => 'btn btn-primary btn-flat']) ?>
  13. <?= Html::a(Yii::t('rbac', '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. 'menuParent.name:text:Parent',
  25. 'name',
  26. 'route',
  27. 'icon',
  28. 'order',
  29. ],
  30. ]) ?>
  31. </div>