123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 |
- {% extends "misago/threads/base.html" %}
- {% load i18n misago_stringutils %}
- {% block title %}{{ forum }}{% if page.number > 1 %} ({% blocktrans with page=page.number %}Page {{ page }}{% endblocktrans %}){% endif %} | {{ block.super }}{% endblock title %}
- {% block meta-description %}{{ forum.description|striplinebreaks }}{% endblock meta-description %}
- {% block content %}
- <div{% if forum.css %} class="page-{{ forum.css_class }}"{% endif %}>
- <div class="page-header">
- <div class="container">
- {% if path %}
- <ol class="breadcrumb">
- {% for crumb in path|slice:":-1" %}
- <li>
- <a href="{{ crumb.get_absolute_url }}">{{ crumb }}</a>{% if not forloop.last %}<span class="fa fa-chevron-right"></span>{% endif %}
- </li>
- {% endfor %}
- </ol>
- {% endif %}
- <h1>{{ forum }}</h1>
- </div>
- </div>
- {{ block.super }}
- </div>
- {% endblock content %}
- {% block threads-list %}
- {% if forum.description %}
- <div class="lead">
- {{ forum.description|escape|urlize|linebreaks }}
- </div>
- {% endif %}
- {% if forum.subforums %}
- {% include "misago/forums/subforums.html" with category=forum %}
- {% endif %}
- {{ block.super }}
- {% endblock threads-list %}
- {% block threads-panel %}
- <div class="table-actions">
- {% include "misago/threads/paginator.html" %}
- {% if user.is_authenticated %}
- {% include "misago/threads/sort.html" %}
- {% include "misago/threads/show.html" %}
- {% endif %}
- {% if threads_actions %}
- {% include "misago/threads/actions.html" %}
- {% endif %}
- {% include "misago/threads/start_btn.html" %}
- </div>
- {{ block.super }}
- <div class="table-actions">
- {% include "misago/threads/paginator.html" %}
- {% include "misago/threads/start_btn.html" %}
- {% if not forum.is_read and user.is_authenticated %}
- <form action="{% url 'misago:read_forum' forum_id=forum.id %}" method="POST" class="pull-right">
- {% csrf_token %}
- <button type="submit" class="btn btn-default">
- <span class="fa fa-circle-o fa-fw"></span>
- {% trans "Mark threads as read" %}
- </button>
- </form>
- {% endif %}
- </div>
- {% endblock threads-panel %}
- {% block no-threads %}
- {% if filtering.is_active %}
- {% trans "No threads matching criteria exist, or you don't have permission to see them." %}
- <a href="{{ forum.get_absolute_url }}" class="btn btn-primary">
- {% trans "See all threads" %}
- </a>
- {% else %}
- {% trans "No threads were posted in this forum, or you don't have permission to see them." %}
- {% endif %}
- {% endblock no-threads %}
- {% block javascripts %}
- {{ block.super }}
- {% include "misago/forums/js.html" %}
- {% if threads_actions %}
- {% include "misago/threads/actions_js.html" %}
- {% endif %}
- {% if forum.acl.can_start_threads %}
- <script lang="JavaScript">
- $(function() {
- $('.btn-reply').click(function() {
- var $btn = $(this);
- Misago.Posting.load({
- api_url: "{% url 'misago:start_thread' forum_id=forum.id %}"
- });
- });
- });
- </script>
- {% endif %}
- {% endblock javascripts %}
|