...
|
...
|
@@ -39,31 +39,12 @@ |
|
|
<div class="row">
|
|
|
<div class="col-md-9">
|
|
|
<table class="table table-bordered">
|
|
|
<tr>
|
|
|
<th width="100">分类<span class="form-required">*</span></th>
|
|
|
<td>
|
|
|
<input class="form-control" type="text" style="width:400px;" required
|
|
|
value="{:implode(' ',$post_categories)}"
|
|
|
placeholder="请选择分类" onclick="doSelectCategory();" id="js-categories-name-input"
|
|
|
readonly/>
|
|
|
<input class="form-control" type="hidden" value="{$post_category_ids}"
|
|
|
name="post[categories]"
|
|
|
id="js-categories-id-input"/>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<th>标题<span class="form-required">*</span></th>
|
|
|
<td>
|
|
|
<input type="hidden" name="post[id]" value="{$post.id}">
|
|
|
<input class="form-control" type="text" name="post[post_title]"
|
|
|
required value="{$post.post_title}" placeholder="请输入标题"/>
|
|
|
</td>
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
|
<th>关键词</th>
|
|
|
<td>
|
|
|
<input class="form-control" type="text" name="post[post_keywords]"
|
|
|
value="{$post['post_keywords']}" placeholder="请输入关键字">
|
|
|
value="" placeholder="请输入关键字">
|
|
|
<p class="help-block">多关键词之间用英文逗号隔开</p>
|
|
|
</td>
|
|
|
</tr>
|
...
|
...
|
@@ -71,71 +52,20 @@ |
|
|
<th>文章来源</th>
|
|
|
<td>
|
|
|
<input class="form-control" type="text" name="post[post_source]"
|
|
|
value="{$post['post_source']}" placeholder="请输入文章来源">
|
|
|
value="" placeholder="请输入文章来源">
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<th>摘要</th>
|
|
|
<td>
|
|
|
<textarea class="form-control" name="post[post_excerpt]" style="height: 50px;"
|
|
|
placeholder="请填写摘要">{$post.post_excerpt}</textarea>
|
|
|
placeholder="请填写摘要"></textarea>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<th>内容</th>
|
|
|
<td>
|
|
|
<script type="text/plain" id="content" name="post[post_content]">{$post.post_content}</script>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<th>相册</th>
|
|
|
<td>
|
|
|
<ul id="photos" class="pic-list list-unstyled form-inline">
|
|
|
<notempty name="post.more.photos">
|
|
|
<foreach name="post.more.photos" item="vo">
|
|
|
<php>$img_url=cmf_get_image_preview_url($vo['url']);</php>
|
|
|
<li id="saved-image{$key}">
|
|
|
<input id="photo-{$key}" type="hidden" name="photo_urls[]"
|
|
|
value="{$vo.url}">
|
|
|
<input class="form-control" id="photo-{$key}-name" type="text"
|
|
|
name="photo_names[]"
|
|
|
value="{$vo.name|default=''}" style="width: 200px;" title="图片名称">
|
|
|
<img id="photo-{$key}-preview"
|
|
|
src="{:cmf_get_image_preview_url($vo['url'])}"
|
|
|
style="height:36px;width: 36px;"
|
|
|
onclick="parent.imagePreviewDialog(this.src);">
|
|
|
<a href="javascript:uploadOneImage('图片上传','#photo-{$key}');">替换</a>
|
|
|
<a href="javascript:(function(){$('#saved-image{$key}').remove();})();">移除</a>
|
|
|
</li>
|
|
|
</foreach>
|
|
|
</notempty>
|
|
|
</ul>
|
|
|
<a href="javascript:uploadMultiImage('图片上传','#photos','photos-item-tpl');"
|
|
|
class="btn btn-sm btn-default">选择图片</a>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<th>附件</th>
|
|
|
<td>
|
|
|
<ul id="files" class="pic-list list-unstyled form-inline">
|
|
|
<notempty name="post.more.files">
|
|
|
<foreach name="post.more.files" item="vo">
|
|
|
<php>$file_url=cmf_get_file_download_url($vo['url']);</php>
|
|
|
<li id="saved-file{$key}">
|
|
|
<input id="file-{$key}" type="hidden" name="file_urls[]"
|
|
|
value="{$vo.url}">
|
|
|
<input class="form-control" id="file-{$key}-name" type="text"
|
|
|
name="file_names[]"
|
|
|
value="{$vo.name}" style="width: 200px;" title="图片名称">
|
|
|
<a id="file-{$key}-preview" href="{$file_url}" target="_blank">下载</a>
|
|
|
<a href="javascript:uploadOne('图片上传','#file-{$key}');">替换</a>
|
|
|
<a href="javascript:(function(){$('#saved-file{$key}').remove();})();">移除</a>
|
|
|
</li>
|
|
|
</foreach>
|
|
|
</notempty>
|
|
|
</ul>
|
|
|
<a href="javascript:uploadMultiFile('附件上传','#files','files-item-tpl');"
|
|
|
class="btn btn-sm btn-default">选择文件</a>
|
|
|
<script type="text/plain" id="content" name="post[post_content]"></script>
|
|
|
</td>
|
|
|
</tr>
|
|
|
</table>
|
...
|
...
|
@@ -149,17 +79,11 @@ |
|
|
<td>
|
|
|
<div style="text-align: center;">
|
|
|
<input type="hidden" name="post[more][thumbnail]" id="thumbnail"
|
|
|
value="{$post.more.thumbnail|default=''}">
|
|
|
value="">
|
|
|
<a href="javascript:uploadOneImage('图片上传','#thumbnail');">
|
|
|
<if condition="empty($post.more.thumbnail)">
|
|
|
<img src="__TMPL__/public/assets/images/default-thumbnail.png"
|
|
|
id="thumbnail-preview"
|
|
|
width="135" style="cursor: pointer"/>
|
|
|
<else/>
|
|
|
<img src="{:cmf_get_image_preview_url($post.more.thumbnail)}"
|
|
|
id="thumbnail-preview"
|
|
|
width="135" style="cursor: pointer"/>
|
|
|
</if>
|
|
|
</a>
|
|
|
<input type="button" class="btn btn-sm btn-cancel-thumbnail" value="取消图片">
|
|
|
</div>
|
...
|
...
|
@@ -171,7 +95,7 @@ |
|
|
<tr>
|
|
|
<td>
|
|
|
<input class="form-control js-bootstrap-datetime" type="text" name="post[published_time]"
|
|
|
value="{:date('Y-m-d H:i',$post['published_time'])}">
|
|
|
value="">
|
|
|
</td>
|
|
|
</tr>
|
|
|
<!--
|
...
|
...
|
|