BiFace_Server_Lite/views/user/index.tpl
2020-03-27 10:13:51 +07:00

55 lines
1.8 KiB
Smarty

{use class="yii\helpers\Url"}
{use class="yii\grid\GridView"}
{use class="yii\widgets\Pjax" type="block"}
<style>
.table-user thead tr:first-child{
background: #eaeaea;
}
.table-user thead tr .form-control{
height: 25px;
font-size: 12px;
}
</style>
<div class="text-left">
<button class="btn btn-primary btn-xs" onclick="user.form(this);" data-href="{Url::to(['/user/create'])}">
<i class="fa fa-plus"></i> Thêm mới
</button>
</div>
<br>
<div style="font-size: 12px;">
{Pjax id="user-list-modal" enablePushState=false timeout=false enableReplaceState=false}
{GridView::widget([
'id' => 'user-list-gridview',
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'layout'=> \app\helpers\UserGrid::getLayout(),
'tableOptions' => [
'class' => 'table table-striped table-bordered table-user',
'style' => 'background:#fff;min-width:700px;'
],
'columns' => [
['class' => 'yii\grid\SerialColumn'],
'username',
'first_name',
[
'attribute'=>"roleName",
'format'=>'raw',
'value'=> \app\helpers\UserGrid::roles()
],
'phone_number',
'email',
[
'template'=> \app\helpers\UserGrid::actionTemplate(),
'class' => 'yii\grid\ActionColumn',
'contentOptions' => ['class' => 'text-center'],
'headerOptions' => ['style' => 'width:10%'],
'buttons'=>[
"view" => \app\helpers\UserGrid::view(),
"update" => \app\helpers\UserGrid::update(),
"delete" => \app\helpers\UserGrid::delete()
]
]
]
])}
{/Pjax}
</div>