comments.html 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <div id="js-article-comment-display" ng-controller="commentsCtr" class="ng-scope" ng-cloak>
  2. <div class="panel-body js-list">
  3. <div class="article-reply-item icon-selection" ng-repeat="comment in comment_list">
  4. <div class="media">
  5. <div class="media-left">
  6. <a href="javascript:;">
  7. <img class="media-object reply-logo user-avatar" src="{{comment.avatar || './resource/images/nopic-user.png'}}"/>
  8. </a>
  9. </div>
  10. <div class="media-body">
  11. <h4 class="media-heading reply-people">{{comment.username}}</h4>
  12. <p class="reply-content">{{comment.content}}</p>
  13. <p class="reply-time">{{comment.createtime}}</p>
  14. </div>
  15. <!--<a href="javascript:;" ng-click="replyarticle(comment)" ng-if="reply" class="color-default">回复</a>-->
  16. <div class="media-right" style="cursor: pointer">
  17. <i class="fa fa-thumbs-o-up" ng-click="likeComment(comment)"></i>
  18. </div>
  19. <div class="media-right" style="padding-left: 4px">
  20. <span class="comment-sum-like">{{comment.like_num}}</span>
  21. </div>
  22. </div>
  23. <div class="reply-list" ng-if="comment.replys">
  24. <div class="reply-item" ng-repeat="reply in comment.replys">
  25. <div class="reply-item-head">
  26. {{reply.username}}
  27. </div>
  28. <div class="reply-item-content">
  29. {{reply.content}}
  30. </div>
  31. </div>
  32. </div>
  33. <div class="reply-editor" ng-if="reply" ng-show="comment.replying">
  34. <div class="reply-editor-head">
  35. 回复该评论
  36. </div>
  37. <div class="reply-editor-content">
  38. <textarea ng-model="comment.replycontent" cols="30" rows="10" class="form-control replaycontent" contenteditable></textarea>
  39. </div>
  40. <div class="reply-editor-action we7-margin-top">
  41. <button class="btn btn-primary" ng-click="send(comment)">发送</button>
  42. <button class="btn btn-default" ng-click="cancel(comment)">取消</button>
  43. </div>
  44. </div>
  45. </div>
  46. </div>
  47. <div class="text-right we7-padding js-pager" ng-show="pager!=''"></div>
  48. </div>
  49. <script>
  50. angular.module('articleApp').value('config', {
  51. do: "{$do}",
  52. comment_status: "{$comment_status}",
  53. like_comment_url: "{php echo url('article/notice-show/like_comment')}",
  54. get_comments_url: "{php echo url('article/notice-show/more_comments', array('id' => $id, 'order' => $order))}",
  55. reply_url: "{php echo url('article/notice/reply_comment', array('id' => $id))}",
  56. });
  57. angular.bootstrap($('#js-article-comment-display'), ['articleApp']);
  58. </script>