{echo:JS::import('dialog?skin=brief');}
{echo:JS::import('dialogtools');}
{echo:JS::import('form');}
<style type="text/css">
  span.areas {
    display: inline-block;
}
</style>
<form action="" method="post">
<div class="tools_bar clearfix">
    <a class="icon-checkbox-checked icon-checkbox-unchecked" href="javascript:;" onclick="tools_select('id[]',this)" title="全选" data="true"> 全选 </a>
    <a  class="icon-plus" href="javascript:;" onclick="zoning_edit(0)" title="添加"> 添加</a><a class="icon-remove-2" href="javascript:;" onclick="tools_submit({action:'{url:/admin/zoning_del}',msg:'删除后无法恢复，你真的删除吗？'})" title="删除"> 删除</a><a href="javascript:;" class="icon-loop-2"
onclick="tools_reload()"> 刷新</a>
</div>
  <table class="default">
    <tr>
      <th style="width:30px;">选择</th><th style="width:80px;">处理</th><th style="width: 160px;">区域名称</th><th>包含地区</th>
    </tr>
  {query:name=zoning}
    <tr><td style="width:30px"><input type="checkbox" name="id[]" value="{$item['id']}"></td>
          <td style="width:70px" class="btn_min"><div class="operat hidden"><a  class="icon-cog action" href="javascript:;"> 处理</a><div class="menu_select"><ul>
                <li><a class="icon-pencil" href="javascript:;" onclick="zoning_edit({$item['id']})"> 编辑</a></li>
               <li><a class="icon-close" href="javascript:;" onclick="confirm_action('{url:/admin/zoning_del/id/$item[id]}')"> 删除</a></li>
            </ul></div></div> </td>
          <td style="width:160px;" id="name_{$item['id']}">{$item['name']}</td><td>
          <input type="hidden" id="provinces_{$item['id']}" value="{$item['provinces']}">
          {if:$item['provinces']}
          {set:$provinces = explode(',',$item['provinces']);}
          {list:items=$provinces item=$province}
            {$parse_province[$province]}&nbsp;&nbsp;
          {/list}
          {/if}
        </td>
      </tr>
  {/query}
  </table>
</form>
<script type="text/javascript">
  function zoning_edit(id) {
    art.dialog.load('{url:/admin/zoning_edit/id/}'+id,{id:'zoning_dialog',title:'编辑区域:',padding:0,init:function(){autoValidate.init();}});

  }
</script>