Example #1
0
<?php

use backend\helpers\views\Html;
?>

<div class="btns">
<?php 
echo Html::btn('新增', 'rbac/role-edit', '新增角色');
?>
</div>

<?php 
echo \backend\helpers\views\GridView::widget(['dataProvider' => $dataProvider, 'columns' => ['name:text:角色', 'description:text:描述', 'created_at:datetime:创建时间', 'updated_at:datetime:修改时间', ['label' => '操作', 'format' => 'raw', 'value' => function ($data) {
    $id = $data->name;
    $name = $id;
    return Html::common_btn('rbac/role', $id, $name);
}]]]);
Example #2
0
<?php

use backend\helpers\views\Html;
?>

<div class="btns">
<?php 
echo Html::btn('新增', 'rbac/user-edit', '新增管理员');
?>
</div>

<?php 
echo \backend\helpers\views\GridView::widget(['dataProvider' => $dataProvider, 'columns' => ['id:integer:ID', 'username:text:用户名', ['label' => '角色', 'format' => 'raw', 'value' => function ($data) {
    return $data->getRoleName();
}], 'created_at:datetime:创建时间', 'updated_at:datetime:修改时间', ['label' => '操作', 'format' => 'raw', 'value' => function ($data) {
    $id = $data->id;
    $name = $data->username;
    return Html::common_btn('rbac/user', $id, $name);
}]]]);
Example #3
0
<?php

use backend\helpers\views\Html;
?>

    <div class="btns">
        <?php 
echo Html::btn('新增', 'member/member-edit', '新增管理员');
?>
    </div>

<?php 
echo \backend\helpers\views\GridView::widget(['dataProvider' => $dataProvider, 'columns' => ['id:integer:ID', 'username:text:账号', 'nickname:text:昵称', 'created_at:datetime:创建时间', 'updated_at:datetime:修改时间', ['label' => '操作', 'format' => 'raw', 'value' => function ($data) {
    $id = $data->id;
    $name = $data->username;
    return Html::common_btn('member/member', $id, $name);
}]]]);