commentlist.html 1.5 KB

1234567891011121314151617181920212223242526272829303132333435
  1. {volist name='commentlist' id='comment'}
  2. <div class="comment-panel" id="comment-{$comment.id}">
  3. <div class="comment-panel-portrait">
  4. <img src="{$comment.avatar}" class="img-fluid rounded-circle" alt="">
  5. </div>
  6. <div class="comment-panel-content">
  7. <div class="comment-panel-content-item">
  8. <div class="comment-author">{$comment.username|htmlentities}</div>
  9. <div>{$comment.createtime|human_date}</div>
  10. </div>
  11. <div class="comment-panel-content-main">{$comment.content|htmlentities}</div>
  12. {volist name="$comment['sublist']" id='subcomment' }
  13. <div class="comment-secondary-panel" id="comment-{$subcomment.id}">
  14. <span class="triangle-icon"><i class="fa fa-sort-asc" aria-hidden="true"></i></span>
  15. <div class="comment-panel-content">
  16. <div class="comment-panel-content-item">
  17. <div class="comment-author">{$subcomment.username|htmlentities}</div>
  18. <div>{$subcomment.createtime|human_date}</div>
  19. </div>
  20. <div class="comment-panel-content-main">{$subcomment.content|htmlentities}</div>
  21. </div>
  22. </div>
  23. {/volist}
  24. </div>
  25. <div class="comment-reply"><a href="javascript:;" rel="{$comment.id}" title="@{$comment.username} " class="reply">回复</a></div>
  26. </div>
  27. {/volist}
  28. {if $commentlist->isEmpty()}
  29. <p class="text-muted">
  30. 还没有人发表评论
  31. </p>
  32. {/if}
  33. <div class="pager mt-3">
  34. {$commentlist->render()}
  35. </div>