base.html 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. {% extends "misago/base.html" %}
  2. {% load i18n %}
  3. {% block meta-extra %}
  4. <link rel="canonical" href="{{ REQUEST_PATH }}" />
  5. {% if paginator.previous > 1 %}
  6. <link rel="prev" href="{{ REQUEST_PATH }}?page={{ paginator.previous }}" />
  7. {% elif paginator.first %}
  8. <link rel="prev" href="{{ REQUEST_PATH }}" />
  9. {% endif %}
  10. {% if paginator.next %}
  11. <link rel="next" href="{{ REQUEST_PATH }}?page={{ paginator.next }}" />
  12. {% endif %}
  13. {% endblock meta-extra %}
  14. {% block content %}
  15. <div class="page page-threads page-threads-{{ list_type|default:'all' }} {% spaceless %}
  16. {% block extra-css %}{% endblock extra-css %}
  17. {% endspaceless %}">
  18. {% block page-header %}
  19. {% endblock page-header %}
  20. <div class="container">
  21. {% block list-container %}
  22. {% if subcategories %}
  23. <section class="toolbar">
  24. <ul class="list-inline subcategories-list">
  25. {% for subcategory in subcategories %}
  26. <li>
  27. <a href="{{ subcategory.get_absolute_url }}{% if list_type != 'all' %}{{ list_type }}/{% endif %}" class="subcategory {% if subcategory.css_class %}subcategory-{{ subcategory.css_class }}{% endif %}">
  28. {{ subcategory.name }}
  29. </a>
  30. </li>
  31. {% endfor %}
  32. </ul>
  33. </section>
  34. {% endif %}
  35. <section>
  36. <div class="threads-list ui-ready">
  37. {% block threads-list %}
  38. <ul class="list-group">
  39. {% for thread in threads %}
  40. {% block thread %}
  41. {% include "misago/threadslist/thread.html" %}
  42. {% endblock thread %}
  43. {% empty %}
  44. <li class="list-group-item empty-message">
  45. {% block list-empty-message %}
  46. {% if list_type == 'all' %}
  47. <p class="lead">
  48. {% if category.depth %}
  49. {% trans "There are no threads in this category." %}
  50. {% else %}
  51. {% trans "There are no threads on this forum... yet!" %}
  52. {% endif %}
  53. </p>
  54. <p>
  55. {% trans "Why not start one yourself?" %}
  56. </p>
  57. {% else %}
  58. {% trans "No threads matching specified criteria were found." %}
  59. {% endif %}
  60. {% endblock list-empty-message %}
  61. </li>
  62. {% endfor %}
  63. </ul>
  64. {% endblock threads-list %}
  65. </div>
  66. <noscript>
  67. {% if paginator.pages > 1 %}
  68. <nav>
  69. <ul class="pager">
  70. {% if paginator.previous %}
  71. <li class="previous">
  72. <a href="{{ REQUEST_PATH }}?page={{ paginator.previous }}">
  73. <span aria-hidden="true" class="material-icon">
  74. arrow_back
  75. </span>
  76. </a>
  77. </li>
  78. {% elif paginator.first %}
  79. <li class="previous">
  80. <a href="{{ REQUEST_PATH }}">
  81. <span aria-hidden="true" class="material-icon">
  82. arrow_back
  83. </span>
  84. </a>
  85. </li>
  86. {% endif %}
  87. {% if paginator.next %}
  88. <li class="next">
  89. <a href="{{ REQUEST_PATH }}?page={{ paginator.next }}">
  90. <span aria-hidden="true" class="material-icon">
  91. arrow_forward
  92. </span>
  93. </a>
  94. </li>
  95. {% endif %}
  96. </ul>
  97. </nav>
  98. {% endif %}
  99. </noscript>
  100. </section>
  101. {% endblock list-container %}
  102. </div>
  103. </div>
  104. {% endblock content %}