update sửa tên cửa
This commit is contained in:
31
views/device/doors.tpl
Normal file
31
views/device/doors.tpl
Normal file
@@ -0,0 +1,31 @@
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr class="info">
|
||||
<th style="width: 13%;">Mã cửa</th>
|
||||
<th>Tên cửa</th>
|
||||
<th style="width: 10%;">Sửa</th>
|
||||
<th style="width: 15%;">Mở cửa</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach from=$doors item=d}
|
||||
<tr>
|
||||
<td class="text-center">{$d->code}</td>
|
||||
<td>
|
||||
<span id="name-text-{$d->id}">{$d->name}</span>
|
||||
<input type="text" value="{$d->name}" class="hidden" id="name-input-{$d->id}" onblur="editDoorName(this);" data-href="{yii\helpers\Url::to(["edit-door-name","id"=>$d->id])}">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<button class="btn btn-success" data-stt="false" data="{$d->id}" onclick="openFormEditDoorName(this);" id="btn-edit-{$d->id}">
|
||||
<i class="fa fa-edit"></i>
|
||||
</button>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<button class="btn btn-primary" onclick="openDoor(this);" data-href="{yii\helpers\Url::to(['open-door', 'id' => $model->id, 'door' => $d->code])}">
|
||||
Mở
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -100,8 +100,10 @@
|
||||
],
|
||||
'version',
|
||||
[
|
||||
'attribute' => 'door',
|
||||
'format' => 'raw',
|
||||
'headerOptions' => ['style' => 'width:10%'],
|
||||
'headerOptions' => ['style' => 'width:10%'],
|
||||
'contentOptions' => ['class' => 'text-center'],
|
||||
'value' => \app\helpers\DeviceGrid::openDoor()
|
||||
]
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user