last_activity.html 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. {% load i18n misago_capture %}
  2. {% if category.acl.can_browse %}
  3. {% if not category.acl.can_see_all_threads %}
  4. <p class="category-thread-message">
  5. <span class="material-icon">
  6. info_outline
  7. </span>
  8. {% trans "This category is private. You can see only your own threads within it." %}
  9. </p>
  10. {% elif category.last_thread_title %}
  11. {% capture trimmed as thread %}
  12. <a href="{{ category.get_last_thread_url }}" class="item-title thread-title">{{ category.last_thread_title }}</a>
  13. {% endcapture %}
  14. {% capture trimmed as user %}
  15. {% if category.last_poster_id %}
  16. <a href="{% url 'misago:user' slug=category.last_poster_slug pk=category.last_poster_id %}" class="poster-title">{{ category.last_poster_name }}</a>
  17. {% else %}
  18. <span class="poster-title">{{ category.last_poster_name }}</span>
  19. {% endif %}
  20. {% endcapture %}
  21. {% capture trimmed as date %}
  22. <a href="{{ category.get_last_post_url }}" class="last-title" title="{{ category.last_post_on|date:'DATETIME_FORMAT' }}">{{ category.last_post_on|date }}</a>
  23. {% endcapture %}
  24. <p class="category-last-post">
  25. {% blocktrans trimmed with thread=thread|safe user=user|safe date=date|safe %}
  26. Last post in {{ thread }} by {{ user }} {{ date }}
  27. {% endblocktrans %}
  28. </p>
  29. {% else %}
  30. <p class="category-thread-message">
  31. <span class="material-icon">
  32. error_outline
  33. </span>
  34. {% trans "This category is empty." %}
  35. </p>
  36. {% endif %}
  37. {% else %}
  38. <p class="category-thread-message">
  39. <span class="material-icon">
  40. highlight_off
  41. </span>
  42. {% trans "This category is protected. You can't browse it's contents." %}
  43. </p>
  44. {% endif %}