article-post.html 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. {template 'common/header'}
  2. <ol class="breadcrumb we7-breadcrumb">
  3. <a href="{php echo url('site/article')}"><i class="wi wi-back-circle"></i> </a>
  4. <li><a href="{php echo url('site/article')}">文章管理</a></li>
  5. <li><a href="{php echo url('site/article/post')}">文章编辑</a></li>
  6. </ol>
  7. <form action="./index.php?c=site&a=article&do=post" method="post" class="article-post" enctype="multipart/form-data">
  8. <input type="hidden" name="id" value="{$item[id]}">
  9. <div class="we7-form" id="js-wesite-article-post" ng-controller="WesiteArticlePost" ng-cloak>
  10. <div class="form-group" ng-if="item && item.linkurl == '' && id > 0">
  11. <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label col-sm-2">访问地址</label>
  12. <div class="col-sm-8 col-xs-12">
  13. <p class="form-control-static"><a href="{$_W['siteroot']}app/index.php?c=site&a=site&do=detail&id={{item.id}}&i={$_W['uniacid']}" target="_blank">{$_W['siteroot']}app/index.php?c=site&a=site&do=detail&id={{item.id}}&i={$_W['uniacid']}</a></p>
  14. <div class="help-block">您可以根据此地址,添加回复规则,设置访问。</div>
  15. </div>
  16. </div>
  17. <div class="form-group">
  18. <label for="" class="control-label col-sm-2">排序</label>
  19. <div class="form-controls col-sm-8">
  20. <input type="text" class="form-control" name="displayorder" ng-model="item.displayorder">
  21. <span class="help-block">文章的显示顺序,越大则越靠前 </span>
  22. </div>
  23. </div>
  24. <div class="form-group">
  25. <label for="" class="control-label col-sm-2">标题</label>
  26. <div class="form-controls col-sm-8">
  27. <input type="text" class="form-control" name="title" ng-model="item.title">
  28. <span class="help-block">文章标题 </span>
  29. </div>
  30. </div>
  31. <div class="form-group">
  32. <label for="" class="control-label col-sm-2">文章触发关键字</label>
  33. <div class="form-controls col-sm-8">
  34. <input type="text" class="form-control" name="keyword" ng-model="keywords">
  35. <span class="help-block">添加关键字以后,系统将生成一条图文规则,用户可以通过输入关键字来阅读文章。多个关键字请用英文“,”隔开 </span>
  36. </div>
  37. </div>
  38. <div class="form-group">
  39. <label for="" class="control-label col-sm-2">自定义属性</label>
  40. <div class="form-controls form-control-static col-sm-8">
  41. <input id='option[hot]' type="checkbox" name='option[hot]' value="1" ng-model="item.ishot" ng-checked='item.ishot == 1' />
  42. <label for="option[hot]">头条[h] </label>
  43. <input id='option[commend]' type="checkbox" name='option[commend]' value="1" ng-model="item.iscommend" ng-checked="item.iscommend == 1"/>
  44. <label for="option[commend]">推荐[c]</label>
  45. <span class="help-block">自定义属性</span>
  46. </div>
  47. </div>
  48. <div class="form-group">
  49. <label for="" class="control-label col-sm-2">文章来源</label>
  50. <div class="form-controls col-sm-8">
  51. <input type="text" class="form-control" name="source" ng-model="item.source">
  52. <span class="help-block">文章来源 </span>
  53. </div>
  54. </div>
  55. <div class="form-group">
  56. <label for="" class="control-label col-sm-2">文章作者</label>
  57. <div class="form-controls col-sm-8">
  58. <input type="text" class="form-control" id="writer" name="author" ng-model="item.author">
  59. <span class="help-block">文章作者 </span>
  60. </div>
  61. </div>
  62. <div class="form-group">
  63. <label for="" class="control-label col-sm-2">缩略图</label>
  64. <div class="form-controls col-sm-8">
  65. <div class="we7-input-img input-more input-img" ng-class="{'active': item.thumb}">
  66. <img ng-src="{{item.thumb}}" ng-if="item.thumb">
  67. <a href="javascript:;" class="input-addon" ng-click="uploadImage()" ng-hide="category.icon"><span>+</span></a>
  68. <input type="text" name="thumb" ng-model="item.thumb" ng-style="{'display' : 'none'}">
  69. <div class="cover-dark">
  70. <a href="" class="cut" ng-click="uploadImage()">更换</a>
  71. <a href="" class="del" ng-click="delImage()"><i class="fa fa-times text-danger"></i></a>
  72. </div>
  73. </div>
  74. <div class="help-block">封面(大图片建议尺寸:360像素 * 200像素)</div>
  75. </div>
  76. </div>
  77. <div class="form-group">
  78. <label for="" class="control-label col-sm-2"></label>
  79. <div class="form-controls col-sm-8">
  80. <input type="checkbox" id="incontent" name="incontent" ng-model="item.incontent" value="1" ng-checked="item.incontent == 1">
  81. <label for="incontent">封面图片显示在正文中</label>
  82. </div>
  83. </div>
  84. <div class="form-group form-inline">
  85. <label class="control-label col-sm-2">文章类别</label>
  86. <div class="form-controls col-sm-4" style="z-index: 1001">
  87. {php echo tpl_form_field_category_2level('category', $parent, $children, $pcate, $ccate)}
  88. </div>
  89. </div>
  90. <div class="form-group">
  91. <label class="control-label col-sm-2">选择内容模板</label>
  92. <div class="form-controls col-sm-8" style="z-index: 1000">
  93. <select name="template" class="form-control">
  94. <option value="">使用默认设置</option>
  95. {loop $template $v}
  96. <option value="{$v['name']}"{if $item['template'] == $v['name']} selected{/if}>{$v['title']}</option>
  97. {/loop}
  98. </select>
  99. </div>
  100. </div>
  101. <div class="form-group">
  102. <label for="" class="control-label col-sm-2">简介</label>
  103. <div class="form-controls col-sm-8">
  104. <textarea class="form-control" name="description" rows="5" ng-bind="item.description"></textarea>
  105. </div>
  106. </div>
  107. <div class="form-group">
  108. <label for="" class="control-label col-sm-2"></label>
  109. <div class="form-controls col-sm-8">
  110. <input type="checkbox" name="autolitpic" value="1" ng-checked="!item.thumb" id="autolitpic">
  111. <label for="autolitpic">提取内容的第一个图片为缩略图 </label>
  112. </div>
  113. </div>
  114. <div class="form-group">
  115. <label for="" class="control-label col-sm-2">内容</label>
  116. <div class="form-controls col-sm-8">
  117. {php echo tpl_ueditor('content', $item['content']);}
  118. </div>
  119. </div>
  120. <div class="form-group">
  121. <label for="" class="control-label col-sm-2">直接链接</label>
  122. <div class="form-controls col-sm-8">
  123. {php echo tpl_form_field_link('linkurl', $item['linkurl']);}
  124. </div>
  125. </div>
  126. <div class="form-group ">
  127. <label for="" class="control-label col-sm-2">阅读次数</label>
  128. <div class="form-controls col-sm-8">
  129. <input class="form-control" type="text" name="click" ng-model="item.click">
  130. <span class="help-block">默认为0。您可以设置一个初始值,阅读次数会在该初始值上增加。</span>
  131. </div>
  132. </div>
  133. <div class="form-group">
  134. <label for="" class="control-label col-sm-2">是否赠送积分</label>
  135. <div class="form-controls col-sm-8">
  136. <input type="radio" name="credit[status]" value="1" ng-model="item.credit.status" ng-checked="item.credit.status == 1" id="credit1">
  137. <label for="credit1">赠送</label>
  138. <input type="radio" name="credit[status]" value="0" ng-model="item.credit.status" ng-checked="item.credit.status == 0 || item.credit == ''" id="credit0">
  139. <label for="credit0">不赠送</label>
  140. <span class="help-block">设置赠送积分后,粉丝在分享时赠送积分.粉丝的好友在点击阅读时,也会赠送积分</span>
  141. </div>
  142. </div>
  143. <div class="form-group" ng-show="item.credit.status == 1">
  144. <label for="" class="control-label col-sm-2">赠送积分上限</label>
  145. <div class="form-controls col-sm-8">
  146. <input type="text" class="form-control" name="credit[limit]" ng-model="item.credit.limit">
  147. <span class="help-block">设置赠送积分的上限,到达上限后将不再赠送积分</span>
  148. <span class="help-block" ng-if="id">已经赠送了<strong class="text-danger"> {php echo $credit_num ? $credit_num : 0} </strong>积分,还可以赠送<strong class="text-danger"> {php echo $credit_yu ? $credit_yu : 0} </strong>积分</span>
  149. </div>
  150. </div>
  151. <div class="form-group" ng-show="item.credit.status == 1">
  152. <label for="" class="control-label col-sm-2">转发赠送积分</label>
  153. <div class="form-controls col-sm-8">
  154. <input type="text" class="form-control" name="credit[share]" ng-model="item.credit.share">
  155. <span class="help-block">设置转发时赠送积分</span>
  156. </div>
  157. </div>
  158. <div class="form-group" ng-show="item.credit.status == 1">
  159. <label for="" class="control-label col-sm-2">阅读赠送积分</label>
  160. <div class="form-controls col-sm-8">
  161. <input type="text" class="form-control" name="credit[click]" ng-model="item.credit.click">
  162. <span class="help-block">设置阅读时赠送给分享人的积分</span>
  163. </div>
  164. </div>
  165. <input name="submit" value="发布" class="btn btn-primary btn-submit" type="submit">
  166. <input type="hidden" name="token" value="{$_W['token']}" />
  167. </div>
  168. </form>
  169. <script>
  170. angular.module('wesiteApp').value('config', {
  171. item: {php echo !empty($item) ? json_encode($item) : 'null'},
  172. keywords: {php echo !empty($keywords) ? json_encode($keywords) : 'null'},
  173. id: {php echo !empty($id) ? json_encode($id) : 'null'},
  174. template: {php echo !empty($template) ? json_encode($template) : 'null'}
  175. });
  176. angular.bootstrap($('#js-wesite-article-post'), ['wesiteApp']);
  177. </script>
  178. {template 'common/footer'}