{if $full_page}
{include file="page_header.htm"}
{insert_scripts files="../js/utils.js,listtable.js"}
<form method="post" action="wx_menu.php" name="listForm">

<div class="list-div" id="listDiv">
{/if}
<table cellspacing="0" cellpadding="0" class="list-table" width="100%" style="border-top:1px #d6dfe7 solid;">
 <tr class="thead">
    <th width="20%">菜单名</th>
    <th width="10%">类型</th>
    <th width="40%">值</th>
     {if $act == 'list'}
    <th width="10%">排序</th>
    <th width="10%">状态</th>
    <th width="10%" align="left">操作</th>
     {/if}
  </tr>
  {foreach from=$menu_list item=menu}
   {if $menu.parent_id eq 0}
    <tr align="center" class="0" id="0_{$menu.menu_id}">
    <td align="left" class="first-cell">{$menu.name}</td>
    <td align="left">{if $menu.type == 'view'}链接{elseif $menu.type == 'click'}点击{/if}</td>
    <td align="left">{$menu.value}</td>
     {if $act == 'list'}
    <td align="center"><span onclick="listTable.edit(this, 'edit_sort_order', {$menu.menu_id})">{$menu.sort_order}</span></td>
    <td ><img src="images/{if $menu.status eq '1'}yes{else}no{/if}.gif" onclick="listTable.toggle(this, 'toggle_status', {$menu.menu_id})" /></td>
    <td align="center" nowrap="true" class="operation">
		<a href="wx_menu.php?act=edit&amp;id={$menu.menu_id}" title="编辑" class="op_edit"></a>
		<a href="wx_menu.php?act=del&amp;id={$menu.menu_id}" title="删除"  class="op_del"></a>
    </td>
    {/if}
    </tr>
	
    {foreach from=$menu_list item=sub_menu}
    	{if $sub_menu.parent_id eq $menu.menu_id}
        <tr align="center" class="1" id="1_{$sub_menu.menu_id}">
        <td align="left" class="first-cell">----{$sub_menu.name}</td>
        <td align="left">{if $sub_menu.type == 'view'}链接{elseif $sub_menu.type == 'click'}点击{/if}</td>
        <td align="left">{$sub_menu.value}</td>
         {if $act == 'list'}
        <td align="center"><span onclick="listTable.edit(this, 'edit_sort_order', {$sub_menu.menu_id})">{$sub_menu.sort_order}</span></td>
        <td><img src="images/{if $sub_menu.status eq '1'}yes{else}no{/if}.gif" onclick="listTable.toggle(this, 'toggle_status', {$sub_menu.menu_id})" /></td>
        <td align="center" nowrap="true" class="operation">
			<a href="wx_menu.php?act=edit&amp;id={$sub_menu.menu_id}" title="编辑" class="op_edit"></a>
			<a href="wx_menu.php?act=del&amp;id={$sub_menu.menu_id}" title="删除"  class="op_del"></a>
        </td>
         {/if}
        </tr>
        {/if}
     {/foreach}
   {/if}
  {/foreach}
</table>
{if $full_page}
</div>
</form>
{include file="page_footer.htm"}
{/if}