|
@@ -25,110 +25,71 @@
|
|
|
|
|
|
{% if threads %}
|
|
|
{{ pager() }}
|
|
|
- <div class="forum-threads-list watched-threads">
|
|
|
- <div class="header">
|
|
|
- <div class="row-fluid">
|
|
|
- <div class="span7">{% trans %}Thread{% endtrans %}</div>
|
|
|
- <div class="span5 thread-activity">
|
|
|
- <div class="thread-replies">{% trans %}Activity{% endtrans %}</div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- {% for thread in threads %}
|
|
|
- <div id="watch-{{ loop.index }}" class="thread-row{% if not thread.is_read %} thread-new{% endif %}{% if loop.last %} thread-last{% endif %}">
|
|
|
- <div class="row-fluid">
|
|
|
- <div class="span7">
|
|
|
+ <div class="forum-threads-list-new watched-threads">
|
|
|
+ <ul>
|
|
|
+ {% for thread in threads %}
|
|
|
+ <li id="watch-{{ loop.index }}"{% if not thread.is_read %} class="thread-new"{% endif %}>
|
|
|
+ <div class="thread-icon">
|
|
|
+ {% if thread.weight == 2 %}
|
|
|
{% if thread.is_read %}
|
|
|
- <a href="{{ thread_url(thread, 'new') }}" class="thread-icon thread-icon-last tooltip-top" title="{% trans %}Click to see last post{% endtrans %}"><i class="icon-circle-blank"></i></a>
|
|
|
+ <a href="{{ thread_url(thread, 'new') }}" class="thread-icon thread-icon-last tooltip-top" title="{% trans %}Announcement, click to see last post{% endtrans %}">
|
|
|
{% else %}
|
|
|
- <a href="{{ thread_url(thread, 'new') }}" class="thread-icon thread-icon-new tooltip-top" title="{% trans %}Click to see first unread post{% endtrans %}"><i class="icon-circle"></i></a>
|
|
|
+ <a href="{{ thread_url(thread, 'new') }}" class="thread-icon thread-icon-new tooltip-top" title="{% trans %}Announcement, click to see first unread post{% endtrans %}">
|
|
|
{% endif %}
|
|
|
-
|
|
|
- {{ macros.thread_flags(thread) }}
|
|
|
-
|
|
|
- <a href="{{ thread_url(thread) }}" class="thread-name">{{ thread.name }}</a>
|
|
|
-
|
|
|
- <div class="thread-details">
|
|
|
- {% trans user=thread_starter(thread), forum=thread_forum(thread), start=thread.start|reltimesince|low %}by {{ user }} in {{ forum }} {{ start }}{% endtrans %}
|
|
|
- </div>
|
|
|
-
|
|
|
- </div>
|
|
|
- <div class="span5 thread-activity">
|
|
|
- {% if settings.avatars_on_threads_list %}
|
|
|
- <div 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(40) }}" alt=""></a>
|
|
|
- {% else %}
|
|
|
- <img src="{{ macros.avatar_guest(40) }}" alt="" class="user-avatar">
|
|
|
- {% endif %}
|
|
|
- </div>
|
|
|
+ <i class="icon-star{% if thread.is_read %}-empty{% endif %}"></i>
|
|
|
+ </a>
|
|
|
+ {% elif thread.weight == 1 %}
|
|
|
+ {% if thread.is_read %}
|
|
|
+ <a href="{{ thread_url(thread, 'new') }}" class="thread-icon thread-icon-last tooltip-top" title="{% trans %}Pinned, click to see last post{% endtrans %}">
|
|
|
+ {% else %}
|
|
|
+ <a href="{{ thread_url(thread, 'new') }}" class="thread-icon thread-icon-new tooltip-top" title="{% trans %}Pinned, click to see first unread post{% endtrans %}">
|
|
|
{% endif %}
|
|
|
-
|
|
|
- <div class="thread-replies">
|
|
|
- <strong class="lead">{{ thread_reply(thread) }}, {{ thread.last|reldate|low }}</strong><br>
|
|
|
- {{ replies(thread.replies) }}, <span{% if (thread.upvotes-thread.downvotes) > 0 %} class="text-success"{% elif (thread.upvotes-thread.downvotes) < 0 %} class="text-error"{% endif %}><strong>{% if (thread.upvotes-thread.downvotes) > 0 %}+{% elif (thread.upvotes-thread.downvotes) < 0 %}-{% endif %}</strong>{% trans rating=(thread.upvotes-thread.downvotes)|abs|intcomma %}{{ rating }} thread rating{% endtrans %}</span>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="thread-options">
|
|
|
+ <i class="icon-bookmark{% if thread.is_read %}-empty{% endif %}"></i>
|
|
|
+ </a>
|
|
|
+ {% else %}
|
|
|
+ {% if thread.is_read %}
|
|
|
+ <a href="{{ thread_url(thread, 'new') }}" class="thread-icon thread-icon-last tooltip-top" title="{% trans %}Click to see last post{% endtrans %}">
|
|
|
+ {% else %}
|
|
|
+ <a href="{{ thread_url(thread, 'new') }}" class="thread-icon thread-icon-new tooltip-top" title="{% trans %}Click to see first unread post{% endtrans %}">
|
|
|
+ {% endif %}
|
|
|
+ <i class="icon-circle{% if thread.is_read %}-blank{% endif %}"></i>
|
|
|
+ </a>
|
|
|
+ {% endif %}
|
|
|
+ </div>
|
|
|
+ <div class="thread-body">
|
|
|
+ <div class="thread-actions">
|
|
|
<form action="{% if thread.send_email %}{{ thread_url(thread, 'unwatch_email') }}{% else %}{{ thread_url(thread, 'watch_email') }}{% endif %}" method="post">
|
|
|
<input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
|
|
|
<input type="hidden" name="retreat" value="{{ request_path }}#watch-{{ loop.index }}">
|
|
|
- <button type="submit" class="btn btn-{% if thread.send_email %}success{% else %}inverse{% endif %} tooltip-top" title="{% if thread.send_email %}{% trans %}Don't notify with e-mail{% endtrans %}{% else %}{% trans %}Notify with e-mail{% endtrans %}{% endif %}"><i class="icon-envelope"></i></button>
|
|
|
+ <button type="submit" class="btn{% if thread.send_email %} btn-success{% endif %} tooltip-top" title="{% if thread.send_email %}{% trans %}Click to don't notify with e-mail{% endtrans %}{% else %}{% trans %}Click to notify with e-mail{% endtrans %}{% endif %}"><i class="icon-envelope-alt"></i> {% if thread.send_email %}{% trans %}Notify{% endtrans %}{% else %}{% trans %}Notify{% endtrans %}{% endif %}</button>
|
|
|
</form>
|
|
|
|
|
|
<form action="{{ thread_url(thread, 'unwatch') }}" method="post">
|
|
|
<input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
|
|
|
<input type="hidden" name="retreat" value="{{ delete_retreat(loop) }}">
|
|
|
- <button type="submit" class="btn btn-danger tooltip-top" title="{% trans %}Unwatch{% endtrans %}"><i class="icon-remove"></i></button>
|
|
|
+ <button type="submit" class="btn btn-danger tooltip-top" title="{% trans %}Click to remove from list{% endtrans %}"><i class="icon-remove"></i> {% trans %}Unwatch{% endtrans %}</button>
|
|
|
</form>
|
|
|
</div>
|
|
|
+ <div class="thread-title">
|
|
|
+ <a href="{{ thread_url(thread) }}">{{ thread.name }}</a>
|
|
|
+ </div>
|
|
|
+ <ul class="thread-details">
|
|
|
+ <li><a href="{{ thread.forum.url }}" class="forum-link">{{ thread.forum }}</a></li>
|
|
|
+ <li>{% trans user=thread_starter(thread), start=thread.start|reldate|low %}Started by {{ user }}, {{ start }}{% endtrans %}</li>
|
|
|
+ {% if thread.replies %}
|
|
|
+ <li><i class="icon-comments-alt"></i> {% trans count=thread.replies, replies=thread.replies|intcomma, user=thread_reply(thread), last=thread.last|reldate|low -%}
|
|
|
+ {{ replies }} reply, by {{ user }} {{ last }}
|
|
|
+ {%- pluralize -%}
|
|
|
+ {{ replies }} replies, last by {{ user }} {{ last }}
|
|
|
+ {%- endtrans %}</li>
|
|
|
+ {% else %}
|
|
|
+ <li><i class="icon-comments-alt"></i> {% trans %}No replies{% endtrans %}</li>
|
|
|
+ {% endif %}
|
|
|
+ </ul>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- {% endfor %}
|
|
|
- {#<table class="table">
|
|
|
- <thead>
|
|
|
- <tr>
|
|
|
- <th>{% trans %}Thread{% endtrans %}</th>
|
|
|
- <th colspan="2" class="span5">{% trans %}Activity{% endtrans %}</th>
|
|
|
- </tr>
|
|
|
- </thead>
|
|
|
- <tbody>
|
|
|
- {% for thread in threads %}
|
|
|
- <tr id="watch-{{ loop.index }}">
|
|
|
- <td>
|
|
|
- <a href="{{ thread_url(thread, 'new') }}" 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="{{ thread_url(thread) }}" class="thread-name">{{ thread.name }}</a>
|
|
|
- <span class="thread-details">
|
|
|
- {% trans user=thread_starter(thread), forum=thread_forum(thread), start=thread.start|reltimesince|low %}by {{ user }} in {{ forum }} {{ start }}{% endtrans %}
|
|
|
- </span>
|
|
|
- </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>
|
|
|
- <td class="watched-thread-flags">
|
|
|
- <form action="{{ thread_url(thread, 'unwatch') }}" method="post">
|
|
|
- <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
|
|
|
- <input type="hidden" name="retreat" value="{{ delete_retreat(loop) }}">
|
|
|
- <button type="submit" class="btn btn-danger tooltip-top" title="{% trans %}Unwatch{% endtrans %}"><i class="icon-remove"></i></button>
|
|
|
- </form>
|
|
|
-
|
|
|
- <form action="{% if thread.send_email %}{{ thread_url(thread, 'unwatch_email') }}{% else %}{{ thread_url(thread, 'watch_email') }}{% endif %}" method="post">
|
|
|
- <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
|
|
|
- <input type="hidden" name="retreat" value="{{ request_path }}#watch-{{ loop.index }}">
|
|
|
- <button type="submit" class="btn btn-{% if thread.send_email %}success{% else %}inverse{% endif %} tooltip-top" title="{% if thread.send_email %}{% trans %}Don't notify with e-mail{% endtrans %}{% else %}{% trans %}Notify with e-mail{% endtrans %}{% endif %}"><i class="icon-envelope"></i></button>
|
|
|
- </form>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- {% endfor %}
|
|
|
- </tbody>
|
|
|
- </table>#}
|
|
|
+ </li>
|
|
|
+ {% endfor %}
|
|
|
+ </ul>
|
|
|
</div>
|
|
|
{{ pager() }}
|
|
|
{% else %}
|
|
@@ -153,22 +114,10 @@
|
|
|
{%- endif -%}
|
|
|
{%- endmacro %}
|
|
|
|
|
|
-{% macro replies(thread_replies) -%}
|
|
|
-{% trans count=thread_replies, replies=('<strong>' ~ (thread_replies|intcomma) ~ '</strong>')|safe -%}
|
|
|
-{{ replies }} reply
|
|
|
-{%- pluralize -%}
|
|
|
-{{ replies }} replies
|
|
|
-{%- endtrans %}
|
|
|
-{%- endmacro %}
|
|
|
-
|
|
|
{% macro thread_starter(thread) -%}
|
|
|
{% if thread.start_poster_id %}<a href="{{ url('user', user=thread.start_poster_id, username=thread.start_poster_slug) }}" class="user-link">{{ thread.start_poster_name }}</a>{% else %}{{ thread.start_poster_name }}{% endif %}
|
|
|
{%- endmacro %}
|
|
|
|
|
|
-{% macro thread_forum(thread) -%}
|
|
|
-<a href="{{ thread.forum.url }}" class="forum-link">{{ thread.forum }}</a>
|
|
|
-{%- endmacro %}
|
|
|
-
|
|
|
{% macro thread_reply(thread) -%}
|
|
|
{% if thread.last_poster_id %}<a href="{{ url('user', user=thread.last_poster_id, username=thread.last_poster_slug) }}" class="user-link">{{ thread.last_poster_name }}</a>{% else %}{{ thread.last_poster_name }}{% endif %}
|
|
|
{%- endmacro %}
|