123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136 |
- {% extends "misago/base.html" %}
- {% load humanize i18n misago_avatars misago_dates %}
- {% 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{% if not thread.is_read %} new{% endif %}">
- <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 %}
- <a href="{{ thread.get_absolute_url }}" class="item-title">
- {{ thread.title }}
- </a>
- </div>
- {% block thread-extra %}
- <div class="col-md-5 thread-stats">
- <a href="#" class="thread-check">
- <span class="fa fa-check"></span>
- <input type="checkbox" form="threads-actions" name="thread" value="{{ thread.pk }}"{% if thread.pk in selected_threads %}checked="checked"{% endif %}>
- </a>
- {% block thread-stats %}
- <a href="#" 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">
- <span class="tooltip-top" title="{% blocktrans trimmed with replies=thread.replies|intcomma count counter=thread.replies %}{{ replies }} reply{% plural %}{{ replies }} replies{% endblocktrans %}">
- {{ thread.replies|intcomma }}
- </span>
- </div>
- {% elif thread.is_new %}
- <div class="thread-replies new-replies">
- <span 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|intcomma }}
- </span>
- </div>
- {% else %}
- <div class="thread-replies new-replies">
- <span class="label label-primary tooltip-top" title="{% blocktrans trimmed with replies=thread.unread_replies|intcomma count counter=thread.unread_replies %}{{ replies }} new reply{% plural %}{{ replies }} new replies{% endblocktrans %}">
- <span class="fa fa-signal fa-fw"></span>
- {{ thread.unread_replies|intcomma }}
- </span>
- </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 %}
- <li class="tooltip-top" title="{% trans "Moderated posts" %}">
- <span class="fa fa-question-circle fa-fw fa-lg"></span>
- </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" %}">
- <span class="fa fa-question-circle fa-fw fa-lg"></span>
- </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.name }}
- </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>
- {% endblock content %}
|