82 lines
3.7 KiB
Smarty
82 lines
3.7 KiB
Smarty
{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'}
|
|
<div class="device-index">
|
|
<div class="" style="font-size: 15px;">
|
|
<label class="action-button" onclick="common.form(this, 'device');" data-href="{Url::to(['create'])}">
|
|
<i class="fa fa-plus-square fa-1-5x"></i> Thêm
|
|
</label>
|
|
<label class="action-button" onclick="_form(this);" data-href="{Url::to(['update'])}">
|
|
<i class="fa fa-edit fa-1-5x"></i> Tùy chỉnh
|
|
</label>
|
|
<label class="action-button" onclick="_delete(this);" data-href="{Url::to(['delete'])}">
|
|
<i class="fa fa-trash fa-1-5x"></i> Xóa
|
|
</label>
|
|
<label class="action-button" onclick="_form(this);" data-href="{Url::to(['change-ip'])}">
|
|
<i class="fa fa-pencil fa-1-5x"></i> Thay đổi địa chỉ IP
|
|
</label>
|
|
<label class="action-button" onclick="_export(this);" data-href="{Url::to(['export'])}">
|
|
<i class="fa fa-download fa-1-5x"></i> Xuất
|
|
</label>
|
|
<label class="action-button" onclick="_logs(this);" data-href="{Url::to(['logs'])}">
|
|
<i class="fa fa-file fa-1-5x"></i> Ghi nhận hệ thống
|
|
</label>
|
|
</div>
|
|
<div class="hidden">
|
|
<input type="file" name="file" id="file">
|
|
<input type="hidden" value="{Url::to(['upload'])}" name="upload_file_url">
|
|
</div>
|
|
{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' => "<input type='checkbox' value='0' class='checkbox-device' id='checkall-device'>",
|
|
'format' => 'raw',
|
|
'contentOptions' => ['class' => 'text-center'],
|
|
'headerOptions' => ['class' => 'text-center', 'style' => 'width:3%'],
|
|
'value' => \app\helpers\CommonGrid::checkbox("device", false)
|
|
],
|
|
'name',
|
|
'serial',
|
|
'ip_address',
|
|
'subnet_mask',
|
|
'gateway',
|
|
'mac_address',
|
|
[
|
|
'attribute' => 'status',
|
|
'format' => 'raw',
|
|
'filter' => $statusArray,
|
|
'contentOptions' => ['class' => 'text-center'],
|
|
'value' => \app\helpers\DeviceGrid::status($statusArray)
|
|
],
|
|
'type',
|
|
[
|
|
'attribute' => 'area_id',
|
|
'format' => 'raw',
|
|
'filter' => $areaArray,
|
|
'contentOptions' => ['class' => 'text-center'],
|
|
'value' => \app\helpers\DeviceGrid::area($areaArray)
|
|
],
|
|
'version'
|
|
]
|
|
])}
|
|
{/Pjax}
|
|
</div>
|
|
{/block} |