{extends file=$smarty.current_dir|cat:'/../extends.tpl'} {use class="yii\helpers\Url"} {use class="yii\grid\GridView"} {use class="yii\widgets\Pjax" type="block"} {use class="app\assets\DeviceAsset"} {DeviceAsset::register($this)|void} {block name='content'}
{if Yii::$app->user->can("deviceCreate")} {/if} {if Yii::$app->user->can("deviceUpdate")} {/if} {if Yii::$app->user->can("deviceDelete")} {/if} {if Yii::$app->user->can("deviceSyncDeviceToServer")} {/if} {if Yii::$app->user->can("deviceChangeIP")} {/if} {if Yii::$app->user->can("deviceSyncServerToDevice")} {/if} {if Yii::$app->user->can("deviceExport")} {/if}
{Pjax id="device-list"} {GridView::widget([ 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'layout'=> \app\helpers\CommonGrid::getLayout(), 'tableOptions' => [ 'class' => 'table table-striped table-bordered table-hover', 'style' => 'background:#fff;min-width:700px;' ], 'rowOptions' => \app\helpers\CommonGrid::rows("device"), 'columns' => [ [ 'class' => 'yii\grid\SerialColumn', 'contentOptions' => ['class' => 'text-center'], 'headerOptions' => ['class' => 'text-center', 'style' => 'width:3%'] ], [ 'header' => "", 'format' => 'raw', 'contentOptions' => ['class' => 'text-center'], 'headerOptions' => ['class' => 'text-center', 'style' => 'width:3%'], 'value' => \app\helpers\DeviceGrid::checkbox("device", false) ], 'name', [ 'attribute' => 'serial', 'headerOptions' => ['style' => 'width:10%'] ], [ 'attribute' => 'ip_address', 'headerOptions' => ['style' => 'width:10%'] ], 'subnet_mask', 'gateway', 'mac_address', [ 'attribute' => 'status', 'format' => 'raw', 'filter' => $statusArray, 'contentOptions' => ['class' => 'text-center'], 'value' => \app\helpers\DeviceGrid::status($statusArray) ], [ 'attribute' => 'type', 'contentOptions' => ['class' => 'text-center'], 'headerOptions' => ['style' => 'width:5%'] ], [ 'attribute' => 'area_id', 'format' => 'raw', 'filter' => $areaArray, 'contentOptions' => ['class' => 'text-center'], 'value' => \app\helpers\DeviceGrid::area($areaArray) ], 'version', [ 'attribute' => 'door', 'format' => 'raw', 'headerOptions' => ['style' => 'width:10%'], 'contentOptions' => \app\helpers\DeviceGrid::openDoorHeader(), 'value' => \app\helpers\DeviceGrid::openDoor() ] ], 'pager' => [ 'firstPageLabel' => "", 'lastPageLabel' => "", 'nextPageLabel' => "", 'prevPageLabel' => "", 'maxButtonCount' => 5 ] ])} {/Pjax}
{/block}