{template "header.html"}

<div class="note note-danger">
    <p><a href="javascript:dr_update_cache();">{dr_lang('更改数据之后需要更新缓存之后才能生效')}</a></p>
</div>
<form action="" class="form-horizontal" method="post" name="myform" id="myform">
    <div class="table-scrollable">
        <table class="table table-striped table-bordered table-hover table-checkable dataTable">
            <thead>
            <tr class="heading">
                <th width="100"> {dr_lang('状态')}</th>
                <th width="200"> {dr_lang('名称')} / {dr_lang('目录')}</th>
                <th> {dr_lang('操作')} </th>
            </tr>
            </thead>
            <tbody>
            {loop $module $i $t}
            <tr class="odd gradeX">

                <td>{if $t.is_install}
                    {if $t.used}
                    <span class="label label-sm label-success">{dr_lang('已启用')}</span>
                    {else}
                    <span class="label label-sm label-warning">{dr_lang('未启用')}</span>
                    {/if}
                    {else}
                    <span class="label label-sm label-danger">{dr_lang('未安装')}</span>
                    {/if}
                </td>
                <td><i class="{$t.icon}"></i> {$t.name} / {$t.dirname}</td>
                <td>
                    {if $ci->_is_admin_auth()}
                    {if $t.is_install}
                    <label><a href="{dr_url($t['dirname'].'/comment/index')}" class="btn btn-xs green"> <i class="fa fa-comments"></i> {dr_lang('已审核评论')} </a></label>
                    <label><a href="{dr_url($t['dirname'].'/comment_verify/index')}" class="btn btn-xs red"> <i class="fa fa-edit"></i> {dr_lang('待审核评论')} </a></label>
                    <label><a href="{dr_url(APP_DIR.'/module/edit', ['dir'=>$t.dirname])}" class="btn btn-xs blue"> <i class="fa fa-cog"></i> {dr_lang('评论设置')} </a></label>
                    <label><a href="{dr_url('field/index', ['rname'=>'comment-module-'.$t.dirname, 'rid'=>0])}" class="btn btn-xs grey-mint"> <i class="fa fa-code"></i> {dr_lang('评论字段')} </a></label>
                    <label><a href="javascript:dr_iframe_show('code', '{dr_url(APP_DIR.'/module/show_index', ['dir'=>$t.dirname])}', '400px', '50%');" class="btn btn-xs dark"> <i class="fa fa-code"></i> {dr_lang('调用代码')}</a></label>
                    <label><a href="javascript:dr_load_ajax('{dr_lang('确定将此模块重新安装到本插件中吗？')}', '{dr_url(APP_DIR.'/module/add', ['dir'=>$t.dirname])}', 1);" class="btn btn-xs green"> <i class="fa fa-plus"></i> {dr_lang('重装')} </a></label>
                    <label><a href="javascript:dr_load_ajax('{dr_lang('确定将此模块从本插件中删除吗？')}', '{dr_url(APP_DIR.'/module/del', ['dir'=>$t.dirname])}', 1);" class="btn btn-xs red"> <i class="fa fa-trash"></i> {dr_lang('卸载')} </a></label>
                    {else}
                    <label><a href="javascript:dr_load_ajax('{dr_lang('确定将此模块安装到本插件中吗？')}', '{dr_url(APP_DIR.'/module/add', ['dir'=>$t.dirname])}', 1);" class="btn btn-xs blue"> <i class="fa fa-plus"></i> {dr_lang('安装')} </a></label>
                    {/if}
                    {/if}
                </td>
            </tr>
            {/loop}
            </tbody>
        </table>
    </div>
</form>

{template "footer.html"}