{template "header.html"}

<link href="{THEME_PATH}assets/global/plugins/bootstrap-daterangepicker/daterangepicker.min.css" rel="stylesheet" type="text/css" />
<link href="{THEME_PATH}assets/global/plugins/bootstrap-datepicker/css/bootstrap-datepicker3.min.css" rel="stylesheet" type="text/css" />
<link href="{THEME_PATH}assets/global/plugins/bootstrap-timepicker/css/bootstrap-timepicker.min.css" rel="stylesheet" type="text/css" />
<link href="{THEME_PATH}assets/global/plugins/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" rel="stylesheet" type="text/css" />
<script src="{THEME_PATH}assets/global/plugins/bootstrap-datepicker/js/bootstrap-datepicker.finecms.js" type="text/javascript"></script>

<script type="text/javascript">
    if (App.isAngularJsApp() === false) {
        jQuery(document).ready(function() {
            if (jQuery().datepicker) {
                $('.date-picker').datepicker({
                    rtl: App.isRTL(),
                    orientation: "left",
                    autoclose: true
                });
            }
        });
    }
</script>

<div class="note note-danger">
    <p>{dr_lang('确保网站目录必须有可写权限')}</p>
</div>

<div class="portlet light bordered " style="margin-bottom: 30px">
    <div class="portlet-title">
        <div class="caption">
            <i class="fa fa-home font-dark"></i>
            <span class="caption-subject font-dark"> {dr_lang('网站')}</span>
        </div>
    </div>
    <div class="portlet-body">
        <label><button type="button" onclick="dr_admin_menu_ajax('/index.php?c=home&m=html', 1)" class="btn blue"> <i class="fa fa-file-o"></i> {dr_lang('生成首页')} </button></label>

        <label><button type="button" onclick="dr_bfb('{dr_lang('生成共享栏目')}', '', '{dr_url('html/category_index')}')" class="btn green"> <i class="fa fa-reorder"></i> {dr_lang('生成共享栏目')} </button></label>
    </div>
</div>


<div class="row">
    {loop $module $i $mod}
    <div class="col-md-6">
        <div class="portlet light bordered" style="height: 700px;">
            <div class="portlet-title">
                <div class="caption">
                    <i class="{$mod.icon} font-dark"></i>
                    <span class="caption-subject font-dark"> {dr_lang($mod.name)}</span>
                </div>
            </div>
            <div class="portlet-body">
                <form id="myform{$i}">
                    <div class="form-body">
                        {if !$mod.share}
                        <div class="form-group " style="border-bottom: 1px dashed #eef1f5; padding-bottom: 10px;">
                            <label><button type="button" onclick="dr_admin_menu_ajax('/index.php?s={$mod.dirname}&c=html&m=index', 1)" class="btn blue"> <i class="fa fa-home"></i> {dr_lang('生成模块首页')} </button></label>

                            <label><button type="button" onclick="dr_bfb('{dr_lang('生成栏目')}', '', '{dr_url('html/category_index')}&app={$mod.dirname}')" class="btn green"> <i class="fa fa-reorder"></i> {dr_lang('生成栏目')} </button></label>
                        </div>
                        {/if}
                        <div class="form-group">
                            <label>{dr_lang('每页生成数量')}</label>
                            <div>
                                <label><input type="text" placeholder="{dr_lang('建议不要太多')}" class="form-control" value="{$pagesize}" name="pagesize"></label>
                            </div>
                        </div>
                        <div class="form-group">
                            <label>{dr_lang('按内容ID范围')}</label>
                            <div class="input-group">
                                <div class="input-group  input-daterange " >
                                    <input type="text" placeholder="{dr_lang('按ID开始')}" class="form-control" value="{$param.id_form}" name="id_form">
                                    <span class="input-group-addon"> {dr_lang('到')} </span>
                                    <input type="text" placeholder="{dr_lang('按ID结束')}" class="form-control" value="{$param.id_to}" name="id_to">
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label>{dr_lang('按发布时间范围')}</label>
                            <div class="input-group">
                                <div class="input-group date-picker input-daterange " data-date="" data-date-format="yyyy-mm-dd">
                                    <input type="text" placeholder="{dr_lang('按发布时间范围')}" class="form-control" value="{$param.date_form}" name="date_form">
                                    <span class="input-group-addon"> {dr_lang('到')} </span>
                                    <input type="text" placeholder="{dr_lang('按发布时间范围')}" class="form-control" value="{$param.date_to}" name="date_to">
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label>{dr_lang('按所选栏目')}</label>
                            <div class="input-group">
                                {php echo \Phpcmf\Service::L('Tree')->select_category(\Phpcmf\Service::C()->get_cache('module-'.SITE_ID.'-'.$mod.dirname, 'category'), 0, 'name=\'catids[]\' multiple style=\'width:370px;height:200px\'', dr_lang('全部栏目'));}
                            </div>
                        </div>

                        <div class="form-group ">
                            <div class="row">
                                <div class="col-md-12">
                                    <button type="button" onclick="dr_bfb('{dr_lang('生成内容页面')}', 'myform{$i}', '{dr_url('html/show_index')}&app={$mod.dirname}')" class="btn dark"> <i class="fa fa-th-large"></i> {dr_lang('生成内容')} </button>
                                </div>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
    {/loop}
</div>

{template "footer.html"}