comment.html 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <style>
  2. .reply{
  3. background: #f4f6f8;padding: 10px;margin-top: 10px;border-radius: 5px;width: 100%;font-size: 12px;
  4. }
  5. .reply .item:not(:last-child){
  6. border-bottom: 1px solid #eaeaea;
  7. }
  8. </style>
  9. <div id="comment-container">
  10. <!-- S 评论列表 -->
  11. <div id="commentlist">
  12. {foreach name="$commentList" id="comment"}
  13. <dl id="comment-{$comment.id|htmlentities}">
  14. <dt><a href="javascript:;" rel="nofollow"><img src="{$comment.user.avatar|default='/assets/img/avatar.png'|cdnurl}"></a></dt>
  15. <dd>
  16. <div class="parent">
  17. <cite><a href="javascript:;" rel="external nofollow">{$comment.user.nickname|default='未知'}</a></cite>
  18. <small> {$comment.createtime|human_date|htmlentities}</small>
  19. <div class="pull-right">
  20. {include file="common/rating" star="comment['star']" /}
  21. </div>
  22. <p>{$comment.content|strip_tags|htmlentities}</p>
  23. <div class="comment-images">
  24. {foreach name="comment.images" id="image"}
  25. <a class="media-left" href="#">
  26. <img src="{$image|htmlentities}" style="width: 64px; height: 64px;">
  27. </a>
  28. {/foreach}
  29. </div>
  30. {if !empty($comment.reply)}
  31. <div class="reply">
  32. {foreach name="comment.reply" item="res"}
  33. <div class="item p-1">
  34. <div style="font-weight: bold;">{$res.manage.nickname|default='管理员'}:</div>
  35. <div>{$res.content|strip_tags|htmlentities}</div>
  36. </div>
  37. {/foreach}
  38. </div>
  39. {/if}
  40. </div>
  41. </dd>
  42. <div class="clearfix"></div>
  43. </dl>
  44. {/foreach}
  45. </div>
  46. <!-- E 评论列表 -->
  47. {if $commentList->isEmpty()}
  48. <div class="text-center">暂无评价</div>
  49. {/if}
  50. <!-- S 评论分页 -->
  51. <div id="commentpager" class="pager text-center">
  52. <ul class="pagination">
  53. {$commentList->render()}
  54. </ul>
  55. </div>
  56. <!-- E 评论分页 -->
  57. </div>