{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">
    {$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')"> <i class="fa fa-cog"></i> {dr_lang('附件设置')} </a>
                </li>
                <li class="{if $page==1}active{/if}">
                    <a href="#tab_1" data-toggle="tab" onclick="$('#dr_page').val('1')"> <i class="fa fa-photo"></i> {dr_lang('缩略图路径')} </a>
                </li>
                <li class="{if $page==2}active{/if}">
                    <a href="#tab_2" data-toggle="tab" onclick="$('#dr_page').val('2')"> <i class="fa fa-user"></i> {dr_lang('头像存储路径')} </a>
                </li>
                <li class="{if $page==3}active{/if}">
                    <a href="#tab_3" data-toggle="tab" onclick="$('#dr_page').val('3')"> <i class="fa fa-cloud"></i> {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-body">
                            <div class="form-group">
                                <label class="col-md-2 control-label">{dr_lang('附件归档')}</label>
                                <div class="col-md-9">
                                    <input type="checkbox" name="data[SYS_ATTACHMENT_DB]" value="1" {if $data['SYS_ATTACHMENT_DB']}checked{/if} data-on-text="{dr_lang('开启')}" data-off-text="{dr_lang('关闭')}" data-on-color="success" data-off-color="danger" class="make-switch" data-size="small">
                                    <span class="help-block">{dr_lang('开启之后附件将分为已使用的附件和未使用的附件，归档存储')}</span>
                                </div>
                            </div>
                        </div>
                        <div class="form-body">
                            <div class="form-group">
                                <label class="col-md-2 control-label">{dr_lang('附件上传目录')}</label>
                                <div class="col-md-9">
                                    <input class="form-control input-xlarge" type="text" name="data[SYS_ATTACHMENT_PATH]" value="{$data['SYS_ATTACHMENT_PATH']}" >
                                    <span class="help-block">{dr_lang('此目录必须有读写权限，绝对路径请以“/”开头')}</span>
                                </div>
                            </div>
                        </div>
                        <div class="form-body">
                            <div class="form-group">
                                <label class="col-md-2 control-label">{dr_lang('附件URL地址')}</label>
                                <div class="col-md-9">
                                    <input class="form-control input-xlarge" type="text" name="data[SYS_ATTACHMENT_URL]" value="{$data['SYS_ATTACHMENT_URL']}" >
                                    <span class="help-block">{dr_lang('可以为附件目录指定域名，用于分离附件，留空表示默认本站地址（站外保存时必须指定域名）')}</span>
                                </div>
                            </div>
                        </div>

                    </div>
                </div>

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



                        <div class="form-body">
                            <div class="form-group">
                                <label class="col-md-2 control-label">{dr_lang('缩略图存储目录')}</label>
                                <div class="col-md-9">
                                    <input class="form-control input-xlarge" type="text" name="image[cache_path]" value="{$image['cache_path']}" >
                                    <span class="help-block">{dr_lang('绝对路径请以“/”开头，默认uploadfile/thumb/')}</span>
                                </div>
                            </div>
                        </div>
                        <div class="form-body">
                            <div class="form-group">
                                <label class="col-md-2 control-label">{dr_lang('缩略图访问URL地址')}</label>
                                <div class="col-md-9">
                                    <input class="form-control input-xlarge" type="text" name="image[cache_url]" value="{$image['cache_url']}" >
                                    <span class="help-block">{dr_lang('缩略图文件访问地址，可单独指定域名，默认/uploadfile/thumb/')}</span>
                                </div>
                            </div>
                        </div>

                    </div>
                </div>


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



                        <div class="form-body">
                            <div class="form-group">
                                <label class="col-md-2 control-label">{dr_lang('头像存储目录')}</label>
                                <div class="col-md-9">
                                    <input class="form-control input-xlarge" type="text" name="image[avatar_path]" value="{$image['avatar_path']}" >
                                    <span class="help-block">{dr_lang('绝对路径请以“/”开头，默认/api/member/')}</span>
                                </div>
                            </div>
                        </div>
                        <div class="form-body">
                            <div class="form-group">
                                <label class="col-md-2 control-label">{dr_lang('头像访问URL地址')}</label>
                                <div class="col-md-9">
                                    <input class="form-control input-xlarge" type="text" name="image[avatar_url]" value="{$image['avatar_url']}" >
                                    <span class="help-block">{dr_lang('头像文件访问地址，可单独指定域名，默认/api/member/')}</span>
                                </div>
                            </div>
                        </div>

                    </div>
                </div>


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



                        <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 class="form-control" name="data[SYS_FIELD_THUMB_ATTACH]">
                                        <option value="0"> {dr_lang('本地存储')} </option>
                                        {loop $remote $i $t}
                                        <option value="{$i}" {php echo ($i == $data['SYS_FIELD_THUMB_ATTACH'] ? 'selected' : '');}> {dr_lang($t['name'])} </option>
                                        {/loop}
                                    </select></label>
                                    <span class="help-block">{dr_lang('适用于：共享栏目、独立模块栏目')}</span>
                                </div>
                            </div>
                        </div>
                        <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 class="form-control" name="data[SYS_FIELD_CONTENT_ATTACH]">
                                        <option value="0"> {dr_lang('本地存储')} </option>
                                        {loop $remote $i $t}
                                        <option value="{$i}" {php echo ($i == $data['SYS_FIELD_CONTENT_ATTACH'] ? 'selected' : '');}> {dr_lang($t['name'])} </option>
                                        {/loop}
                                    </select></label>
                                    <span class="help-block">{dr_lang('适用于：共享栏目、独立模块栏目')}</span>
                                </div>
                            </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"}