123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196 |
- {% extends "misago/base.html" %}
- {% load humanize i18n misago_avatars misago_stringutils %}
- {% block title %}{{ thread }}{% if page.number > 1 %} ({% blocktrans with page=page.number %}Page {{ page }}{% endblocktrans %}){% endif %} | {{ block.super }}{% endblock title %}
- {% block meta-description %}{% if thread.first_post.is_valid %}{{ thread.first_post.short|striplinebreaks }} {% endif %}{% blocktrans trimmed with replies=thread.replies started=thread.started_on|date last_post=thread.last_post_on|date count counter=thread.replies %}
- {{ replies }} reply since {{ started }}. Last post on {{ last_post }}.
- {% plural %}
- {{ replies }} replies since {{ started }}. Last post on {{ last_post }}.
- {% endblocktrans %}{% 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 %}
- <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 id="thread-title">{{ thread }}</h1>
- <ul class="list-inline page-details">
- {% block page-details %}
- <li class="tooltip-bottom" title="{% trans "Thread author" %}">
- {% if thread.starter_id %}
- <a href="{% url USER_PROFILE_URL user_slug=thread.starter_slug user_id=thread.starter_id %}">
- <img src="{{ thread.starter_id|avatar:20 }}" alt="{% trans "Avatar" %}"> {{ thread.starter_name }}
- </a>
- {% else %}
- <span class="fa fa-user"></span> {{ thread.starter_name }}
- {% endif %}
- <li>
- <li>
- <span class="fa fa-comment"></span> {% blocktrans trimmed with replies=thread.replies|intcomma count counter=thread.replies %}
- {{ replies }} reply
- {% plural %}
- {{ replies }} replies
- {% endblocktrans %}
- <li>
- <li class="tooltip-bottom" title="{% blocktrans with last_post=thread.last_post_on %}Last post from {{ last_post }}{% endblocktrans %}">
- <span class="fa fa-clock-o"></span>
- <abbr class="dynamic time-ago" data-timestamp="{{ thread.last_post_on|date:"c" }}">
- {{ thread.last_post_on|date }}
- </abbr>
- </li>
- {% endblock page-details %}
- </ul>
- </div>
- </div>
- <div class="container">
- <div class="table-actions">
- {% block thread-nav %}
- {% include "misago/thread/pagination.html" %}
- {% if thread.acl.can_review and thread.has_moderated_posts %}
- <button type="button" class="btn btn-default btn-show-moderated">
- <span class="fa fa-question-circle fa-fw fa-lg"></span>
- {% trans "Unapproved posts" %}
- </button>
- {% endif %}
- {% if thread.acl.can_see_reports and thread.has_reported_posts %}
- <button type="button" class="btn btn-default btn-show-reported">
- <span class="fa fa-exclamation-triangle fa-fw fa-lg"></span>
- {% trans "Reported posts" %}
- </button>
- {% endif %}
- {% endblock thread-nav %}
- {% block thread-actions %}
- {% if thread_actions %}
- {% include "misago/thread/thread_actions.html" %}
- {% endif %}
- {% endblock thread-actions %}
- </div>
- <div class="posts-list">
- {% for post in posts %}
- {% include "misago/thread/post.html" %}
- {% endfor %}
- </div>
- <div class="table-actions">
- {% block thread-nav-down %}
- {% include "misago/thread/pagination.html" %}
- {% endblock thread-nav-down %}
- {% block post-actions %}
- {% if posts_actions %}
- {% include "misago/thread/posts_actions.html" %}
- {% endif %}
- {% endblock post-actions %}
- </div>
- <div class="reply-to-thread text-center">
- {% if thread_reply_message %}
- <p class="lead">
- <span class="fa fa-ban fa-fw fa-lg"></span>
- {{ thread_reply_message }}
- </p>
- {% else %}
- <button type="button" class="btn btn-success btn-lg">
- <span class="fa fa-plus-circle fa-fw fa-lg"></span>
- {% trans "Reply to thread" %}
- </button>
- {% endif %}
- </div>
- </div>
- </div>
- <div id="reply-form-placeholder"></div>
- {% endblock %}
- {% block javascripts %}
- {{ block.super }}
- <script lang="JavaScript">
- $(function() {
- Misago.Onebox.activate($('.post-body'));
- });
- </script>
- {% if user.is_authenticated %}
- {% include "misago/thread/actions_js.html" %}
- {% if forum.acl.can_hide_events %}
- {% include "misago/thread/events_js.html" %}
- {% endif %}
- {% if thread.acl.can_review and thread.has_moderated_posts %}
- <script lang="JavaScript">
- $(function() {
- $('.btn-show-moderated').click(function() {
- Misago.Modal.get("{{ thread.get_moderated_url }}");
- });
- });
- </script>
- {% endif %}
- {% if thread.acl.can_see_reports and thread.has_reported_posts %}
- <script lang="JavaScript">
- $(function() {
- $('.btn-show-reported').click(function() {
- Misago.Modal.get("{{ thread.get_reported_url }}");
- });
- });
- </script>
- {% endif %}
- {% if thread.acl.can_reply %}
- <script lang="JavaScript">
- $(function() {
- Misago.reply_thread = function(extra_on_load) {
- if (extra_on_load == undefined) {
- extra_on_load = function() {};
- }
- Misago.Posting.load({
- api_url: "{{ thread.get_reply_api_url }}",
- on_load: function() {
- $('.reply-to-thread').hide();
- extra_on_load();
- },
- on_cancel: function() {
- $('.reply-to-thread').show();
- }
- });
- }
- $('.reply-to-thread button').click(function() {
- if (!Misago.Posting.is_open()) {
- Misago.reply_thread();
- }
- });
- });
- </script>
- {% endif %}
- {% endif %}
- {% endblock javascripts %}
|