|
@@ -112,77 +112,87 @@
|
|
|
</div>
|
|
|
|
|
|
<div class="forum-threads-list">
|
|
|
- <table class="table">
|
|
|
- <thead>
|
|
|
- <tr>
|
|
|
- <th>{% trans %}Thread{% endtrans %}</th>
|
|
|
- <th class="span1">{% trans %}Rating{% endtrans %}</th>
|
|
|
- <th class="span5">{% trans %}Activity{% endtrans %}</th>
|
|
|
+ <div class="header">
|
|
|
+ <div class="row-fluid">
|
|
|
+ <div class="span7">{% trans %}Thread{% endtrans %}</div>
|
|
|
+ <div class="span5 thread-activity">
|
|
|
+ <div class="thread-replies">{% trans %}Replies{% endtrans %}</div>
|
|
|
+ <div class="thread-last">{% trans %}Last Reply{% endtrans %}</div>
|
|
|
{% if user.is_authenticated() and list_form %}
|
|
|
- <th class="check-cell"><label class="checkbox"><input type="checkbox" class="checkbox-master"></label></th>
|
|
|
+ <div class="pull-right check-cell">
|
|
|
+ <label class="checkbox"><input type="checkbox" class="checkbox-master"></label>
|
|
|
+ </div>
|
|
|
{% endif %}
|
|
|
- </tr>
|
|
|
- </thead>
|
|
|
- <tbody>
|
|
|
- {% for thread in threads %}
|
|
|
- <tr>
|
|
|
- <td>
|
|
|
- <a href="{% url 'thread_new' thread=thread.pk, slug=thread.slug %}" class="thread-icon{% if not thread.is_read %} thread-new{% endif %} tooltip-top" title="{% if not thread.is_read -%}
|
|
|
- {% trans %}Click to see first unread post{% endtrans %}
|
|
|
- {%- else -%}
|
|
|
- {% trans %}Click to see last post{% endtrans %}
|
|
|
- {%- endif %}"><i class="icon-comment"></i></a>
|
|
|
- <a href="{% url 'thread' thread=thread.pk, slug=thread.slug %}" class="thread-name">{{ thread.name }}</a>
|
|
|
- <span class="thread-details">
|
|
|
- {% trans user=thread_starter(thread), start=thread.start|reltimesince|low %}by {{ user }} {{ start }}{% endtrans %}
|
|
|
- </span>
|
|
|
- <ul class="unstyled thread-flags">
|
|
|
- {% if thread.replies_reported %}
|
|
|
- <li><i class="icon-warning-sign tooltip-top" title="{% trans %}This thread has reported replies{% endtrans %}"></i></li>
|
|
|
- {% endif %}
|
|
|
- {% if thread.replies_moderated %}
|
|
|
- <li><i class="icon-question-sign tooltip-top" title="{% trans %}This thread has unreviewed replies{% endtrans %}"></i></li>
|
|
|
- {% endif %}
|
|
|
- {% if thread.weight == 2 %}
|
|
|
- <li><i class="icon-star tooltip-top" title="{% trans %}This thread is an annoucement{% endtrans %}"></i></li>
|
|
|
- {% endif %}
|
|
|
- {% if thread.weight == 1 %}
|
|
|
- <li><i class="icon-star-empty tooltip-top" title="{% trans %}This thread is sticky{% endtrans %}"></i></li>
|
|
|
- {% endif %}
|
|
|
- {% if thread.moderated %}
|
|
|
- <li><i class="icon-eye-close tooltip-top" title="{% trans %}This thread awaits review{% endtrans %}"></i></li>
|
|
|
- {% endif %}
|
|
|
- {% if thread.deleted %}
|
|
|
- <li><i class="icon-trash tooltip-top" title="{% trans %}This thread is deleted{% endtrans %}"></i></li>
|
|
|
- {% endif %}
|
|
|
- {% if thread.closed %}
|
|
|
- <li><i class="icon-lock tooltip-top" title="{% trans %}This thread is closed{% endtrans %}"></i></li>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ {% for thread in threads %}
|
|
|
+ <div class="thread-row{% if thread.pk == 2 or not thread.is_read %} thread-new{% endif %}{% if loop.last %} thread-last{% endif %}">
|
|
|
+ <div class="row-fluid">
|
|
|
+ <div class="span7">
|
|
|
+ {% if thread.is_read and not thread.pk == 2 %}
|
|
|
+ <a href="{% url 'thread_new' thread=thread.pk, slug=thread.slug %}" class="thread-icon thread-icon-last tooltip-top" title="{% trans %}Click to see last post{% endtrans %}"><i class="icon-asterisk"></i></a>
|
|
|
+ {% else %}
|
|
|
+ <a href="{% url 'thread_new' thread=thread.pk, slug=thread.slug %}" class="thread-icon thread-icon-new tooltip-top" title="{% trans %}Click to see first unread post{% endtrans %}"><i class="icon-fire"></i></a>
|
|
|
+ {% endif %}
|
|
|
+
|
|
|
+ <a href="{% url 'thread' thread=thread.pk, slug=thread.slug %}" class="thread-name">{{ thread.name }}</a>
|
|
|
+ <span class="thread-details">
|
|
|
+ {% trans user=thread_starter(thread), start=thread.start|reldate|low %}by {{ user }}, {{ start }}{% endtrans %}
|
|
|
+ </span>
|
|
|
+
|
|
|
+ <ul class="unstyled thread-flags">
|
|
|
+ {% if thread.replies_reported %}
|
|
|
+ <li><i class="icon-warning-sign tooltip-top" title="{% trans %}This thread has reported replies{% endtrans %}"></i></li>
|
|
|
+ {% endif %}
|
|
|
+ {% if thread.replies_moderated %}
|
|
|
+ <li><i class="icon-question-sign tooltip-top" title="{% trans %}This thread has unreviewed replies{% endtrans %}"></i></li>
|
|
|
+ {% endif %}
|
|
|
+ {% if thread.weight == 2 %}
|
|
|
+ <li><i class="icon-star tooltip-top" title="{% trans %}This thread is an annoucement{% endtrans %}"></i></li>
|
|
|
+ {% endif %}
|
|
|
+ {% if thread.weight == 1 %}
|
|
|
+ <li><i class="icon-star-empty tooltip-top" title="{% trans %}This thread is sticky{% endtrans %}"></i></li>
|
|
|
+ {% endif %}
|
|
|
+ {% if thread.moderated %}
|
|
|
+ <li><i class="icon-eye-close tooltip-top" title="{% trans %}This thread awaits review{% endtrans %}"></i></li>
|
|
|
+ {% endif %}
|
|
|
+ {% if thread.deleted %}
|
|
|
+ <li><i class="icon-trash tooltip-top" title="{% trans %}This thread is deleted{% endtrans %}"></i></li>
|
|
|
+ {% endif %}
|
|
|
+ {% if thread.closed %}
|
|
|
+ <li><i class="icon-lock tooltip-top" title="{% trans %}This thread is closed{% endtrans %}"></i></li>
|
|
|
+ {% endif %}
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ <div class="span5 thread-activity">
|
|
|
+ <div class="thread-replies tooltip-top" title="{{ replies(thread.replies) }}">{{ thread.replies|intcomma }} <i class="icon-comment"></i></div>
|
|
|
+
|
|
|
+ <div class="thread-last-reply">
|
|
|
+ {% if settings.avatars_on_threads_list %}
|
|
|
+ <span class="thread-last-avatar">
|
|
|
+ {% if thread.last_poster_id %}
|
|
|
+ <a href="{% url 'user' user=thread.last_poster.pk, username=thread.last_poster.username_slug %}"><img src="{{ thread.last_poster.get_avatar(30) }}" alt=""></a>
|
|
|
+ {% else %}
|
|
|
+ <img src="{{ macros.avatar_guest(40) }}" alt="" class="user-avatar">
|
|
|
{% endif %}
|
|
|
- </ul>
|
|
|
- </td>
|
|
|
- <td>
|
|
|
- <div class="thread-rating{% if (thread.upvotes-thread.downvotes) > 0 %} thread-rating-positive{% elif (thread.upvotes-thread.downvotes) < 0 %} thread-rating-negative{% endif %}">
|
|
|
- {% if (thread.upvotes-thread.downvotes) > 0 %}+{% elif (thread.upvotes-thread.downvotes) < 0 %}-{% endif %}{{ (thread.upvotes-thread.downvotes)|abs|intcomma }}
|
|
|
- </div>
|
|
|
- </td>
|
|
|
- <td>
|
|
|
- <div class="thread-last-reply">
|
|
|
- {{ replies(thread.replies) }} - {% trans user=thread_reply(thread), last=thread.last|reltimesince|low %}last by {{ user }} {{ last }}{% endtrans %}
|
|
|
- </div>
|
|
|
- </td>
|
|
|
+ </span>
|
|
|
+ {% endif %}
|
|
|
+ {{ thread_reply(thread) }}, {{ thread.last|reldate|low }}
|
|
|
+ </div>
|
|
|
+
|
|
|
{% if user.is_authenticated() and list_form %}
|
|
|
- <td class="check-cell">{% if thread.forum_id == forum.pk %}<label class="checkbox"><input form="threads_form" name="{{ list_form['list_items']['html_name'] }}" type="checkbox" class="checkbox-member" value="{{ thread.pk }}"{% if list_form['list_items']['has_value'] and ('' ~ thread.pk) in list_form['list_items']['value'] %} checked="checked"{% endif %}></label>{% else %} {% endif %}</td>
|
|
|
+ <label class="thread-select checkbox"><input form="threads_form" name="{{ list_form['list_items']['html_name'] }}" type="checkbox" class="checkbox-member" value="{{ thread.pk }}"{% if list_form['list_items']['has_value'] and ('' ~ thread.pk) in list_form['list_items']['value'] %} checked="checked"{% endif %}></label>
|
|
|
{% endif %}
|
|
|
- </tr>
|
|
|
- {% else %}
|
|
|
- <tr>
|
|
|
- <td colspan="4" class="threads-list-empty">
|
|
|
- {% trans %}There are no threads in this forum.{% endtrans %}
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- {% endfor %}
|
|
|
- </tbody>
|
|
|
- </table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ {% else %}
|
|
|
+ <div class="thread-row threads-list-empty">
|
|
|
+ {% trans %}There are no threads in this forum.{% endtrans %}
|
|
|
+ </div>
|
|
|
+ {% endfor %}
|
|
|
+
|
|
|
{% if user.is_authenticated() and list_form %}
|
|
|
<div class="threads-actions">
|
|
|
<form id="threads_form" class="form-inline pull-right" action="{{ request_path }}" method="POST">
|
|
@@ -240,7 +250,7 @@
|
|
|
{%- endmacro %}
|
|
|
|
|
|
{% macro replies(thread_replies) -%}
|
|
|
-{% trans count=thread_replies, replies=('<strong>' ~ (thread_replies|intcomma) ~ '</strong>')|safe -%}
|
|
|
+{% trans count=thread_replies, replies=thread_replies|intcomma -%}
|
|
|
{{ replies }} reply
|
|
|
{%- pluralize -%}
|
|
|
{{ replies }} replies
|
|
@@ -284,7 +294,7 @@
|
|
|
{% endfor %}
|
|
|
{%- if user.is_authenticated() and list_form %}
|
|
|
$('#threads_form').submit(function() {
|
|
|
- if ($('.check-cell[]:checked').length == 0) {
|
|
|
+ if ($('.thread-select[]:checked').length == 0) {
|
|
|
alert("{% trans %}You have to select at least one thread.{% endtrans %}");
|
|
|
return false;
|
|
|
}
|