예제 #1
0
<?php

use yii\helpers\Html;
use yz\admin\widgets\ActionButtons;
use yz\admin\widgets\Box;
/**
 * @var yii\web\View $this
 * @var yz\admin\models\Role $model
 */
$this->title = \Yii::t('admin/t', 'Update object "{item}": {title}', ['item' => yz\admin\models\Role::modelTitle(), 'title' => $model->description]);
$this->params['breadcrumbs'][] = ['label' => yz\admin\models\Role::modelTitlePlural(), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
$this->params['header'] = $this->title;
?>
<div class="role-update">

    <div class="text-right">
        <?php 
Box::begin();
?>
        <?php 
echo ActionButtons::widget(['order' => [['index', 'create', 'return']], 'addReturnUrl' => false]);
?>
        <?php 
Box::end();
?>
    </div>

    <?php 
echo $this->render('_form', ['model' => $model]);
?>
예제 #2
0
<?php

use yii\helpers\Html;
use yii\helpers\Url;
use yz\admin\widgets\Box;
use yz\admin\grid\GridView;
use yz\admin\widgets\ActionButtons;
/**
 * @var yii\web\View $this
 * @var yii\data\ActiveDataProvider $dataProvider
 * @var yz\admin\models\search\RoleSearch $searchModel
 */
$this->title = yz\admin\models\Role::modelTitlePlural();
$this->params['breadcrumbs'][] = $this->title;
$this->params['header'] = $this->title;
$box = Box::begin(['cssClass' => 'box-primary']);
?>
<div class="text-right">
    <?php 
echo ActionButtons::widget(['order' => [['discover'], ['create', 'delete', 'return']], 'buttons' => ['discover' => \yii\bootstrap\ButtonDropdown::widget(['tagName' => 'a', 'label' => Yii::t('admin/t', 'Permissions'), 'encodeLabel' => false, 'options' => ['class' => 'btn btn-default'], 'dropdown' => ['items' => [['label' => Yii::t('admin/t', 'Discover...'), 'url' => Url::to(['discover-auth-items'])], ['label' => Yii::t('admin/t', 'Delete all...'), 'url' => Url::to(['delete-permissions']), 'linkOptions' => ['data-confirm' => Yii::t('admin/t', 'Do you really want to delete all permissions?')]]]]])], 'gridId' => 'role-grid', 'searchModel' => $searchModel, 'modelClass' => 'yz\\admin\\models\\Role']);
?>
</div>

<?php 
echo GridView::widget(['id' => 'role-grid', 'dataProvider' => $dataProvider, 'columns' => [['class' => 'yii\\grid\\CheckboxColumn'], 'description:ntext', 'name', ['class' => 'yz\\admin\\widgets\\ActionColumn', 'template' => '{update} {delete}']]]);
Box::end();