{include file="$template_path/html/header.html"}
<link href="{$template_data}scripts/plug/mobanboxmedia/jquery.mobanboxmedia.css" rel="stylesheet" />
</head>
<body class="">
<section class="vbox">
  {include file="$template_path/html/pagenav.html"}
  <section>
    <section class="hbox stretch">
      {include file="$template_path/html/mobile-nav.html"}
      <section id="content" class="p-t-llg-xs">


        <section class="clearfix">

          <div class="container">
            <div class="row">
              <div class="col-md-10 col-md-offset-1">
                {$errorMessage}
              </div>
            </div>
          </div>

          <div class="container m-t-lg m-xs-t-sm">
            <div class="pos-abt" id="myScrollspy">
              <ul class="nav nav-tabs no-border nav-stacked affix" data-spy="affix" data-offset-top="150">

                {if $faqs>0 || check_login_bool() && $item.user_id == $smarty.session.user.user_id}
                <!--<li{if $smarty.get.controller == 'faq'} class="active"{else} class=""{/if}>
                  <a href="/{$languageURL}items/faq/{$item.id}" title="常见问题解答">
                    <i class="i i-bubble"></i>
                    <span>
                      常见问题解答
                    </span>
                  </a>
                </li>-->
                {/if}
                {if check_login_bool() && $item.user_id == $smarty.session.user.user_id}
                <li{if $smarty.get.controller == 'edit'} class="active"{else} class=""{/if}>
                <a href="/{$languageURL}items/edit/{$item.id}" title="编辑作品">
                  <i class="fa fa-edit"></i>
                    <span>
                      编辑作品
                    </span>
                </a>
                </li>
                {/if}
                {if check_login_bool() && $item.user_id == $smarty.session.user.user_id}
                <!--<li{if $smarty.get.controller == 'record'} class="active"{else} class=""{/if}>
                <a href="/{$languageURL}items/record/{$item.id}" title="购买记录">
                  <i class="i i-lab"></i>
                    <span>
                      购买记录
                    </span>
                </a>
                </li>-->
                {/if}
              </ul>
            </div>
            <div class="row">
              <div class="col-md-10 col-md-offset-1">
                <div class="post-item panel-shadow">


					<div class="panel panel-shadow">
						<div class="panel-body p-xs-l-xs p-xs-r-xs">






							<form method="post" action="" enctype="multipart/form-data" class="horizontal-form item-form disable-on-submit p-b-sm p-l-sm p-r-sm p-t-sm">


								<div class="blocktit clearfix">
									<h3 class="m-t-sm h3-xs"><span class="text-danger m-t-xs">*</span><label for="description">详细的描述</label>
										<small class="header-note hidden-xs">
											尽量精炼详实从而有助于用户搜索到你的作品。
										</small>
									</h3>
								</div>
								<div class="form-group">
									<div class="inputs">
										<!--初始化编辑器-->
										<script id="container" name="description" type="text/plain">
                {$smarty.post.description}
             </script>
										<!-- 配置文件 -->
										<script type="text/javascript" src="{$template_data}ueditor/ueditor.config.js"></script>
										<!-- 编辑器源码文件 -->
										<script type="text/javascript" src="{$template_data}ueditor/ueditor.all.js"></script>
										<!-- 实例化编辑器 -->
										<script type="text/javascript">
											var ue = UE.getEditor('container');
										</script>
									</div>
								</div>

								<div class="line line-dashed b-b line-lg pull-in"></div>

								<div class="alert alert-warning alert-block m-t-sm m-b-sm">
									<button type="button" class="close" data-dismiss="alert">×</button>
									选择准确的分类和属性
								</div>

								<div class="row">
									<div class="col-xs-6">
										<div class="blocktit clearfix">
											<h3 class="m-t-sm h3-xs"><span class="text-danger m-t-xs">*</span><label for="description">类别</label>
												<small class="header-note hidden-xs">
													请选择您作品的所属类别
												</small>
											</h3>
										</div>
										<div class="form-group">
											<div class="inputs">
												<select class="form-control" id="category" name="category">{$categoriesSelect}</select>
											</div>
										</div>
									</div>
								</div>
								<div class="line line-dashed b-b line-lg pull-in"></div>


								<div class="blocktit clearfix">
									<h3 class="m-t-sm h3-xs"><label for="demo_url">演示地址url</label>
										<small class="header-note hidden-xs">
											完整的URL地址，比如：http://www.mobanbox.net
										</small>
									</h3>
								</div>
								<div class="input-group m-t-sm">
									<span class="input-group-addon">http://</span>
									<input class="form-control" autocomplete="off" id="demo_url" name="demo_url" type="text" value="{$smarty.post.demo_url|escape}" placeholder="www.baidu.com">

								</div>

								<div class="line line-dashed b-b line-lg pull-in"></div>

								<div class="blocktit clearfix">
									<h3 class="m-t-sm h3-xs"><label>可设为免费文件</label></h3>
									<div class="inputs chk">
										<label class="checkbox-inline m-l-none i-checks">
											<input type="checkbox" name="free_request" value="true" {if $smarty.post.free_request == 'true'}checked="checked"{/if} />
											<i></i>是
										</label>
									</div>
								</div>
								<div class="line line-dashed b-b line-lg pull-in"></div>

								<div id="attribute_fields">
									{if $attributes}
									{foreach from=$attributes item=a}
									<div class="form-group">
										<label for="name" class="h4 m-b">{$a.name}</label>
										<div class="inputs">
											{if $a.type == 'select'}
											<select class="form-control" id="custom_attributes_{$a.id}" name="attributes[{$a.id}]">
												{foreach from=$a.attributes item=ai}
												<option value="{$ai.id}" {if $smarty.post.attributes[$a.id] == $ai.id}selected="selected"{/if}>{$ai.name}</option>
												{/foreach}
											</select>
											{elseif $a.type == 'multiple'}
											<select class="form-control" multiple="multiple" id="custom_attributes_{$a.id}" name="attributes[{$a.id}]">
												{foreach from=$a.attributes item=ai}
												<option value="{$ai.id}" {if $smarty.post.attributes[$a.id] == $ai.id}selected="selected"{/if}>{$ai.name}</option>
												{/foreach}
											</select>
											{elseif $a.type == 'check'}
											{foreach from=$a.attributes item=ai}
											<label class="checkbox-inline m-l-none i-checks">
												<input type="checkbox" name="attributes[{$a.id}][{$ai.id}]" value="{$ai.id}" {if isset($smarty.post.attributes[$a.id][$ai.id])}checked="checked"{/if}><i></i> {$ai.name}
											</label>
											{/foreach}
											{elseif $a.type == 'radio'}
											{foreach from=$a.attributes item=ai}
											<label class="checkbox-inline p-l-xs i-checks">
												<input type="radio" name="attributes[{$a.id}]" value="{$ai.id}" {if isset($smarty.post.attributes[$a.id]) && $smarty.post.attributes[$a.id] == $ai.id}checked="checked"{/if} /><i></i> {$ai.name}
											</label>
											{/foreach}
											{else}
											<input class="form-control" type="text" name="attributes[{$a.id}]" value="{$smarty.post.attributes[$a.id]}" />
											{/if}
										</div>
									</div>
									<div class="line line-dashed b-b line-lg pull-in"></div>
									{/foreach}
									{/if}

								</div>

								<div class="line line-dashed b-b line-lg pull-in"></div>

								<div class="blocktit clearfix">
									<h3 class="m-t-sm h3-xs"><span class="text-danger m-t-xs">*</span>标签
										<small class="header-note hidden-xs">
											选取遇到麻烦？
											<a class="text-success" href="/index.php/help/upload/" target="_blank">
												查看选取指引
											</a>
										</small>
									</h3>
								</div>

								<div class="form-group m-t-sm">
									<div class="inputs tagsinputs">
										<input type="hidden" name="tags" id="tagstxt" />
										<div class="tagtips clearfix" id="tagtips">
											<span class="label bg-info tageditbtn">编辑标签</span>
										</div>

										<div class="addtags clearfix m-t" id="addtags">
											<div class="tagiptbg pos-rlt">

												<div class="input-group">
													<input type="text" class="form-control" id="addtagipt" autocomplete="off" placeholder="点击选取标签" style="outline:0">
                        <span class="input-group-btn">
                          <button class="btn btn-default addtagsbtn" type="button">完成</button>
                        </span>
												</div>
												<div class="addtaglist aside-xl dropdown-menu bg-white b-a no-shadow animated fadeIn p-t-md p-b-md" id="addtaglist" style="margin-top:-1px;">
												</div>
											</div>
										</div>
									</div>
									<small class="block text-grays m-t-sm">您最多只能选6个标签</small>
								</div>

								<div class="line line-dashed b-b line-lg pull-in"></div>

								<div class="blocktit clearfix">
									<h3 class="m-t-sm h3-xs"><span class="text-danger m-t-xs">*</span>文件
										<small class="header-note hidden-xs">
											上传遇到麻烦？
											<a href="/index.php/help/upload/" target="_blank">
												查看上传指引
											</a>
										</small>
									</h3>
								</div>
								<div class="line line-dashed b-b line-lg pull-in"></div>
								<div class="form-submit">
									<input type="hidden" name="save" value="yes" />
									<button type="submit" class="btn btn-lg btn-info btn-block">保存更改</button>
								</div>
							</form>

							{if $inUpdateQueue}
							<div class="editblock infoblock">审核中</div>
							{else}
							<form action="" enctype="multipart/form-data" id="upload-form" method="post" class="m-t-lg horizontal-form item-form disable-on-submit">
								<div class="blocktit clr">
									<h3>文件和标签更新（需审核）</h3>
									<span>上传遇到问题？<a href="/{$languageURL}help/upload/">请查看此处说明</a></span>
								</div>
								<div id="upload-container">
									<span id="spanButtonPlaceHolder"></span>
									<input id="btnCancel" type="hidden" value="Cancel All Uploads" onclick="swfu.cancelQueue();" disabled="disabled" style="margin-left: 2px; font-size: 8pt; height: 29px;" />
									<br />
									<div class="fieldset flash" id="fsUploadProgress">
										<span class="legend" style="display: none;">队列文件</span>
									</div>
									<div id="divStatus" style="display: none;">0个上传文件</div>
									<br />
									<div id="divFileProgressContainer"></div>
									<div id="thumbnails"></div>
								</div>
								<div id="upload_form_user_files_section" class="clearfix m-t-md">
									<div class="row">
										<div class="form-group col-xs-6 col-sm-6 col-md-4">
											<label>一张缩略图</label>
											<div class="xs-block inputs uploadobjs clr" id="thumbnail_edit">
												<input autocomplete="off" type="hidden" class="hiddenvalue" name="thumbnail" value="{$item.thumbnail}" />
											</div>

											<span class="xs-block m-xs-t-sm inputtips">JPEG格式 尺寸最好修剪至450x310</span>
										</div>
										<div class="form-group col-xs-6 col-sm-6 col-md-4">
											<label>主文件zip包</label>
											<div class="xs-block inputs uploadobjs" id="main_file_edit">
												<input autocomplete="off" type="hidden" class="hiddenvalue" name="main_file" value="{$item.main_file}" />
											</div>
											<span class="xs-block m-xs-t-sm inputtips">.zip格式的压缩包或.txt格式的文本文件(用户点击下载时自动读出)</span>
										</div>

										<div class="form-group col-xs-6 col-sm-6 col-md-4">
											<label>
												封面预览文件
											</label>
											<div class="xs-block inputs uploadobjs" id="first_preview_edit">
												<input autocomplete="off" type="hidden" class="hiddenvalue" name="first_preview" value="{$item.theme_preview}" />
											</div>
											<span class="xs-block m-xs-t-sm inputtips sp">作品页默认展示的预览文件 图片尺寸最好修剪至970x550</span>
										</div>

										<div class="form-group col-xs-6 col-sm-6 col-md-12">
											<label>
												其它预览文件
											</label>
											<div class="inputs uploadobjs clr" id="theme_preview_edit">
												<input autocomplete="off" type="hidden" class="hiddenvalue" name="theme_preview" value="{if $item.preview}{foreach from=$item.preview item=s name=foo}{$s.dir}{if !$smarty.foreach.foo.last},{/if}{/foreach}{/if}" />
											</div>
											<span class="clearfix block inputtips sp m-t-sm">允许的格式：.jpg|.png|.gif|.wma|.mp3|.wav|.mp4|.flv|.wmv|.swf</span>
										</div>

									</div>

									<div class="clearfix alert alert-warning alert-block m-t-sm m-b-sm">
										<button type="button" class="close" data-dismiss="alert">×</button>
										请注意，我们只接受500MB以内大小的文件。
									</div>

								</div>




								<div class="blocktit clearfix">
									<h3 class="m-t-sm h3-xs"><span class="text-danger m-t-xs">*</span><label>更新审核留言</label>
										<small class="header-note hidden-xs">
											不填不予通过。
										</small>
									</h3>
								</div>

								<div class="form-group">
									<div class="inputs">

										<textarea rows="4" name="comments_to_reviewer" id="comments_to_reviewer" class="form-control">{$smarty.post.comments_to_reviewer}</textarea>
										<span class="m-t-sm block">请指明在作品中有使用但非本人原创的文件。</span>
									</div>
								</div>
								<div class="line line-dashed b-b line-lg pull-in"></div>


								<div class="form-submit">
									<input type="hidden" name="upload" value="yes" />
									<button type="submit" class="btn btn-lg btn-info btn-block">上传</button>
								</div>

							</form>
							<link href="/apps/upload/ajax/swfupload/default.css" rel="stylesheet" type="text/css" />
							{literal}
							<script type="text/javascript">
								seajs.use(["pageui", "modules/objtags"], function(ui, tag){
									tag.tagsInit("#tagstxt", "#tagtips", "#addtags", {/literal}{$item_tags}{literal}, {/literal}{$all_tags}{literal});
								ui.uploadInit("/apps/upload/ajax/swfupload/doUpload.php", "{/literal}{$sessID}{literal}", "edit");
								});
							</script>
							{/literal}
							{/if}



						</div>
					</div>


                </div>

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

        </section>




        {include file="$template_path/html/footer.html"}

      </section>
    </section>
  </section>
</section>
</body>
</html>