123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170 |
- {% extends "misago/base.html" %}
- {% load humanize i18n misago_avatars misago_dates misago_shorthands %}
- {% block content %}
- <div class="container">
- {% block threads-list %}
- <div class="threads-list">
- {% block threads-panel %}
- <div class="table-panel">
- <ul class="list-group">
- {% for thread in threads %}
- <li class="list-group-item {{ thread.is_read|iffalse:"new" }}">
- <div class="row">
- <div class="col-md-7">
- {% if thread.is_pinned %}
- {% if thread.is_read %}
- <span class="thread-icon tooltip-top fa fa-star-o fa-lg fa-fw" title="{% trans "Pinned, has no unread posts" %}"></span>
- {% else %}
- <span class="thread-icon tooltip-top fa fa-star fa-lg fa-fw" title="{% trans "Pinned, has unread posts" %}"></span>
- {% endif %}
- {% else %}
- {% if thread.is_read %}
- <span class="thread-icon tooltip-top fa fa-circle-thin fa-lg fa-fw" title="{% trans "Thread has no unread posts" %}"></span>
- {% else %}
- <span class="thread-icon tooltip-top fa fa-circle fa-lg fa-fw" title="{% trans "Thread has unread posts" %}"></span>
- {% endif %}
- {% endif %}
- {% if thread.is_read %}
- <a href="{{ thread.get_absolute_url }}" class="item-title">
- {% else %}
- <a href="{{ thread.get_new_reply_url }}" class="item-title">
- {% endif %}
- {{ thread }}
- </a>
- </div>
- {% block thread-extra %}
- <div class="col-md-5 thread-stats">
- {% if threads_actions %}
- <a href="#" class="thread-check">
- <span class="fa fa-check"></span>
- <input type="checkbox" form="threads-actions" name="item" value="{{ thread.pk }}"{% if thread.pk in selected_threads %}checked="checked"{% endif %}>
- </a>
- {% endif %}
- {% block thread-stats %}
- <a href="{{ thread.get_last_reply_url }}" class="last-post">
- <span class="dynamic time-ago-compact tooltip-top" data-timestamp="{{ thread.last_post_on|date:"c" }}" title="{% blocktrans with last_post=thread.last_post_on|date:"DATETIME_FORMAT" %}Last post from {{ last_post }}{% endblocktrans %}">{{ thread.last_post_on|compact_date|lower }}</span>
- </a>
- {% if thread.last_poster_id %}
- <a href="{% url USER_PROFILE_URL user_slug=thread.last_poster_slug user_id=thread.last_poster_id %}" class="thread-author tooltip-top" title="{% blocktrans with user=thread.last_poster_name %}Last post by {{ user }}{% endblocktrans %}">
- <img src="{{ thread.last_poster_id|avatar:25 }}" alt="{% trans "Avatar" %}" class="avatar">
- </a>
- {% else %}
- <span class="thread-author tooltip-top" title="{% blocktrans with user=thread.last_poster_name %}Last post by {{ user }}{% endblocktrans %}">
- <img src="{% blankavatar 25 %}" alt="{% trans "Avatar" %}" class="avatar">
- </span>
- {% endif %}
- {% if thread.is_read %}
- <div class="thread-replies thread-read">
- <a href="{{ thread.get_new_reply_url }}" class="tooltip-top" title="{% blocktrans trimmed with replies=thread.replies|intcomma count counter=thread.replies %}{{ replies }} reply{% plural %}{{ replies }} replies{% endblocktrans %}">
- {{ thread.replies|intcomma }}
- </a>
- </div>
- {% elif thread.is_new %}
- <div class="thread-replies new-replies">
- <a href="{{ thread.get_new_reply_url }}" class="label label-success tooltip-top" title="{% blocktrans trimmed with replies=thread.replies|intcomma count counter=thread.replies %}New thread with {{ replies }} reply{% plural %}New thread with {{ replies }} replies{% endblocktrans %}">
- <span class="fa fa-plus-circle fa-fw"></span>
- {{ thread.replies|default:1|intcomma }}
- </a>
- </div>
- {% else %}
- <div class="thread-replies new-replies">
- <a href="{{ thread.get_new_reply_url }}" class="label label-primary tooltip-top" title="{% blocktrans trimmed with replies=thread.unread_replies|intcomma count counter=thread.unread_replies %}{{ replies }} unread reply{% plural %}{{ replies }} unread replies{% endblocktrans %}">
- <span class="fa fa-signal fa-fw"></span>
- {{ thread.unread_replies|intcomma }}
- </a>
- </div>
- {% endif %}
- {% if show_threads_locations %}
- <div class="thread-location tooltip-top" title="{% trans "Thread location" %}">
- <span class="fa fa-reorder fa-lg"></span>
- <a href="{{ thread.forum.get_absolute_url }}">{{ thread.forum }}</a>
- </div>
- {% endif %}
- <ul class="list-unstyled thread-flags">
- {% if thread.has_reported_posts %}
- <li class="tooltip-top" title="{% trans "Reported posts" %}">
- <span class="fa fa-exclamation-triangle fa-fw fa-lg"></span>
- </li>
- {% endif %}
- {% if thread.has_moderated_posts and not thread.is_moderated and thread.forum_id in user.acl.moderated_forums %}
- <li class="tooltip-top" title="{% trans "Moderated posts" %}">
- <button type="button" class="btn-show-moderated" data-moderated-url="{{ thread.get_moderated_url }}">
- <span class="fa fa-question-circle fa-fw fa-lg"></span>
- </button>
- </li>
- {% endif %}
- {% if thread.is_poll %}
- <li class="tooltip-top" title="{% trans "Poll" %}">
- <span class="fa fa-bar-chart-o fa-fw fa-lg"></span>
- </li>
- {% endif %}
- {% if thread.is_moderated %}
- <li class="tooltip-top" title="{% trans "Moderated" %}">
- <button type="button" class="btn-show-moderated" data-moderated-url="{{ thread.get_moderated_url }}">
- <span class="fa fa-question-circle fa-fw fa-lg"></span>
- </button>
- </li>
- {% endif %}
- {% if thread.is_closed %}
- <li class="tooltip-top" title="{% trans "Closed" %}">
- <span class="fa fa-lock fa-fw fa-lg"></span>
- </li>
- {% endif %}
- {% if thread.is_hidden %}
- <li class="tooltip-top" title="{% trans "Hidden" %}">
- <span class="fa fa-eye-slash fa-fw fa-lg"></span>
- </li>
- {% endif %}
- {% if thread.label %}
- <li>
- <span class="label label-solo label-{{ thread.label.css_class|default:"default" }}">
- {{ thread.label }}
- </span>
- </li>
- {% endif %}
- </ul>
- {% endblock thread-stats %}
- </div>
- {% endblock thread-extra %}
- </div>
- </li>
- {% empty %}
- <li class="list-group-item message-row">
- {% block no-threads %}{% endblock no-threads %}
- </li>
- {% endfor %}
- </ul>
- </div>
- {% endblock threads-panel %}
- </div>
- {% endblock threads-list %}
- </div>
- <div id="reply-form-placeholder"></div>
- {% endblock content %}
- {% block javascripts %}
- {{ block.super }}
- {% if user.acl.moderated_forums %}
- <script lang="JavaScript">
- $(function() {
- $('.btn-show-moderated').click(function() {
- Misago.Modal.get($(this).data('moderated-url'));
- });
- });
- </script>
- {% endif %}
- {% endblock javascripts %}
|