Server_AccessControl/views/device/doors.tpl
2020-10-30 10:47:16 +07:00

31 lines
1.3 KiB
Smarty

<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>