{template "header.html"}

<div class="row my-content-top-tool">
    <div class="col-md-12 col-sm-12">

        <label style="margin-right:10px"><a href="{$list_url}" class="btn green"> {$list_name}</a></label>
        {if $ci->_is_admin_auth('field/index')}<label style="margin-right:10px"><a href="{$field_url}" class="btn blue"> <i class="fa fa-code"></i> {dr_lang('自定义栏目字段')}</a></label>{/if}
        <label style="margin-right:10px"><a href="{$post_url}" class="btn red"> <i class="fa fa-plus"></i> {dr_lang('添加栏目')}</a></label>
        <label><a href="{$post_all_url}" class="btn blue"> <i class="fa fa-plus"></i> {dr_lang('批量添加')}</a></label>
    </div>
</div>

<div class="note note-danger">
    <p><a href="javascript:dr_update_cache('module', 'module');">{dr_lang('更改数据之后需要更新缓存之后才能生效')}</a></p>
</div>

<form action="" class="form-horizontal" method="post" name="myform" id="myform">
    {$form}
    <div class="portlet bordered light myfbody">
        <div class="portlet-title tabbable-line">
            <ul class="nav nav-tabs" style="float:left;">
                <li class="{if $page==0}active{/if}">
                    <a href="#tab_0" data-toggle="tab" onclick="$('#dr_page').val('0')"> {dr_lang('批量添加')} </a>
                </li>
            </ul>
        </div>
        <div class="portlet-body">
            <div class="tab-content">

                <div class="tab-pane {if $page==0}active{/if}" id="tab_0">
                    <div class="form-body">

                        <div class="form-group">
                            <label class="col-md-2 control-label">{dr_lang('所属栏目')}</label>
                            <div class="col-md-9">
                                <label>{$select}</label>
                            </div>
                        </div>
                        {if $module.share}
                        <div class="form-group r1">
                            <label class="col-md-2 control-label">{dr_lang('栏目类型')}</label>
                            <div class="col-md-9">
                                <div class="mt-radio-inline">
                                    <label class="mt-radio mt-radio-outline"><input type="radio" name="data[tid]" value="0" /> {dr_lang('单网页')} <span></span></label>
                                    <label class="mt-radio mt-radio-outline"><input type="radio" name="data[tid]" value="1" /> {dr_lang('内容模块')} <span></span></label>
                                </div>
                            </div>
                        </div>
                        <div class="form-group dr_tid_1">
                            <label class="col-md-2 control-label">{dr_lang('共享模块')}</label>
                            <div class="col-md-9">
                                <label>
                                    <select class="form-control" name="data[mid]">
                                        <option value=""> -- </option>
                                        {loop $module_share $t}
                                        {if $t.share}
                                        <option value="{$t.dirname}" > {dr_lang($t.name)} </option>
                                        {/if}
                                        {/loop}
                                    </select>
                                </label>
                            </div>
                        </div>
                        {/if}
                        <div class="form-group">
                            <label class="col-md-2 control-label">{dr_lang('批量录入')}</label>
                            <div class="col-md-9">

                                <textarea class="form-control " style="height:190px" name="data[list]"></textarea>
                                <span class="help-block">{dr_lang('格式: 栏目名称|栏目目录 [回车换行]，如果不填写栏目目录时，会自动用拼音代替')}</span>

                            </div>
                        </div>

                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="portlet-body form myfooter">
        <div class="form-actions text-center">
            <button type="button" onclick="dr_ajax_submit('{dr_now_url()}&page='+$('#dr_page').val(), 'myform', '2000')" class="btn green"> <i class="fa fa-save"></i> {dr_lang('保存')}</button>
        </div>
    </div>
</form>

{template "footer.html"}