{include file="header.html"}
<script type="text/javascript">
$(function()
{
    var map = {$map};
    if (map.length > 0)
    {
        var option = {openImg: "templates/style/images/treetable/tv-collapsable.gif", shutImg: "templates/style/images/treetable/tv-expandable.gif", leafImg: "templates/style/images/treetable/tv-item.gif", lastOpenImg: "templates/style/images/treetable/tv-collapsable-last.gif", lastShutImg: "templates/style/images/treetable/tv-expandable-last.gif", lastLeafImg: "templates/style/images/treetable/tv-item-last.gif", vertLineImg: "templates/style/images/treetable/vertline.gif", blankImg: "templates/style/images/treetable/blank.gif", collapse: false, column: 1, striped: false, highlight: true, state:false};
        $("#treet1").jqTreeTable(map, option);
    }
});
</script>
<div id="rightTop">
    <p>{$lang.acategory}</p>
    <ul class="subnav">
        <li><span>{$lang.manage}</span></li>
        <li><a class="btn1" href="index.php?app=acategory&amp;act=add">{$lang.add}</a></li>
    </ul>
</div>
<div class="info2">
    <table class="distinction">
        <!-- {if $acategories} -->
        <thead>
            <tr>
                <th class="w30"><input id="checkall_1" type="checkbox" class="checkall" /></th>
                <th width="50%"><span class="all_checkbox">
                    <label for="checkall_1">{$lang.checkall}</label>
                    </span>{$lang.cate_name}</th>
                <th>{$lang.sort_order}</th>
                <th class="handler">{$lang.handler}</th>
            </tr>
        </thead>
        <tbody id="treet1">
            <!-- {/if} -->
            <!--{foreach from=$acategories item=acategory}-->
            <tr>
                <td class="align_center w30"><!--{if !$acategory.code}-->
                    <input type="checkbox" class="checkitem" value="{$acategory.cate_id}" />
                    <!--{/if}--></td>
                <td class="node" width="50%"><span ectype="inline_edit" fieldname="cate_name" fieldid="{$acategory.cate_id}" required="1" class="node_name editable">{$acategory.cate_name|escape}</span></td>
                <td class="align_center"><!--{if !$acategory.code}-->
                    <span ectype="inline_edit" fieldname="sort_order" fieldid="{$acategory.cate_id}" datatype="pint" maxvalue="255" class="editable">{$acategory.sort_order}</span>
                    <!--{/if}--></td>
                <td class="handler"><span>
                    <!--{if !$acategory.code}-->
                    <a href="index.php?app=acategory&amp;act=edit&amp;id={$acategory.cate_id}">{$lang.edit}</a> | <a href="javascript:if(confirm('{$lang.drop_confirm}'))window.location = 'index.php?app=acategory&amp;act=drop&amp;id={$acategory.cate_id}';">{$lang.drop}</a>
                    <!--{/if}-->
                    <!-- {if $acategory.layer lt $max_layer and $acategory.parent_children_valid} -->
                    <!--{if !$acategory.code}-->
                    |
                    <!--{/if}-->
                    <a href="index.php?app=acategory&amp;act=add&amp;pid={$acategory.cate_id}">{$lang.add_child}</a>
                    <!--{/if}-->
                    </span> </td>
            </tr>
            <!--{foreachelse}-->
            <tr class="no_data">
                <td colspan="4">{$lang.no_data}</td>
            </tr>
            <!--{/foreach}-->
            <!-- {if $acategories} -->
        </tbody>
        <!-- {/if} -->
        <tfoot>
            <tr class="tr_pt10">
                <!-- {if $acategories} -->
                <td class="align_center"><label for="checkall1">
                    <input id="checkall_2" type="checkbox" class="checkall">
                    </label></td>
                <td colspan="3" id="batchAction"><span class="all_checkbox">
                    <label for="checkall_2">{$lang.checkall}</label>
                    </span>&nbsp;&nbsp;
                    <input class="formbtn batchButton" type="button" value="{$lang.drop}" name="id" uri="index.php?app=acategory&act=drop" presubmit="confirm('{$lang.drop_confirm}');" />
                    <!--<input class="formbtn batchButton" type="button" value="lang.update_order" name="id" presubmit="updateOrder(this);" />-->
                </td>
                <!--{/if}-->
            </tr>
        </tfoot>
    </table>
</div>
{include file="footer.html"}