view.php 906 B

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