comment.html 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <div id="comment-container">
  2. <!-- S 评论列表 -->
  3. <div id="commentlist">
  4. {assign name="aid" value="$[aid]" /}
  5. {cms:commentlist id="comment" type="[type]" aid="$aid" pagesize="10"}
  6. <dl id="comment-{$comment.id}">
  7. <dt><a href="{$comment.user.url}" target="_blank"><img src='{$comment.user.avatar|cdnurl}'/></a></dt>
  8. <dd>
  9. <div class="parent">
  10. <cite><a href='{$comment.user.url}' target="_blank">{$comment.user.nickname}</a></cite>
  11. <small> {$comment.createtime|human_date} <a href="javascript:;" data-id="{$comment.id}" title="@{$comment.user.nickname} " class="reply">回复TA</a></small>
  12. <p>{$comment.content}</p>
  13. </div>
  14. </dd>
  15. <div class="clearfix"></div>
  16. </dl>
  17. {/cms:commentlist}
  18. {if $__COMMENTLIST__->isEmpty()}
  19. <div class="loadmore loadmore-line loadmore-nodata"><span class="loadmore-tips">暂无评论</span></div>
  20. {/if}
  21. </div>
  22. <!-- E 评论列表 -->
  23. <!-- S 评论分页 -->
  24. <div id="commentpager" class="text-center">
  25. {cms:commentinfo type="full" /}
  26. </div>
  27. <!-- E 评论分页 -->
  28. <!-- S 发表评论 -->
  29. <div id="postcomment">
  30. <h3>发表评论 <a href="javascript:;">
  31. <small>取消回复</small>
  32. </a></h3>
  33. <form action="{:addon_url('cms/comment/post')}" method="post" id="postform">
  34. {:token()}
  35. <input type="hidden" name="type" value="[type]"/>
  36. <input type="hidden" name="aid" value="{$[aid]}"/>
  37. <input type="hidden" name="pid" id="pid" value="0"/>
  38. <div class="form-group">
  39. <textarea name="content" class="form-control" {if !$user}disabled placeholder="请登录后再发表评论" {/if} id="commentcontent" cols="6" rows="5" tabindex="4"></textarea>
  40. </div>
  41. {if !$user}
  42. <div class="form-group">
  43. <a href="{:url('index/user/login', '', false, $Think.config.url_domain_deploy?'www':'')}" class="btn btn-primary">登录</a>
  44. <a href="{:url('index/user/register', '', false, $Think.config.url_domain_deploy?'www':'')}" class="btn btn-outline-primary">注册新账号</a>
  45. </div>
  46. {else /}
  47. <div class="form-group">
  48. <input name="submit" type="submit" id="submit" tabindex="5" value="提交评论(Ctrl+回车)" class="btn btn-primary"/>
  49. <span id="actiontips"></span>
  50. </div>
  51. <div class="checkbox">
  52. <label>
  53. <input name="subscribe" type="checkbox" class="checkbox" tabindex="7" checked value="1"/> 有人回复时邮件通知我
  54. </label>
  55. </div>
  56. {/if}
  57. </form>
  58. </div>
  59. <!-- E 发表评论 -->
  60. </div>