heartbeat-stream.html.twig 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. {#
  2. /**
  3. * @file heartbeat-stream.html.twig
  4. * Default theme implementation to present Heartbeat stream data.
  5. *
  6. * This template is used when viewing Heartbeat stream pages.
  7. *
  8. *
  9. * Available variables:
  10. * - content: A list of content items. Use 'content' to print all content, or
  11. * - attributes: HTML attributes for the container element.
  12. *
  13. * @see template_preprocess_heartbeat_stream()
  14. *
  15. * @ingroup themeable
  16. */
  17. #}
  18. <div class="heartbeat-stream">
  19. {% if content %}
  20. {{- content -}}
  21. {% endif %}
  22. {% autoescape false %}
  23. {% for message in messages %}
  24. <div{{ attributes.addClass('heartbeat-message') }} id="heartbeat-{{ message.id }}">
  25. {#{{ message }}#}
  26. <div class="heartbeat-message-wrap">
  27. <div class="heartbeat-owner">
  28. <a href="/user/{{ message.userId }}"><img src="{{ message.userPicture }}" />
  29. {{ message.userName }}
  30. </a>
  31. {{ message.user }}
  32. <div class="time-ago">{{ message.timeAgo }}</div>
  33. </div>
  34. <div class="heartbeat-content hid-{{ message.id }}">
  35. {{ message.heartbeat }}
  36. </div>
  37. </div>
  38. <div class="heartbeat-interaction-wrap">
  39. <div class="heartbeat-like">
  40. {{ message.likeFlag }}
  41. </div>
  42. <div class="heartbeat-unlike">
  43. {{ message.unlikeFlag }}
  44. </div>
  45. <div class="heartbeat-comment-button">
  46. {% if message.commentCount > 1 %}
  47. {{ message.commentCount }} comments
  48. {% elseif message.commentCount == 1 %}
  49. {{ message.commentCount }} comment
  50. {% else %}
  51. Comment
  52. {% endif %}
  53. </div>
  54. <div class="heartbeat-comment" id="comment-{{ message.id }}">
  55. {{ message.commentForm }}
  56. <div class="heartbeat-comments">
  57. {% for comment in message.comments %}
  58. <div id="heartbeat-comment-{{ comment.id }}">
  59. <span class="comment-owner">{{ comment.owner }}
  60. <span class="comment-username">{{ comment.username }}</span><br>
  61. <span class="comment-ago">{{ comment.timeAgo }}</span>
  62. <span class="comment-like">{{ comment.commentLike}}</span></span>
  63. <span class="comment-body">{{ comment.body }}</span>
  64. <span class ="sub-comment">
  65. {% for subComment in comment.subComments %}
  66. <div class="heartbeat-subcomment" id="sub-comment-{{ subComment.id }}">
  67. <span class="sub-comment-owner">{{ subComment.owner }}
  68. <span class="sub-comment-username">{{ subComment.username }}</span><br>
  69. <span class="sub-comment-ago">{{ subComment.timeAgo }}</span>
  70. <span class="sub-comment-like">{{ subComment.commentLike}}</span></span>
  71. <span class="sub-comment-body">{{ subComment.body }}</span>
  72. </div>
  73. {% endfor %}
  74. {{ comment.reply }}
  75. </span>
  76. </div>
  77. {% endfor %}
  78. </div>
  79. </div>
  80. </div>
  81. </div>
  82. {% endfor %}
  83. {% endautoescape %}
  84. </div>