You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

161 lines
9.5 KiB
HTML

<extend name="Public/base"/>
<block name="body">
<script type="text/javascript" src="__STATIC__/uploadify/jquery.uploadify.min.js"></script>
<div class="cf main-place top_nav_list navtab_list">
<ul class="tabnav1711 fr jstabnav">
<li data-tab="tab1" class="current"><a href="javascript:void(0);">基 础</a></li>
<li data-tab="tab2"><a href="javascript:void(0);">高 级</a></li>
</ul>
<h3 class="page_title">{$meta_title}</h3>
<p class="description_text"></p>
</div>
<div class="tab-wrap">
<div class="tab-content tabcon1711 tabcon17112">
<form action="{:U()}" method="post" class="form-horizontal form_info_ml">
<!-- 基础 -->
<div id="tab1" class="tab-pane in tab1">
<ul class="form_info tabul1711 form_info_category">
<li><label>上级分类</label><div class="form_main"><input disabled value="{$category['title']|default='无'}" type="text" class=""></div><i class="form_hint"></i></li>
<li><label>分类名称</label><div class="form_main"><input name="title" value="{$info.title|default=''}" type="text" class=""></div><i class="form_hint">名称不能为空</i></li>
<li><label>分类标识</label><div class="form_main"><input name="name" value="{$info.name|default=''}" type="text" class=""></div><i class="form_hint">英文字母</i></li>
<li><label>分组定义</label><div class="form_main form_textarea_edit"><textarea name="groups">{$info.groups|default=''}</textarea></div><i class="form_hint"></i></li>
<li><label>发布内容</label><div class="form_main"><span class="form_radio"><label><input type="radio" name="allow_publish" value="0"> 不允许</label>
<label><input type="radio" name="allow_publish" value="1" checked> 仅允许后台</label>
<label><input type="radio" name="allow_publish" value="2" > 允许前后台</label></span></div><i class="form_hint">是否允许发布内容</i></li>
<li><label>是否审核</label><div class="form_main"><span class="form_radio"><label><input type="radio" name="check" value="0" checked> 不需要</label>
<label><input type="radio" name="check" value="1"> 需要</label></span></div><i class="form_hint">在该分类下发布的内容是否需要审核</i></li>
<li><label>允许文档类型</label><div class="form_main"><span class="form_checkbox"><volist name=":C('DOCUMENT_MODEL_TYPE')" id="type">
<label>
<input type="checkbox" name="type[]" value="{$key}"> {$type}
</label>
</volist></span></div><i class="form_hint"></i></li>
<li><label>列表绑定文档模型</label><div class="form_main"><span class="form_checkbox"><volist name=":get_document_model()" id="list">
<label>
<input type="checkbox" name="model[]" value="{$list.id}"> {$list.title}
</label>
</volist></span></div><i class="form_hint">列表支持发布的文档模型</i></li>
<li><label>子文档绑定绑定模型</label><div class="form_main"><span class="form_checkbox"><volist name=":get_document_model()" id="list">
<label>
<input type="checkbox" name="model_sub[]" value="{$list.id}"> {$list.title}
</label>
</volist></span></div><i class="form_hint">子文档支持发布的文档模型</i></li>
<li><label>分类图标</label><div class="form_main form_file"><input type="file" id="upload_picture">
<input type="hidden" name="icon" id="icon" value="{$info['icon']|default=''}"/>
<div class="upload-img-box">
<notempty name="info['icon']">
<div class="upload-pre-item">
<span class="placeholder-graphic placeholder-graphic_category_icon"><img src="{$info.icon|get_cover='path'}"/></span>
</div>
</notempty>
</div></div><i class="form_hint"></i></li>
</ul>
<script type="text/javascript">
//上传图片
/* 初始化上传插件 */
$("#upload_picture").uploadify({
"height" : 30,
"swf" : "__STATIC__/uploadify/uploadify.swf",
"fileObjName" : "download",
"buttonText" : "上传图片",
"uploader" : "{:U('File/uploadPicture',array('session_id'=>session_id()))}",
"width" : 120,
'removeTimeout' : 1,
'fileTypeExts' : '*.jpg; *.jpeg; *.png; *.gif;',
"onUploadSuccess" : uploadPicture,
'onFallback' : function() {
alert('未检测到兼容版本的Flash.');
}
});
function uploadPicture(file, data){
var data = $.parseJSON(data);
var src = '';
if(data.status){
$("#icon").val(data.id);
src = data.url || '__ROOT__' + data.path;
$("#icon").parent().find('.upload-img-box').html(
'<div class="upload-pre-item"><span class="placeholder-graphic placeholder-graphic_category_icon"><img src="' + src + '"/></span></div>'
);
} else {
updateAlert(data.info);
setTimeout(function(){
$('#top-alert').find('button').click();
$(that).removeClass('disabled').prop('disabled',false);
},1500);
}
}
</script>
</div>
<!-- 高级 -->
<div id="tab2" class="tab-pane tab2">
<ul class="form_info tabul1711 form_info_category">
<li><label>可见性</label><div class="form_main"><select name="display">
<option value="1">所有人可见</option>
<option value="0">不可见</option>
<option value="2">管理员可见</option>
</select></div><i class="form_hint">是否对用户可见,针对前台</i></li>
<li><label>排序</label><div class="form_main"><input name="sort" value="{$info.sort|default=0}" type="text" class=""></div><i class="form_hint">仅对当前层级分类有效</i></li>
<li><label>列表行数</label><div class="form_main"><input name="list_row" value="{$info.list_row|default=10}" type="text" class=""></div><i class="form_hint"></i></li>
<li><label>网页标题</label><div class="form_main"><input name="meta_title" value="{$info.meta_title|default=''}" type="text" class=""></div><i class="form_hint"></i></li>
<li><label>关键字</label><div class="form_main"><input name="keywords" value="{$info.keywords|default=''}" type="text" class=""></div><i class="form_hint"></i></li>
<li><label>描述</label><div class="form_main form_textarea_edit"><textarea name="description">{$info.description|default=''}</textarea></div><i class="form_hint"></i></li>
<li><label>频道模板</label><div class="form_main"><input name="template_index" value="{$info.template_index|default=''}" type="text" class=""></div><i class="form_hint"></i></li>
<li><label>列表模板</label><div class="form_main"><input name="template_lists" value="{$info.template_lists|default=''}" type="text" class=""></div><i class="form_hint"></i></li>
<li><label>详情模板</label><div class="form_main"><input name="template_detail" value="{$info.template_detail|default=''}" type="text" class=""></div><i class="form_hint"></i></li>
<li><label>编辑模板</label><div class="form_main"><input name="template_edit" value="{$info.template_edit|default=''}" type="text" class=""></div><i class="form_hint"></i></li>
</ul>
</div>
<div class="form-item">
<input type="hidden" name="id" value="{$info.id|default=''}">
<input type="hidden" name="pid" value="{:isset($category['id'])?$category['id']:$info['pid']}">
<button type="submit" id="submit" class=" submit_btn ajax-post short-mlspacing" target-form="form-horizontal">确 定</button>
</div>
</form>
</div>
</div>
<div class="common_settings">
<span class="plus_icon"><span><img src="__IMG__/zwmimages/icon_jia.png"></span></span>
<form class="addShortcutIcon">
<input type="hidden" name="title" value="{$m_title}">
<input type="hidden" name="url" value="{$m_url}">
</form>
<a class="ajax-post add-butn <notempty name='commonset'>addSIsetted</notempty>" href="javascript:;" target-form="addShortcutIcon" url="{:U('Think/addShortcutIcon')}"><img src="__IMG__/zwmimages/icon_jia.png"><span><notempty name='commonset'>已添加<else />添加至常用设置</notempty></span></a>
</div>
</block>
<block name="script">
<script type="text/javascript">
<present name="info.id">
Think.setValue("allow_publish", {$info.allow_publish|default=1});
Think.setValue("check", {$info.check|default=0});
Think.setValue("model[]", {$info.model|json_encode} || [1]);
Think.setValue("model_sub[]", {$info.model_sub|json_encode} || [1]);
Think.setValue("type[]", {$info.type|json_encode} || [2]);
Think.setValue("display", {$info.display|default=1});
Think.setValue("reply", {$info.reply|default=0});
Think.setValue("reply_model[]", {$info.reply_model|json_encode} || [1]);
</present>
$(function(){
showTab();
$("input[name=reply]").change(function(){
var $reply = $(".form-item.reply");
parseInt(this.value) ? $reply.show() : $reply.hide();
}).filter(":checked").change();
});
//导航高亮
highlight_subnav('{:U('Category/index')}');
</script>
</block>