<?php $this->display(tpl('head',true)); ?>
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
	<legend>
		<?php echo $data[name] ?>属性管理</legend>
</fieldset>
<div class="layui-row">
	<a href="<?php echo  admin_module_url  ?>/module/field_add/mid_<?php echo $_GET['mid'] ;?>" class="layui-btn"> 添加属性</a>
</div>
<form class="layui-form" method="post" action="<?php echo  admin_module_url  ?>/module/field_reorder/">
	<table class="layui-table my-tabel">
		<thead>
			<tr>
				<th>属性名称</th>
				<th>属性字段KEY</th>
				<th width="100">属性排序</th>
				<th width="105">操作</th>
			</tr>
		</thead>
		<tbody>
			<?php foreach($data AS $row){ ?>
			<tr>
				<td>【<?php echo $row['name'] ?>】</td>
				<td><?php echo $row['field'] ?></td>
				<td>
					<input type="text" name="reorder[<?php echo $row['id'] ?>]" value="<?php echo $row[reorder] ?>" class="layui-input" />
				</td>
				<td>
					<a class="layui-btn layui-btn-sm layui-btn-normal" href="<?php echo  admin_module_url ?>module/edit_field/id_<?php echo $row['id'] ?>">编辑</a>
					<a class="layui-btn layui-btn-sm layui-btn-danger" href="<?php echo  admin_module_url ?>module/del_field/id_<?php echo $row['id'] ?>" onclick="return confirm('删除后无法恢复，是否继续删除');"> 删除</a>
				</td>
			</tr>
			<?php } ?>
		</tbody>
	</table>
	<div class="button">
		<input type="hidden" name="mid" id="" value="<?php echo $_GET['mid'] ;?>" />
		<button class="layui-btn layui-btn-sm layui-btn-danger" >批量排序</button>
	</div>
</form>
<?php $this->display(tpl('foot',true)); ?>
