45 lines
1.8 KiB
Smarty
45 lines
1.8 KiB
Smarty
{extends file=$smarty.current_dir|cat:'/../extends.tpl'}
|
|
{use class="yii\helpers\Url"}
|
|
{use class="yii\grid\GridView"}
|
|
{use class="app\assets\UserAsset"}
|
|
{UserAsset::register($this)|void}
|
|
{block name='content'}
|
|
<div class="logs-index">
|
|
<div class="" style="font-size: 15px;">
|
|
<label class="action-button" onclick="common.form(this, 'user');" data-href="{Url::to(['create'])}">
|
|
<i class="fa fa-plus-square fa-1-5x"></i> Thêm
|
|
</label>
|
|
</div>
|
|
{GridView::widget([
|
|
'dataProvider' => $dataProvider,
|
|
'filterModel' => $searchModel,
|
|
'layout'=> \app\helpers\UserGrid::getLayout(),
|
|
'tableOptions' => [
|
|
'class' => 'table table-striped table-bordered',
|
|
'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' => [
|
|
'update' => \app\helpers\UserGrid::update('user'),
|
|
'delete' => \app\helpers\UserGrid::delete('Bạn có chắc chắn muốn xóa người dùng này không?')
|
|
]
|
|
]
|
|
]
|
|
])}
|
|
</div>
|
|
{/block} |