hidden_message.html 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. {% load i18n misago_avatars misago_capture %}
  2. {% if post.hidden_by_name %}
  3. {% capture trimmed as hidden_by %}
  4. {% if post.hidden_by_id %}
  5. <a class="user-avatar" href="{% url USER_PROFILE_URL user_slug=post.hidden_by_slug user_id=post.hidden_by_id %}">
  6. <img src="{{ post.hidden_by_id|avatar:32 }}" alt="{% trans "User avatar" %}">
  7. </a>
  8. <a class="item-title" href="{% url USER_PROFILE_URL user_slug=post.hidden_by_slug user_id=post.hidden_by_id %}">{{ post.hidden_by_name }}</a>
  9. {% else %}
  10. <span class="user-avatar">
  11. <img src="{% blankavatar 32 %}" alt="{% trans "User avatar" %}">
  12. </span>
  13. <strong class="item-title">{{ post.hidden_by_name }}</strong>
  14. {% endif %}
  15. {% endcapture %}
  16. {% capture trimmed as hidden_on %}
  17. <abbr class="tooltip-top dynamic time-ago" title="{{ post.hidden_on }}" data-timestamp="{{ post.hidden_on|date:"c" }}">
  18. {{ post.hidden_on|date }}
  19. </abbr>
  20. {% endcapture %}
  21. {% if post.id == thread.first_post_id %}
  22. {% blocktrans trimmed with user=hidden_by|safe date=hidden_on|safe %}
  23. This thread was hidden by {{ user }} {{ date }}.
  24. {% endblocktrans %}
  25. {% else %}
  26. {% blocktrans trimmed with user=hidden_by|safe date=hidden_on|safe %}
  27. This post was hidden by {{ user }} {{ date }}.
  28. {% endblocktrans %}
  29. {% endif %}
  30. {% else %}
  31. {% if post.id == thread.first_post_id %}
  32. {% trans "This thread is hidden. Only it's author and moderators can see it." %}
  33. {% else %}
  34. {% trans "This post is hidden. Only it's author and moderators can see it." %}
  35. {% endif %}
  36. {% endif %}