thread.html 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. {% extends "misago/base.html" %}
  2. {% load i18n %}
  3. {% block title %}
  4. {% if paginator.page > 1 %}
  5. {{ thread.title }} ({% blocktrans with page=paginator.page %}page: {{ page }}{% endblocktrans %}) | {{ category.name }} | {{ block.super }}
  6. {% else %}
  7. {{ thread.title }} | {{ category.name }} | {{ block.super }}
  8. {% endif %}
  9. {% endblock title %}
  10. {% block og-title %}{{ thread.title }}{% endblock %}
  11. {% block og-description %}
  12. {% blocktrans trimmed with starter=thread.starter_name started_on=thread.started_on|date category=category.name %}
  13. Started by {{ starter }} on {{ started_on }} in the {{ category }} category.
  14. {% endblocktrans %} {% blocktrans trimmed count replies=thread.replies with last_post_on=thread.last_post_on|date %}
  15. {{ replies }} reply, last one from {{ last_post_on }}.
  16. {% plural %}
  17. {{ replies }} replies, last one from {{ last_post_on }}.
  18. {% endblocktrans %}
  19. {% endblock og-description %}
  20. {% block og-url %}
  21. {{ SITE_ADDRESS }}{{ thread.get_absolute_url }}
  22. {% endblock og-url %}
  23. {% block meta-extra %}
  24. {% if paginator.page > 1 %}
  25. <link rel="canonical" href="{% url url_name slug=thread.slug pk=thread.pk page=paginator.page %}" />
  26. {% else %}
  27. <link rel="canonical" href="{% url url_name slug=thread.slug pk=thread.pk %}" />
  28. {% endif %}
  29. {% if paginator.previous > 1 %}
  30. <link rel="prev" href="{% url url_name slug=thread.slug pk=thread.pk page=paginator.previous %}" />
  31. {% elif paginator.first %}
  32. <link rel="prev" href="{% url url_name slug=thread.slug pk=thread.pk %}" />
  33. {% endif %}
  34. {% if paginator.next %}
  35. <link rel="next" href="{% url url_name slug=thread.slug pk=thread.pk page=paginator.next %}" />
  36. {% endif %}
  37. {% endblock meta-extra %}
  38. {% block content %}
  39. <div class="page page-thread {% if category.css_class %}page-thread-{{ category.css_class }}{% endif %}">
  40. <div class="page-header-bg">
  41. <div class="page-header">
  42. {% include "misago/thread/breadcrumbs.html" %}
  43. <div class="container">
  44. <h1>{{ thread.title }}</h1>
  45. </div>
  46. {% include "misago/thread/stats.html" %}
  47. </div>
  48. </div>
  49. <div class="container">
  50. {% include "misago/thread/toolbar-top.html" %}
  51. {% if thread.poll %}
  52. {% include "misago/poll/index.html" with poll=thread.poll %}
  53. {% endif %}
  54. {% include "misago/thread/posts/index.html" %}
  55. {% include "misago/thread/paginator.html" %}
  56. </div>
  57. </div>
  58. {% endblock content %}