<#include "/common/image_upload.html"/>
<#include "attachment_upload.html"/>
<#include "media_upload.html"/>
<@p.form id="jvForm" action="o_" labelWidth="10">
<#assign count=0/>
<#list itemList as item>
<#if !item.single><#assign count=count+1/>#if>
<#if !item.custom>
<#if item.field=="channelId">
<#assign h><#if ??>${}<#else><@s.m "content."+item.field+".help"/>#if>#assign>
<@ required="true" label=item.label colspan=item.single?string("2","1") width="${item.single?string(100,50)}">
"/>
${h}
<@s.m "content.topicIds"/>: <@p.checkboxlist list=topicList listKey="id" listValue="sname" name="topicIds"/>
@>
<#elseif item.field=="title">
<@ required="true" help= helpPosition="${Position!2}" label=item.label colspan=item.single?string("2","1") width="${item.single?string(100,50)}">
<@p.text value="${item.defValue!}" class="required" maxlength="150" size="${item.size!70}" name=item.field/>
url:
@>
<#elseif item.field=="shortTitle">
<#assign h><#if ??>${}<#else><@s.m "content."+item.field+".help"/>#if>#assign>
<@p.text value="${item.defValue!}" class="pn-fruler" maxlength="150" size="${item.size!35}" help="${h}" helpPosition="${Position!3}" label=item.label name=item.field colspan=item.single?string("2","1") width="${item.single?string(100,50)}"/>
<#elseif item.field=="titleColor">
<#assign h><#if ??>${}<#else><@s.m "content."+item.field+".help"/>#if>#assign>
<@ help="${h}" helpPosition="${Position!3}" label=item.label colspan=item.single?string("2","1") width="${item.single?string(100,50)}">
@>
<#elseif item.field=="tagStr">
<#assign h><#if ??>${}<#else><@s.m "content."+item.field+".help"/>#if>#assign>
<@p.text value="${item.defValue!}" maxlength="50" size="${item.size!35}" help="${h}" helpPosition="${Position!2}" label=item.label name=item.field colspan=item.single?string("2","1") width="${item.single?string(100,50)}"/>
<#elseif item.field=="description">
<@p.textarea value="${item.defValue!}" cols="${item.cols!70}" rows="${item.rows!3}" maxlength="255" help= helpPosition="${Position!2}" label=item.label name=item.field colspan=item.single?string("2","1") width="${item.single?string(100,50)}"/>
<#elseif item.field=="author">
<@ help= helpPosition="${Position!2}" label=item.label colspan=item.single?string("2","1") width="${item.single?string(100,50)}">
<@p.text name=item.field value="${item.defValue!}" maxlength="100" size="${item.size!}"/>
@>
<#elseif item.field=="origin">
<@ help= helpPosition="${Position!2}" label=item.label colspan=item.single?string("2","1") width="${item.single?string(100,50)}">
<@p.text name=item.field value="${item.defValue!}" maxlength="100" style="width:70px"/>
<@s.m "content.originUrl"/>:
@>
<#elseif item.field=="viewGroupIds">
<#assign h><#if ??>${}<#else><@s.m "content."+item.field+".help"/>#if>#assign>
<@p.checkboxlist list=groupList listKey="id" listValue="name" help="${h}" helpPosition="${Position!2}" label=item.label name=item.field colspan=item.single?string("2","1") width="${item.single?string(100,50)}"/>
<#elseif item.field=="topLevel">
<@ help= helpPosition="${Position!2}" label=item.label colspan=item.single?string("2","1") width="${item.single?string(100,50)}">
<@ list={"0":"content.topLevel.0","1":"content.topLevel.1","2":"content.topLevel.2","3":"content.topLevel.3","4":"content.topLevel.4","5":"content.topLevel.5","6":"content.topLevel.6"} name=item.field colspan=item.single?string("2","1") width="${item.single?string(100,50)}"/>
<@s.m "content.sortDate"/>: <@p.text name="sortDate" style="width:140px" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="Wdate"/>
@>
<#elseif item.field=="releaseDate">
<#assign h><#if ??>${}<#else><@s.m "content."+item.field+".help"/>#if>#assign>
<@p.text style="width:140px" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="Wdate" help="${h!}" helpPosition="${Position!2}" label=item.label name=item.field colspan=item.single?string("2","1") width="${item.single?string(100,50)}"/>
<#elseif item.field=="typeId">
<@ help= helpPosition="${Position!2}" label=item.label colspan=item.single?string("2","1") width="${item.single?string(100,50)}">
<@ list=typeList listKey="id" listValue="name" onchange="typeChange(this.selectedIndex)" name=item.field colspan=item.single?string("2","1") width="${item.single?string(100,50)}"/>
@>
<#elseif item.field=="tplContent">
<#assign h><#if ??>${}<#else><@s.m "content."+item.field+".help"/>#if>#assign>
<@ list=tplList headerKey="" headerValue="global.default" name=item.field help="${h}" helpPosition="${Position!2}" label=item.label colspan=item.single?string("2","1") width="${item.single?string(100,50)}"/>
<#elseif item.field=="typeImg">
<@ id="typeImg" label=item.label colspan="1" width="50" noHeight="true">
<@p.text id="uploadImgPath0" name="typeImg" style="width:220px"/>
" onclick="previewImg(0);" class="preview-button"/>
" onclick="upload(0);" class="upload-button"/>
<@s.m "global.width"/>:
<@s.m "global.height"/>:
" onclick="imgCut(0);" class="cut-button"/>
@><@ colspan="1" width="50">
![<@s.m]()
" style="width:100px;height:70px;background-color:#ccc;border:1px solid #333"/>
@>
<#elseif item.field=="titleImg">
<@ id="titleImg" label=item.label colspan="1" width="50" noHeight="true">
<@p.text id="uploadImgPath1" name="titleImg" style="width:220px"/>
" onclick="previewImg(1);" class="preview-button"/>
" onclick="upload(1);" class="upload-button"/>
<@s.m "global.width"/>:
<@s.m "global.height"/>:
" onclick="imgCut(1);" class="cut-button"/>
@><@ colspan="1" width="50">
![<@s.m]()
" style="width:100px;height:70px;background-color:#ccc;border:1px solid #333"/>
@>
<#elseif item.field=="contentImg">
<@ id="contentImg" label=item.label colspan="1" width="50" noHeight="true">
<@p.text id="uploadImgPath2" name="contentImg" style="width:220px"/>
" onclick="previewImg(2);" class="preview-button"/>
" onclick="upload(2);" class="upload-button"/>
<@s.m "global.width"/>:
<@s.m "global.height"/>:
" onclick="imgCut(2);" class="cut-button"/>
@><@ colspan="1" width="50">
![<@s.m]()
" style="width:100px;height:70px;background-color:#ccc;border:1px solid #333"/>
@>
<#elseif item.field=="attachments">
<@ label=item.label colspan="2" noHeight="true">
@>
<#elseif item.field=="media">
<@ label=item.label colspan="1" width="50" noHeight="true">
" onclick="uploadMedia();" class="upload-button"/>
@>
<@ colspan="1" width="50" label="content.mediaType">
<@ name="mediaType" list=["WM","REAL","FLV","FLASH"]/>
@>
<#elseif item.field=="txt">
<@p.editor value=item.defValue colspan="2" help= helpPosition="${Position!}" label=item.label name=item.field/>
<#elseif item.field=="txt1">
<@p.editor value=item.defValue colspan="2" help= helpPosition="${Position!}" label=item.label name=item.field/>
<#elseif item.field=="txt2">
<@p.editor value=item.defValue colspan="2" help= helpPosition="${Position!}" label=item.label name=item.field/>
<#elseif item.field=="txt3">
<@p.editor value=item.defValue colspan="2" help= helpPosition="${Position!}" label=item.label name=item.field/>
<#elseif item.field=="pictures">
<@ label=item.label colspan="2" noHeight="true">
"/>
<#list 3..6 as i>
#list>
@>
#if>
<#else>
<@p.selfDefineWidget name="attr_${item.field}" value=item.defValue size="${item.size!}" list="${item.optValue!}" help= helpPosition="${Position!2}" rows="${item.rows!}" cols="${item.cols!}" label=item.label colspan=item.single?string("2","1") width="${item.single?string(100,50)}" type="${item.dataType}"/>
#if>
<#if count%2==0>
<#assign f=itemList[item_index+1].field/> id="tr-${f}"<#if (f=="typeImg" && !typeList[0].hasImage) || (f=="titleImg" && (!channel?? || !channel.hasTitleImg) || (f=="contentImg" && (!channel?? || !channel.hasContentImg)))> style="display:none"#if>#if>>
#if>
#list>
<@ colspan="2">
<@p.submit code="global.submit"/> <@p.reset code="global.reset"/>
@>
@p.form>
<#include "/common/alert_message.html"/>
" style="display:none;">