You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
1.5 KiB

  1. <ul class="comments">
  2. {% for comment in comments %}
  3. <li class="comment">
  4. <div class="comment-thumbnail">
  5. <a href="{{ url_for('.user', username=comment.author.username) }}">
  6. <img class="img-rounded profile-thumbnail" src="{{ comment.author.gravatar(size=40) }}">
  7. </a>
  8. </div>
  9. <div class="comment-content">
  10. <div class="comment-date">{{ moment(comment.timestamp).fromNow() }}</div>
  11. <div class="comment-author"><a href="{{ url_for('.user', username=comment.author.username) }}">{{ comment.author.username }}</a></div>
  12. <div class="comment-body">
  13. {% if comment.disabled %}
  14. <p><i>This comment has been disabled by a moderator.</i></p>
  15. {% endif %}
  16. {% if moderate or not comment.disabled %}
  17. {% if comment.body_html %}
  18. {{ comment.body_html | safe }}
  19. {% else %}
  20. {{ comment.body }}
  21. {% endif %}
  22. {% endif %}
  23. </div>
  24. {% if moderate %}
  25. <br>
  26. {% if comment.disabled %}
  27. <a class="btn btn-default btn-xs" href="{{ url_for('.moderate_enable', id=comment.id, page=page) }}">Enable</a>
  28. {% else %}
  29. <a class="btn btn-danger btn-xs" href="{{ url_for('.moderate_disable', id=comment.id, page=page) }}">Disable</a>
  30. {% endif %}
  31. {% endif %}
  32. </div>
  33. </li>
  34. {% endfor %}
  35. </ul>