Server_AccessControl/views/assign/staff.tpl
2020-10-27 17:34:09 +07:00

58 lines
2.1 KiB
Smarty

{use class="yii\grid\GridView"}
{use class="yii\widgets\Pjax" type="block"}
<style>
.pagination{
margin: 0;
}
</style>
{Pjax id="staff-list" enablePushState=false timeout=false enableReplaceState=false}
{GridView::widget([
'dataProvider' => $dataProvider,
'filterModel' => null,
'layout'=> \app\helpers\StaffGrid::getLayout(),
'tableOptions' => [
'class' => 'table table-striped table-bordered table-hover',
'style' => 'background:#fff;min-width:700px;'
],
'columns' => [
[
'class' => 'yii\grid\SerialColumn',
'contentOptions' => ['class' => 'text-center'],
'headerOptions' => ['class' => 'text-center', 'style' => 'width:3%']
],
[
'header' => "<input type='checkbox' value='0' class='checkbox-staff-schedule' id='checkall-staff-schedule'>",
'format' => 'raw',
'contentOptions' => ['class' => 'text-center'],
'headerOptions' => ['class' => 'text-center', 'style' => 'width:3%'],
'value' => \app\helpers\CommonGrid::checkbox("staff-schedule", false)
],
'code',
'name',
'card_number',
[
'attribute' => 'department_id',
'value' => \app\helpers\StaffGrid::department($departmentArray)
],
[
'attribute' => 'schedule',
'contentOptions' => \app\helpers\StaffGrid::scheduleHeader(),
'value' => \app\helpers\StaffGrid::schedule($scheduleArray)
],
[
'attribute' => 'doors',
'format' => 'raw',
'headerOptions' => ['style' => 'width:15%'],
'contentOptions' => \app\helpers\StaffGrid::doorsHeader(),
'value' => \app\helpers\StaffGrid::doors($doorsArray)
]
],
'pager' => [
'firstPageLabel' => "<i class='fa fa-backward'></i>",
'lastPageLabel' => "<i class='fa fa-forward'></i>",
'nextPageLabel' => "<i class='fa fa-chevron-right'></i>",
'prevPageLabel' => "<i class='fa fa-chevron-left'></i>",
'maxButtonCount' => 5
]
])}
{/Pjax}