{include file="$admin_template_path/html/header.html"}
</head>
<body>
{include file="$admin_template_path/html/pagetops.html"}
{if $errorMessage}
<div id="errormsg">
<div class="msg">
  <div class="closebtn"><i data-icon="" class="icon-close"></i></div>
  {$errorMessage}
</div>
</div>
{literal}
<script type="text/javascript">
seajs.use(["modules/pageui/msg"], function(msg){
    msg.msginit("#errormsg");
});
</script>
{/literal}
{/if}

<div class="pagebg">
    <div class="mcontent pagemain clr">
        {include file="$admin_template_path/html/leftmenu.html"}
        <div class="pagemainconent">

        <div class="rightdetail_admin">
            <div class="general_table_border">
                <table id="gentable" class="general_table" cellspacing="0" cellpadding="0" border="0">
                    <thead>
                    <tr>
                        <th></th>
                        <th width="150">模板目录</th>
                        <th width="250"></th>
                    </tr>
                    </thead>
                    <tbody>


                    {foreach from=$templates item=d}
                    <tr>
                        <td>
                            <input class="statusrad"
                                   type="radio"
                                   ajax-url="/apps/{$smarty.get.m}/ajax/edit.php"
                                   ajax-data="{literal}{'edit':true,'value':'template','template':'{/literal}{$d}{literal}'}{/literal}"
                                   name="template_radio"
                            {if $template == $d}
                            checked="checked"
                            {/if}
                            >使用
                        </td>
                        <td>
                            {$d}
                        </td>
                        <td>
                        </td>
                    </tr>
                    {/foreach}
                    </tbody>
                </table>
            </div>
            {literal}
            <script>
                seajs.use(["jq", "modules/ajax/btns"], function ($,aj) {
                    aj.ajaxradioinit("#gentable .statusrad", "ajax-url", "ajax-data", function () {
                        alert("修改成功");
                    })
                });
            </script>
            {/literal}
        </div>
        
        </div>
    </div>
</div>
</body>
</html>