|
@@ -7,280 +7,407 @@
|
|
|
|
|
|
{% block title %}{{ macros.page_title(title=thread.name,parent=forum.name,page=pagination['page']) }}{% endblock %}
|
|
|
|
|
|
-{% block breadcrumb %}{{ super() }} <span class="divider">/</span></li>
|
|
|
+{% block breadcrumb %}{{ super() }} <span class="divider"><i class="icon-chevron-right"></i></span></li>
|
|
|
{% for parent in parents %}
|
|
|
-<li><a href="{{ parent.type|url(forum=parent.pk, slug=parent.slug) }}">{{ parent.name }}</a> <span class="divider">/</span></li>
|
|
|
+<li><a href="{{ parent.type|url(forum=parent.pk, slug=parent.slug) }}">{{ parent.name }}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
|
|
|
{% endfor %}
|
|
|
<li class="active">{{ thread.name }}
|
|
|
{%- endblock %}
|
|
|
|
|
|
-{% block content %}
|
|
|
-<div class="page-header">
|
|
|
- <ul class="breadcrumb">
|
|
|
- {{ self.breadcrumb() }}</li>
|
|
|
- </ul>
|
|
|
- <h1>{{ thread.name }}</h1>
|
|
|
- <ul class="unstyled thread-info">
|
|
|
- {% if thread.moderated %}<li><i class="icon-eye-close"></i> {% trans %}Not Reviewed{% endtrans %}</li>{% endif %}
|
|
|
- <li><i class="icon-time"></i> {{ thread.last|reltimesince }}</li>
|
|
|
- <li><i class="icon-user"></i> {% if thread.start_poster_id %}<a href="{% url 'user' user=thread.start_poster_id, username=thread.start_poster_slug %}">{{ thread.start_poster_name }}</a>{% else %}{{ thread.start_poster_name }}{% endif %}</li>
|
|
|
- <li><i class="icon-comment"></i> {% if thread.replies > 0 -%}
|
|
|
- {% trans count=thread.replies, replies=thread.replies|intcomma %}One reply{% pluralize %}{{ replies }} replies{% endtrans %}
|
|
|
- {%- else -%}
|
|
|
- {% trans %}No replies{% endtrans %}
|
|
|
- {%- endif %}</li>
|
|
|
- </ul>
|
|
|
+{% block container %}
|
|
|
+<div class="page-header header-primary">
|
|
|
+ <div class="container">
|
|
|
+ {{ messages_list(messages) }}
|
|
|
+ <ul class="breadcrumb">
|
|
|
+ {{ self.breadcrumb() }}</li>
|
|
|
+ </ul>
|
|
|
+ <h1>{{ thread.name }}</h1>
|
|
|
+ <ul class="unstyled header-stats">
|
|
|
+ {% if thread.moderated %}<li><i class="icon-eye-close"></i> {% trans %}Not Reviewed{% endtrans %}</li>{% endif %}
|
|
|
+ <li><i class="icon-time"></i> {{ thread.last|reltimesince }}</li>
|
|
|
+ <li><i class="icon-user"></i> {% if thread.start_poster_id %}<a href="{% url 'user' user=thread.start_poster_id, username=thread.start_poster_slug %}">{{ thread.start_poster_name }}</a>{% else %}{{ thread.start_poster_name }}{% endif %}</li>
|
|
|
+ <li><i class="icon-comment"></i> {% if thread.replies > 0 -%}
|
|
|
+ {% trans count=thread.replies, replies=thread.replies|intcomma %}One reply{% pluralize %}{{ replies }} replies{% endtrans %}
|
|
|
+ {%- else -%}
|
|
|
+ {% trans %}No replies{% endtrans %}
|
|
|
+ {%- endif %}</li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
-{% if message %}{{ macros.draw_message(message) }}{% endif %}
|
|
|
-<div class="list-nav">
|
|
|
- {{ pager() }}
|
|
|
- {% if user.is_authenticated() %}
|
|
|
- <ul class="nav nav-pills pull-right">
|
|
|
- {% if ignored_posts %}
|
|
|
- <li class="discourage"><form action="{% url 'thread_show_hidden' thread=thread.pk, slug=thread.slug %}" class="form-inline" method="post"><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"><button type="submit" class="btn"><i class="icon-eye-open"></i> {% trans %}Show Hidden Replies{% endtrans %}</button></form></li>
|
|
|
+
|
|
|
+<div class="container container-primary">
|
|
|
+ {% if message %}
|
|
|
+ <div class="messages-list">
|
|
|
+ {{ macros.draw_message(message) }}
|
|
|
+ </div>
|
|
|
+ {% endif %}
|
|
|
+
|
|
|
+ <div class="thread-buttons">
|
|
|
+ {{ pager() }}
|
|
|
+ {% if user.is_authenticated() %}
|
|
|
+ {% if acl.threads.can_reply(forum, thread) %}
|
|
|
+ <a href="{% url 'thread_reply' thread=thread.pk, slug=thread.slug %}" class="btn btn-inverse pull-right"><i class="icon-pencil"></i> {% trans %}Reply{% endtrans %}</a>
|
|
|
{% endif %}
|
|
|
{% if watcher %}
|
|
|
+ <form action="{% url 'thread_unwatch' thread=thread.pk, slug=thread.slug %}" class="form-inline pull-right" method="post"><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"><input type="hidden" name="retreat" value="{{ request_path }}"><button type="submit" class="btn btn-success tooltip-top" title="{% trans %}Remove thread from watched list{% endtrans %}"><i class="icon-bookmark"></i></button></form>
|
|
|
{% if watcher.email %}
|
|
|
- <li class="success"><form action="{% url 'thread_unwatch_email' thread=thread.pk, slug=thread.slug %}" method="post"><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"><input type="hidden" name="retreat" value="{{ request_path }}"><button type="submit" class="btn tooltip-top" title="{% trans %}Don't e-mail me anymore if anyone replies to this thread{% endtrans %}"><i class="icon-envelope"></i></button></form></li>
|
|
|
+ <form action="{% url 'thread_unwatch_email' thread=thread.pk, slug=thread.slug %}" class="form-inline pull-right" method="post"><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"><input type="hidden" name="retreat" value="{{ request_path }}"><button type="submit" class="btn btn-success tooltip-top" title="{% trans %}Don't e-mail me anymore if anyone replies to this thread{% endtrans %}"><i class="icon-envelope"></i></button></form>
|
|
|
{% else %}
|
|
|
- <li class="info"><form action="{% url 'thread_watch_email' thread=thread.pk, slug=thread.slug %}" method="post"><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"><input type="hidden" name="retreat" value="{{ request_path }}"><button type="submit" class="btn tooltip-top" title="{% trans %}E-mail me if anyone replies{% endtrans %}"><i class="icon-envelope"></i></button></form></li>
|
|
|
+ <form action="{% url 'thread_watch_email' thread=thread.pk, slug=thread.slug %}" class="form-inline pull-right" method="post"><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"><input type="hidden" name="retreat" value="{{ request_path }}"><button type="submit" class="btn tooltip-top" title="{% trans %}E-mail me if anyone replies{% endtrans %}"><i class="icon-envelope"></i></button></form>
|
|
|
{% endif %}
|
|
|
- <li class="success"><form action="{% url 'thread_unwatch' thread=thread.pk, slug=thread.slug %}" method="post"><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"><input type="hidden" name="retreat" value="{{ request_path }}"><button type="submit" class="btn tooltip-top" title="{% trans %}Remove thread from watched list{% endtrans %}"><i class="icon-bookmark"></i></button></form></li>
|
|
|
{% else %}
|
|
|
- <li class="info"><form action="{% url 'thread_watch_email' thread=thread.pk, slug=thread.slug %}" method="post"><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"><input type="hidden" name="retreat" value="{{ request_path }}"><button type="submit" class="btn tooltip-top" title="{% trans %}Add thread to watched list and e-mail me if anyone replies{% endtrans %}"><i class="icon-envelope"></i></button></form></li>
|
|
|
- <li class="info"><form action="{% url 'thread_watch' thread=thread.pk, slug=thread.slug %}" method="post"><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"><input type="hidden" name="retreat" value="{{ request_path }}"><button type="submit" class="btn tooltip-top" title="{% trans %}Add thread to watched list{% endtrans %}"><i class="icon-bookmark"></i></button></form></li>
|
|
|
+ <form action="{% url 'thread_watch' thread=thread.pk, slug=thread.slug %}" class="form-inline pull-right" method="post"><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"><input type="hidden" name="retreat" value="{{ request_path }}"><button type="submit" class="btn tooltip-top" title="{% trans %}Add thread to watched list{% endtrans %}"><i class="icon-bookmark"></i></button></form>
|
|
|
+ <form action="{% url 'thread_watch_email' thread=thread.pk, slug=thread.slug %}" class="form-inline pull-right" method="post"><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"><input type="hidden" name="retreat" value="{{ request_path }}"><button type="submit" class="btn tooltip-top" title="{% trans %}Add thread to watched list and e-mail me if anyone replies{% endtrans %}"><i class="icon-envelope"></i></button></form>
|
|
|
{% endif %}
|
|
|
- {% if acl.threads.can_reply(forum, thread) %}
|
|
|
- <li class="primary"><a href="{% url 'thread_reply' thread=thread.pk, slug=thread.slug %}"><i class="icon-pencil"></i> {% trans %}Reply{% endtrans %}</a></li>
|
|
|
+ {% if ignored_posts %}
|
|
|
+ <form action="{% url 'thread_show_hidden' thread=thread.pk, slug=thread.slug %}" class="form-inline pull-right" method="post"><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"><button type="submit" class="btn"><i class="icon-eye-open"></i> {% trans %}Show Hidden Replies{% endtrans %}</button></form>
|
|
|
{% endif %}
|
|
|
- </ul>
|
|
|
- {% endif %}
|
|
|
-</div>
|
|
|
+ {% endif %}
|
|
|
+ </div>
|
|
|
|
|
|
-<div class="posts-list">
|
|
|
- {% for post in posts %}
|
|
|
- <div id="post-{{ post.pk }}"></div>
|
|
|
- {% if post.message %}{{ macros.draw_message(post.message) }}{% endif %}
|
|
|
- {% if post.deleted and not acl.threads.can_see_deleted_posts(forum) %}
|
|
|
- <div id="post-{{ post.pk }}" class="well well-post well-post-deleted{% if post.user and post.user.rank and post.user.rank.style %} {{ post.user.rank.style }}{% endif %}">
|
|
|
- <div class="post-author">
|
|
|
- <div class="post-bit">
|
|
|
+ <div class="thread-body">
|
|
|
+ {% for post in posts %}
|
|
|
+ <div id="post-{{ post.pk }}" class="post-wrapper">
|
|
|
+ {% if post.message %}
|
|
|
+ <div class="messages-list">
|
|
|
+ {{ macros.draw_message(post.message) }}
|
|
|
+ </div>
|
|
|
+ {% endif %}
|
|
|
+ {% if post.deleted and not acl.threads.can_see_deleted_posts(forum) %}
|
|
|
+ <div class="post-body post-muted">
|
|
|
{% if post.user_id %}
|
|
|
- <a href="{% url 'user' user=post.user.pk, username=post.user.username_slug %}" class="lead">{{ post.user.username }}</a>
|
|
|
+ <a href="{% url 'user' user=post.user.pk, username=post.user.username_slug %}"><img src="{{ post.user.get_avatar(50) }}" alt="" class="user-avatar"></a>
|
|
|
{% else %}
|
|
|
- <span class="lead">{{ post.user_name }}</span>
|
|
|
+ <img src="{{ macros.avatar_guest(60) }}" alt="" class="user-avatar"></a>
|
|
|
{% endif %}
|
|
|
+ <div class="post-arrow"></div>
|
|
|
+ <div class="post-content">
|
|
|
+ <div class="post-header">
|
|
|
+ <div class="post-header-compact">
|
|
|
+ {% if post.user_id %}
|
|
|
+ <a href="{% url 'user' user=post.user.pk, username=post.user.username_slug %}" class="post-author">{{ post.user.username }}</a>{% if post.user.get_title() %} <span class="label post-author-label{% if post.user.rank and post.user.rank.style %} post-label-{{ post.user.rank.style }}{% endif %}">{{ post.user.get_title() }}</span>{% endif %}
|
|
|
+ {% else %}
|
|
|
+ <span class="post-author">{{ post.user_name }}</span> <span class="label post-author-label post-label-guest">{% trans %}Unregistered{% endtrans %}</span>
|
|
|
+ {% endif %}
|
|
|
+ <span class="separator">–</span>
|
|
|
+ <a href="{% if pagination['page'] > 1 -%}
|
|
|
+ {% url 'thread' thread=thread.pk, slug=thread.slug, page=pagination['page'] %}
|
|
|
+ {%- else -%}
|
|
|
+ {% url 'thread' thread=thread.pk, slug=thread.slug %}
|
|
|
+ {%- endif %}#post-{{ post.pk }}" class="post-date">{{ post.date|reltimesince }}</a>
|
|
|
+ {% if post.edits %}
|
|
|
+ <span class="separator">–</span>
|
|
|
+ {% if acl.threads.can_see_changelog(user, forum, post) %}
|
|
|
+ <a href="{% url 'changelog' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="post-changelog tooltip-bottom" title="{% trans %}Show changelog{% endtrans %}">{% trans count=post.edits %}One edit{% pluralize %}{{ count }} edits{% endtrans %}</a>
|
|
|
+ {% else %}
|
|
|
+ <span class="post-changelog">{% trans count=post.edits %}One edit{% pluralize %}{{ count }} edits{% endtrans %}</span>
|
|
|
+ {% endif %}
|
|
|
+ {% endif %}
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <a href="{% if pagination['page'] > 1 -%}
|
|
|
+ {% url 'thread' thread=thread.pk, slug=thread.slug, page=pagination['page'] %}
|
|
|
+ {%- else -%}
|
|
|
+ {% url 'thread' thread=thread.pk, slug=thread.slug %}
|
|
|
+ {%- endif %}#post-{{ post.pk }}" class="post-perma tooltip-left" title="{% trans %}Direct link to this post{% endtrans %}">#{{ pagination['start'] + loop.index }}</a>
|
|
|
+
|
|
|
+ {% if 1 ==1 or not post.is_read %}
|
|
|
+ <div class="post-extra">
|
|
|
+ <span class="label label-warning">
|
|
|
+ {% trans %}New{% endtrans %}
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ {% endif %}
|
|
|
+
|
|
|
+ </div>
|
|
|
+ <div class="post-message">
|
|
|
+ {% trans user=edit_user(post), date=post.edit_date|reltimesince|low %}{{ user }} has deleted this reply {{ date }}{% endtrans %}
|
|
|
+ </div>
|
|
|
+ </dv>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="post-extra">
|
|
|
- <a href="{% if pagination['page'] > 1 -%}
|
|
|
- {% url 'thread' thread=thread.pk, slug=thread.slug, page=pagination['page'] %}
|
|
|
- {%- else -%}
|
|
|
- {% url 'thread' thread=thread.pk, slug=thread.slug %}
|
|
|
- {%- endif %}#post-{{ post.pk }}" class="post-perma pull-right tooltip-left" title="{% trans %}Direct link to this post{% endtrans %}">#{{ pagination['start'] + loop.index }}</a>
|
|
|
- </div>
|
|
|
- <div class="post-content">
|
|
|
- {% trans user=edit_user(post), date=post.edit_date|reltimesince|low %}{{ user }} has deleted this reply {{ date }}{% endtrans %}
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- {% elif post.ignored %}
|
|
|
- <div class="well well-post well-post-deleted{% if post.user and post.user.rank and post.user.rank.style %} {{ post.user.rank.style }}{% endif %}">
|
|
|
- <div class="post-author">
|
|
|
- <div class="post-bit">
|
|
|
- <span class="lead">{% trans %}Hidden Reply{% endtrans %}</span>
|
|
|
+ {% elif post.ignored %}
|
|
|
+ <div class="post-body post-muted">
|
|
|
+ <img src="{{ macros.avatar_guest(60) }}" alt="" class="user-avatar"></a>
|
|
|
+ <div class="post-arrow"></div>
|
|
|
+ <div class="post-content">
|
|
|
+ <div class="post-header">
|
|
|
+ <div class="post-header-compact">
|
|
|
+ <a href="{% if pagination['page'] > 1 -%}
|
|
|
+ {% url 'thread' thread=thread.pk, slug=thread.slug, page=pagination['page'] %}
|
|
|
+ {%- else -%}
|
|
|
+ {% url 'thread' thread=thread.pk, slug=thread.slug %}
|
|
|
+ {%- endif %}#post-{{ post.pk }}" class="post-date">{{ post.date|reltimesince }}</a>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <a href="{% if pagination['page'] > 1 -%}
|
|
|
+ {% url 'thread' thread=thread.pk, slug=thread.slug, page=pagination['page'] %}
|
|
|
+ {%- else -%}
|
|
|
+ {% url 'thread' thread=thread.pk, slug=thread.slug %}
|
|
|
+ {%- endif %}#post-{{ post.pk }}" class="post-perma tooltip-left" title="{% trans %}Direct link to this post{% endtrans %}">#{{ pagination['start'] + loop.index }}</a>
|
|
|
+
|
|
|
+ {% if not post.is_read %}
|
|
|
+ <div class="post-extra">
|
|
|
+ <span class="label label-warning">
|
|
|
+ {% trans %}New{% endtrans %}
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ {% endif %}
|
|
|
+
|
|
|
+ </div>
|
|
|
+ <div class="post-message">
|
|
|
+ {% trans %}This reply was posted by user that is on your ignored list.{% endtrans %}
|
|
|
+ </div>
|
|
|
+ </dv>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="post-extra">
|
|
|
- <a href="{% if pagination['page'] > 1 -%}
|
|
|
- {% url 'thread' thread=thread.pk, slug=thread.slug, page=pagination['page'] %}
|
|
|
- {%- else -%}
|
|
|
- {% url 'thread' thread=thread.pk, slug=thread.slug %}
|
|
|
- {%- endif %}#post-{{ post.pk }}" class="post-perma pull-right tooltip-left" title="{% trans %}Direct link to this post{% endtrans %}">#{{ pagination['start'] + loop.index }}</a>
|
|
|
- </div>
|
|
|
- <div class="post-content">
|
|
|
- {% trans %}This reply was posted by user that is on your ignored list.{% endtrans %}
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- {% else %}
|
|
|
- <div id="post-{{ post.pk }}" class="well well-post{% if post.user and post.user.rank and post.user.rank.style %} {{ post.user.rank.style }}{% endif %}">
|
|
|
- <div class="post-author">
|
|
|
- <img src="{% if post.user_id %}{{ post.user.get_avatar(80) }}{% else %}{{ macros.avatar_guest(80) }}{% endif %}" alt="" class="avatar-normal">
|
|
|
- <div class="post-bit">
|
|
|
+ {% else %}
|
|
|
+ <div class="post-body">
|
|
|
{% if post.user_id %}
|
|
|
- <a href="{% url 'user' user=post.user.pk, username=post.user.username_slug %}" class="lead">{{ post.user.username }}</a>
|
|
|
- {% if post.user.get_title() %}<p class="user-title">{{ _(post.user.get_title()) }}</p>{% endif %}
|
|
|
+ <a href="{% url 'user' user=post.user.pk, username=post.user.username_slug %}"><img src="{{ post.user.get_avatar(100) }}" alt="" class="user-avatar"></a>
|
|
|
{% else %}
|
|
|
- <span class="lead">{{ post.user_name }}</span>
|
|
|
- <p class="user-title">{% trans %}Unregistered{% endtrans %}</p>
|
|
|
- {% endif %}
|
|
|
- <p class="post-date">{{ post.date|reltimesince|low }}</p>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="post-extra">
|
|
|
- {% if user.is_authenticated() and posts_form %}
|
|
|
- <label class="checkbox post-checkbox"><input form="posts_form" name="{{ posts_form['list_items']['html_name'] }}" type="checkbox" class="checkbox-member" value="{{ post.pk }}"{% if posts_form['list_items']['has_value'] and ('' ~ post.pk) in posts_form['list_items']['value'] %} checked="checked"{% endif %}></label>
|
|
|
- {% endif %}
|
|
|
- <a href="{% if pagination['page'] > 1 -%}
|
|
|
- {% url 'thread' thread=thread.pk, slug=thread.slug, page=pagination['page'] %}
|
|
|
- {%- else -%}
|
|
|
- {% url 'thread' thread=thread.pk, slug=thread.slug %}
|
|
|
- {%- endif %}#post-{{ post.pk }}" class="post-perma pull-right tooltip-left" title="{% trans %}Direct link to this post{% endtrans %}">#{{ pagination['start'] + loop.index }}</a>
|
|
|
- {% if not post.is_read %}
|
|
|
- <span class="label label-warning pull-right">
|
|
|
- {% trans %}New{% endtrans %}
|
|
|
- </span>
|
|
|
- {% endif %}
|
|
|
- {% if post.moderated %}
|
|
|
- <span class="label label-purple pull-right">
|
|
|
- {% trans %}Unreviewed{% endtrans %}
|
|
|
- </span>
|
|
|
- {% endif %}
|
|
|
- {% if post.reported %}
|
|
|
- <span class="label label-important pull-right">
|
|
|
- {% trans %}Reported{% endtrans %}
|
|
|
- </span>
|
|
|
- {% endif %}
|
|
|
- {% if post.deleted %}
|
|
|
- <span class="label label-inverse pull-right">
|
|
|
- {% trans %}Deleted{% endtrans %}
|
|
|
- </span>
|
|
|
- {% endif %}
|
|
|
- {% if post.protected and acl.threads.can_protect(forum) %}
|
|
|
- <span class="label label-info pull-right">
|
|
|
- {% trans %}Protected{% endtrans %}
|
|
|
- </span>
|
|
|
- {% endif %}
|
|
|
- {% if acl.threads.can_see_post_score(forum) %}
|
|
|
- <ul class="nav nav-pills post-rating pull-right">
|
|
|
- {% if user.is_authenticated() and user.pk != post.user_id and acl.threads.can_upvote_posts(forum) %}
|
|
|
- <li{% if post.karma_vote and post.karma_vote.score > 0 %} class="active"{% endif %}><form action="{% url 'post_upvote' thread=thread.pk, slug=thread.slug, post=post.pk %}" method="post"><button type="submit" class="btn btn-upvote"{% if post.karma_vote and post.karma_vote.score > 0 %} disabled="disabled"{% endif %}><i class="icon-thumbs-up"></i></button><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"></form></li>
|
|
|
- {% endif %}
|
|
|
- <li><{% if acl.threads.can_see_post_votes(forum) %}a href="{% url 'post_votes' thread=thread.pk, slug=thread.slug, post=post.pk %}"{% else %}span{% endif %} class="label{% if (post.upvotes - post.downvotes) > 0 %} label-success{% elif (post.upvotes - post.downvotes) < 0 %} label-important{% endif %}{% if acl.threads.can_see_post_score(forum) == 2 %} tooltip-left{% endif %}"{% if acl.threads.can_see_post_score(forum) == 2 %} title="+{{ post.upvotes }} / -{{ post.downvotes }}"{% endif %}>{% if (post.upvotes - post.downvotes) > 0 %}+{% endif %}{{ post.upvotes - post.downvotes }}</{% if acl.threads.can_see_post_votes(forum) %}a{% else %}span{% endif %}></li>
|
|
|
- {% if user.is_authenticated() and user.pk != post.user_id and acl.threads.can_downvote_posts(forum) %}
|
|
|
- <li{% if post.karma_vote and post.karma_vote.score < 0 %} class="active"{% endif %}><form action="{% url 'post_downvote' thread=thread.pk, slug=thread.slug, post=post.pk %}" method="post"><button type="submit" class="btn btn-downvote"{% if post.karma_vote and post.karma_vote.score < 0 %} disabled="disabled"{% endif %}><i class="icon-thumbs-down"></i></button><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"></form></li>
|
|
|
+ <img src="{{ macros.avatar_guest(100) }}" alt="" class="user-avatar"></a>
|
|
|
{% endif %}
|
|
|
- </ul>
|
|
|
- {% endif %}
|
|
|
- </div>
|
|
|
- <div class="post-content">
|
|
|
- <div class="markdown">
|
|
|
- {{ post.post_preparsed|markdown_final|safe }}
|
|
|
- </div>
|
|
|
- {% if post.user.signature %}
|
|
|
- <div class="post-foot">
|
|
|
- {% if post.user.signature %}
|
|
|
- <div class="signature">
|
|
|
- <div class="markdown">
|
|
|
- {{ post.user.signature_preparsed|markdown_final|safe }}
|
|
|
+ <div class="post-arrow"></div>
|
|
|
+ <div class="post-content">
|
|
|
+ <div class="post-header">
|
|
|
+ {% if post.user_id %}
|
|
|
+ <a href="{% url 'user' user=post.user.pk, username=post.user.username_slug %}" class="post-author">{{ post.user.username }}</a>{% if post.user.get_title() %} <span class="label post-author-label{% if post.user.rank and post.user.rank.style %} post-label-{{ post.user.rank.style }}{% endif %}">{{ post.user.get_title() }}</span>{% endif %}
|
|
|
+ {% else %}
|
|
|
+ <span class="post-author">{{ post.user_name }}</span> <span class="label post-author-label post-label-guest">{% trans %}Unregistered{% endtrans %}</span>
|
|
|
+ {% endif %}
|
|
|
+ <span class="separator">–</span>
|
|
|
+ <a href="{% if pagination['page'] > 1 -%}
|
|
|
+ {% url 'thread' thread=thread.pk, slug=thread.slug, page=pagination['page'] %}
|
|
|
+ {%- else -%}
|
|
|
+ {% url 'thread' thread=thread.pk, slug=thread.slug %}
|
|
|
+ {%- endif %}#post-{{ post.pk }}" class="post-date">{{ post.date|reltimesince }}</a>
|
|
|
+ {% if post.edits %}
|
|
|
+ <span class="separator">–</span>
|
|
|
+ {% if acl.threads.can_see_changelog(user, forum, post) %}
|
|
|
+ <a href="{% url 'changelog' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="post-changelog tooltip-bottom" title="{% trans %}Show changelog{% endtrans %}">{% trans count=post.edits %}One edit{% pluralize %}{{ count }} edits{% endtrans %}</a>
|
|
|
+ {% else %}
|
|
|
+ <span class="post-changelog">{% trans count=post.edits %}One edit{% pluralize %}{{ count }} edits{% endtrans %}</span>
|
|
|
+ {% endif %}
|
|
|
+ {% endif %}
|
|
|
+
|
|
|
+ {% if user.is_authenticated() and posts_form %}
|
|
|
+ <label class="checkbox post-checkbox"><input form="posts_form" name="{{ posts_form['list_items']['html_name'] }}" type="checkbox" class="checkbox-member" value="{{ post.pk }}"{% if posts_form['list_items']['has_value'] and ('' ~ post.pk) in posts_form['list_items']['value'] %} checked="checked"{% endif %}></label>
|
|
|
+ {% endif %}
|
|
|
+
|
|
|
+ <a href="{% if pagination['page'] > 1 -%}
|
|
|
+ {% url 'thread' thread=thread.pk, slug=thread.slug, page=pagination['page'] %}
|
|
|
+ {%- else -%}
|
|
|
+ {% url 'thread' thread=thread.pk, slug=thread.slug %}
|
|
|
+ {%- endif %}#post-{{ post.pk }}" class="post-perma tooltip-left" title="{% trans %}Direct link to this post{% endtrans %}">#{{ pagination['start'] + loop.index }}</a>
|
|
|
+
|
|
|
+ <div class="post-extra">
|
|
|
+ {% if post.protected and acl.threads.can_protect(forum) %}
|
|
|
+ <span class="label label-info">
|
|
|
+ {% trans %}Protected{% endtrans %}
|
|
|
+ </span>
|
|
|
+ {% endif %}
|
|
|
+
|
|
|
+ {% if post.deleted %}
|
|
|
+ <span class="label label-inverse">
|
|
|
+ {% trans %}Deleted{% endtrans %}
|
|
|
+ </span>
|
|
|
+ {% endif %}
|
|
|
+
|
|
|
+ {% if post.moderated %}
|
|
|
+ <span class="label label-purple">
|
|
|
+ {% trans %}Unreviewed{% endtrans %}
|
|
|
+ </span>
|
|
|
+ {% endif %}
|
|
|
+
|
|
|
+ {% if post.reported %}
|
|
|
+ <span class="label label-important">
|
|
|
+ {% trans %}Reported{% endtrans %}
|
|
|
+ </span>
|
|
|
+ {% endif %}
|
|
|
+
|
|
|
+ {% if not post.is_read %}
|
|
|
+ <span class="label label-warning">
|
|
|
+ {% trans %}New{% endtrans %}
|
|
|
+ </span>
|
|
|
+ {% endif %}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="post-message">
|
|
|
+ <div class="markdown">
|
|
|
+ {{ post.post_preparsed|markdown_final|safe }}
|
|
|
+ </div>
|
|
|
+ {% if post.user.signature %}
|
|
|
+ <div class="post-signature">
|
|
|
+ <div class="markdown">
|
|
|
+ {{ post.user.signature_preparsed|markdown_final|safe }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ {% endif %}
|
|
|
+ </div>
|
|
|
+ <div class="post-footer">
|
|
|
+ {% if acl.threads.can_see_post_score(forum) %}
|
|
|
+ <div class="post-rating">
|
|
|
+ {% if acl.threads.can_see_post_score(forum) == 1 %}
|
|
|
+ <span class="post-score{% if (post.upvotes - post.downvotes) > 0 %} post-score-good{% elif (post.upvotes - post.downvotes) < 0 %} post-score-bad{% endif %}">{{ post.upvotes - post.downvotes }}</span>
|
|
|
+ {% elif acl.threads.can_see_post_score(forum) == 2%}
|
|
|
+ <span class="post-score{% if post.upvotes %} post-score-good{% endif %}">{{ post.upvotes }}</span>
|
|
|
+ {% endif %}
|
|
|
+ {% if user.is_authenticated() and user.pk != post.user_id and acl.threads.can_upvote_posts(forum) %}
|
|
|
+ {% if post.karma_vote and post.karma_vote.score > 0 %}
|
|
|
+ <span class="post-like">{% trans %}Like{% endtrans %}</span>
|
|
|
+ {% else %}
|
|
|
+ <form action="{% url 'post_upvote' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="form-inline" method="post">
|
|
|
+ <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
|
|
|
+ <button type="submit" class="btn btn-link post-like">{% trans %}Like{% endtrans %}</button>
|
|
|
+ </form>
|
|
|
+ {% endif %}
|
|
|
+ {% else %}
|
|
|
+ <span class="post-{% if post.upvotes %}likes{% else %}neutral{% endif %}">{% trans %}Likes{% endtrans %}</span>
|
|
|
+ {% endif %}
|
|
|
+ {% if acl.threads.can_see_post_score(forum) == 2 %}
|
|
|
+ </div>
|
|
|
+ <div class="post-rating">
|
|
|
+ <span class="post-score{% if post.downvotes %} post-score-bad{% endif %}">{{ post.downvotes }}</span>
|
|
|
+ {% endif %}
|
|
|
+ {% if user.is_authenticated() and user.pk != post.user_id and acl.threads.can_downvote_posts(forum) %}
|
|
|
+ {% if post.karma_vote and post.karma_vote.score < 0 %}
|
|
|
+ <span class="post-hate">{% trans %}Hate{% endtrans %}</span>
|
|
|
+ {% else %}
|
|
|
+ <form action="{% url 'post_downvote' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="form-inline" method="post">
|
|
|
+ <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
|
|
|
+ <button type="submit" class="btn btn-link post-hate">{% trans %}Hate{% endtrans %}</button>
|
|
|
+ </form>
|
|
|
+ {% endif %}
|
|
|
+ {% elif acl.threads.can_see_post_score(forum) == 2 %}
|
|
|
+ <span class="post-{% if post.downvotes %}hate{% else %}neutral{% endif %}">{% trans %}Hates{% endtrans %}</span>
|
|
|
+ {% endif %}
|
|
|
+ </div>
|
|
|
+ {% if acl.threads.can_see_post_votes(forum) %}
|
|
|
+ <div class="post-rating">
|
|
|
+ <a href="{% url 'post_votes' thread=thread.pk, slug=thread.slug, post=post.pk %}">{% trans %}Show Votes{% endtrans %}</a>
|
|
|
+ </div>
|
|
|
+ {% endif %}
|
|
|
+ {% endif %}
|
|
|
+
|
|
|
+ {% if user.is_authenticated() %}
|
|
|
+ <div class="post-actions">
|
|
|
+ {% if acl.users.can_see_users_trails() -%}
|
|
|
+ <a href="{% url 'post_info' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="post-trail">{% trans %}Info{% endtrans %}</a>
|
|
|
+ {% endif %}
|
|
|
+ {% if acl.threads.can_edit_thread(user, forum, thread, post) and thread.start_post_id == post.pk %}
|
|
|
+ <a href="{% url 'thread_edit' thread=thread.pk, slug=thread.slug %}" class="post-edit">{% trans %}Edit{% endtrans %}</a>
|
|
|
+ {% elif acl.threads.can_edit_reply(user, forum, thread, post) %}
|
|
|
+ <a href="{% url 'post_edit' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="post-edit">{% trans %}Edit{% endtrans %}</a>
|
|
|
+ {%- endif %}
|
|
|
+ {% if acl.threads.can_reply(forum, thread) %}<a href="{% url 'thread_reply' thread=thread.pk, slug=thread.slug, quote=post.pk %}" class="post-reply">{% trans %}Reply{% endtrans %}</a>{% endif %}
|
|
|
+ </div>
|
|
|
+ {% if post.pk == thread.start_post_id %}
|
|
|
+ <div class="post-actions">
|
|
|
+ {% if acl.threads.can_delete_thread(user, forum, thread, post) == 2 %}
|
|
|
+ <form action="{% url 'thread_delete' thread=thread.pk, slug=thread.slug %}" class="form-inline prompt-delete-thread" method="post">
|
|
|
+ <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
|
|
|
+ <span>{% trans %}Delete thread:{% endtrans %}</span>
|
|
|
+ <button type="submit" class="btn btn-link tooltip-top" title="{% trans %}Delete this thread for good{% endtrans %}">{% trans %}Hard{% endtrans %}</button>
|
|
|
+ </form>
|
|
|
+ {% endif %}
|
|
|
+ {% if not post.deleted and acl.threads.can_delete_thread(user, forum, thread, post) %}
|
|
|
+ <form action="{% url 'thread_hide' thread=thread.pk, slug=thread.slug %}" class="form-inline prompt-delete-thread" method="post">
|
|
|
+ <button type="submit" class="btn btn-link tooltip-top" title="{% trans %}Hide this thread from other users{% endtrans %}">{% trans %}Soft{% endtrans %}</button>
|
|
|
+ <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
|
|
|
+ </form>
|
|
|
+ {% endif %}
|
|
|
+ </div>
|
|
|
+ {% elif post.pk != thread.start_post_id and acl.threads.can_delete_post(user, forum, thread, post) %}
|
|
|
+ <div class="post-actions">
|
|
|
+ {% if acl.threads.can_delete_post(user, forum, thread, post) == 2 -%}
|
|
|
+ <form action="{% url 'post_delete' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="form-inline prompt-delete-post" method="post">
|
|
|
+ <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
|
|
|
+ <span>{% trans %}Delete reply:{% endtrans %}</span>
|
|
|
+ <button type="submit" class="btn btn-link tooltip-top" title="{% trans %}Delete this reply for good{% endtrans %}">{% trans %}Hard{% endtrans %}</button>
|
|
|
+ </form>
|
|
|
+ {% endif %}
|
|
|
+ {% if not post.deleted and acl.threads.can_delete_post(user, forum, thread, post) %}
|
|
|
+ <form action="{% url 'post_hide' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="form-inline prompt-delete-post" method="post">
|
|
|
+ <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
|
|
|
+ <button type="submit" class="btn btn-link tooltip-top" title="{% trans %}Hide this reply from other users{% endtrans %}">{% trans %}Soft{% endtrans %}</button>
|
|
|
+ </form>
|
|
|
+ {% endif %}
|
|
|
+ </div>
|
|
|
+ {% endif %}
|
|
|
+ {% endif %}
|
|
|
</div>
|
|
|
</div>
|
|
|
- {% endif %}
|
|
|
</div>
|
|
|
{% endif %}
|
|
|
</div>
|
|
|
- <div class="post-nav">
|
|
|
- {% if post.edits %}
|
|
|
- {% if acl.threads.can_see_changelog(user, forum, post) %}
|
|
|
- <a href="{% url 'changelog' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="changelog tooltip-bottom" title="{% trans %}Show changelog{% endtrans %}">{% trans count=post.edits %}One edit{% pluralize %}{{ count }} edits{% endtrans %}</a>
|
|
|
- {% else %}
|
|
|
- <span class="changelog">{% trans count=post.edits %}One edit{% pluralize %}{{ count }} edits{% endtrans %}</span>
|
|
|
- {% endif %}
|
|
|
- {% endif %}
|
|
|
- {% if user.is_authenticated() %}
|
|
|
- <ul class="nav nav-pills pull-right">
|
|
|
- {% if post.pk == thread.start_post_id %}
|
|
|
- {% if acl.threads.can_delete_thread(user, forum, thread, post) == 2 -%}
|
|
|
- <li class="tooltip-top" title="{% trans %}Delete this thread for good{% endtrans %}"><form action="{% url 'thread_delete' thread=thread.pk, slug=thread.slug %}" class="prompt-delete-thread" method="post"><button type="submit" class="btn danger"><i class="icon-remove"></i></button><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"></form></li>{% endif %}
|
|
|
- {% if not post.deleted and acl.threads.can_delete_thread(user, forum, thread, post) -%}
|
|
|
- <li><form action="{% url 'thread_hide' thread=thread.pk, slug=thread.slug %}" class="prompt-delete-thread" method="post"><button type="submit" class="btn danger"><i class="icon-trash"></i> {% trans %}Delete{% endtrans %}</button><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"></form></li>{% endif %}
|
|
|
- {% elif post.pk != thread.start_post_id and acl.threads.can_delete_post(user, forum, thread, post) %}
|
|
|
- {% if acl.threads.can_delete_post(user, forum, thread, post) == 2 -%}
|
|
|
- <li class="tooltip-top" title="{% trans %}Delete this reply for good{% endtrans %}"><form action="{% url 'post_delete' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="prompt-delete-post" method="post"><button type="submit" class="btn danger"><i class="icon-remove"></i></button><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"></form></li>{% endif %}
|
|
|
- {% if not post.deleted and acl.threads.can_delete_post(user, forum, thread, post) -%}
|
|
|
- <li><form action="{% url 'post_hide' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="prompt-delete-post" method="post"><button type="submit" class="btn danger"><i class="icon-trash"></i> {% trans %}Delete{% endtrans %}</button><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"></form></li>{% endif %}
|
|
|
- {% endif %}
|
|
|
- {% if acl.users.can_see_users_trails() -%}
|
|
|
- <li><a href="{% url 'post_info' thread=thread.pk, slug=thread.slug, post=post.pk %}"><i class="icon-qrcode"></i> {% trans %}Info{% endtrans %}</a></li>
|
|
|
- {% endif %}
|
|
|
- {% if acl.threads.can_edit_thread(user, forum, thread, post) and thread.start_post_id == post.pk -%}
|
|
|
- <li><a href="{% url 'thread_edit' thread=thread.pk, slug=thread.slug %}"><i class="icon-edit"></i> {% trans %}Edit{% endtrans %}</a></li>
|
|
|
- {% elif acl.threads.can_edit_reply(user, forum, thread, post) %}
|
|
|
- <li><a href="{% url 'post_edit' thread=thread.pk, slug=thread.slug, post=post.pk %}"><i class="icon-edit"></i> {% trans %}Edit{% endtrans %}</a></li>
|
|
|
- {%- endif %}
|
|
|
- {% if acl.threads.can_reply(forum, thread) %}<li><a href="{% url 'thread_reply' thread=thread.pk, slug=thread.slug, quote=post.pk %}"><i class="icon-comment"></i> {% trans %}Reply{% endtrans %}</a></li>{% endif %}
|
|
|
- </ul>
|
|
|
- {% endif %}
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- {% endif %}
|
|
|
- {% if post.checkpoint_set.all() %}
|
|
|
- <div class="post-checkpoints">
|
|
|
- {% for checkpoint in post.checkpoint_set.all() %}
|
|
|
- <div class="checkpoint">
|
|
|
- <hr>
|
|
|
- <span>
|
|
|
- {%- if checkpoint.action == 'limit' -%}
|
|
|
- <i class="icon-lock"></i> {% trans %}This thread has reached its post limit and has been closed.{% endtrans %}
|
|
|
- {%- elif checkpoint.action == 'accepted' -%}
|
|
|
- <i class="icon-ok"></i> {% trans user=checkpoint_user(checkpoint), date=checkpoint.date|reltimesince|low %}{{ user }} accepted this thread {{ date }}{% endtrans %}
|
|
|
- {%- elif checkpoint.action == 'closed' -%}
|
|
|
- <i class="icon-lock"></i> {% trans user=checkpoint_user(checkpoint), date=checkpoint.date|reltimesince|low %}{{ user }} closed this thread {{ date }}{% endtrans %}
|
|
|
- {%- elif checkpoint.action == 'opened' -%}
|
|
|
- <i class="icon-lock"></i> {% trans user=checkpoint_user(checkpoint), date=checkpoint.date|reltimesince|low %}{{ user }} opened this thread {{ date }}{% endtrans %}
|
|
|
- {%- elif checkpoint.action == 'deleted' -%}
|
|
|
- <i class="icon-trash"></i> {% trans user=checkpoint_user(checkpoint), date=checkpoint.date|reltimesince|low %}{{ user }} deleted this thread {{ date }}{% endtrans %}
|
|
|
- {%- elif checkpoint.action == 'undeleted' -%}
|
|
|
- <i class="icon-trash"></i> {% trans user=checkpoint_user(checkpoint), date=checkpoint.date|reltimesince|low %}{{ user }} restored this thread {{ date }}{% endtrans %}
|
|
|
- {%- endif -%}
|
|
|
- </span>
|
|
|
+
|
|
|
+ {% if post.checkpoint_set.all() %}
|
|
|
+ <div class="post-checkpoints">
|
|
|
+ {% for checkpoint in post.checkpoint_set.all() %}
|
|
|
+ <div class="post-checkpoint">
|
|
|
+ <hr>
|
|
|
+ <span>
|
|
|
+ {%- if checkpoint.action == 'limit' -%}
|
|
|
+ <i class="icon-lock"></i> {% trans %}This thread has reached its post limit and has been closed.{% endtrans %}
|
|
|
+ {%- elif checkpoint.action == 'accepted' -%}
|
|
|
+ <i class="icon-ok"></i> {% trans user=checkpoint_user(checkpoint), date=checkpoint.date|reltimesince|low %}{{ user }} accepted this thread {{ date }}{% endtrans %}
|
|
|
+ {%- elif checkpoint.action == 'closed' -%}
|
|
|
+ <i class="icon-lock"></i> {% trans user=checkpoint_user(checkpoint), date=checkpoint.date|reltimesince|low %}{{ user }} closed this thread {{ date }}{% endtrans %}
|
|
|
+ {%- elif checkpoint.action == 'opened' -%}
|
|
|
+ <i class="icon-lock"></i> {% trans user=checkpoint_user(checkpoint), date=checkpoint.date|reltimesince|low %}{{ user }} opened this thread {{ date }}{% endtrans %}
|
|
|
+ {%- elif checkpoint.action == 'deleted' -%}
|
|
|
+ <i class="icon-trash"></i> {% trans user=checkpoint_user(checkpoint), date=checkpoint.date|reltimesince|low %}{{ user }} deleted this thread {{ date }}{% endtrans %}
|
|
|
+ {%- elif checkpoint.action == 'undeleted' -%}
|
|
|
+ <i class="icon-trash"></i> {% trans user=checkpoint_user(checkpoint), date=checkpoint.date|reltimesince|low %}{{ user }} restored this thread {{ date }}{% endtrans %}
|
|
|
+ {%- endif -%}
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ {% endfor %}
|
|
|
</div>
|
|
|
+ {% endif %}
|
|
|
{% endfor %}
|
|
|
</div>
|
|
|
- {% endif %}
|
|
|
- {% endfor %}
|
|
|
-</div>
|
|
|
|
|
|
-{% if user.is_authenticated() and (thread_form or posts_form) %}
|
|
|
-<div class="form-actions table-footer mod-actions">
|
|
|
- {% if thread_form%}
|
|
|
- <form id="thread_form" class="form-inline pull-left" action="{% url 'thread' slug=thread.slug, thread=thread.id, page=pagination['page'] %}" method="POST">
|
|
|
- <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
|
|
|
- <input type="hidden" name="origin" value="thread_form">
|
|
|
- {{ form_theme.input_select(thread_form['thread_action'],width=3) }}
|
|
|
- <button type="submit" class="btn btn-primary">{% trans %}Go{% endtrans %}</button>
|
|
|
- </form>
|
|
|
- {% endif %}
|
|
|
- {% if posts_form%}
|
|
|
- <form id="posts_form" class="form-inline pull-right" action="{% url 'thread' slug=thread.slug, thread=thread.id, page=pagination['page'] %}" method="POST">
|
|
|
- <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
|
|
|
- <input type="hidden" name="origin" value="posts_form">
|
|
|
- {{ form_theme.input_select(posts_form['list_action'],width=3) }}
|
|
|
- <button type="submit" class="btn btn-primary">{% trans %}Go{% endtrans %}</button>
|
|
|
- </form>
|
|
|
+ {% if user.is_authenticated() and (thread_form or posts_form) %}
|
|
|
+ <div class="thread-moderation">
|
|
|
+ {% if thread_form%}
|
|
|
+ <form id="thread_form" class="form-inline pull-left" action="{% url 'thread' slug=thread.slug, thread=thread.id, page=pagination['page'] %}" method="POST">
|
|
|
+ <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
|
|
|
+ <input type="hidden" name="origin" value="thread_form">
|
|
|
+ {{ form_theme.input_select(thread_form['thread_action'],width=3) }}
|
|
|
+ <button type="submit" class="btn btn-danger">{% trans %}Go{% endtrans %}</button>
|
|
|
+ </form>
|
|
|
+ {% endif %}
|
|
|
+ {% if posts_form%}
|
|
|
+ <form id="posts_form" class="form-inline pull-right" action="{% url 'thread' slug=thread.slug, thread=thread.id, page=pagination['page'] %}" method="POST">
|
|
|
+ <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
|
|
|
+ <input type="hidden" name="origin" value="posts_form">
|
|
|
+ {{ form_theme.input_select(posts_form['list_action'],width=3) }}
|
|
|
+ <button type="submit" class="btn btn-danger">{% trans %}Go{% endtrans %}</button>
|
|
|
+ </form>
|
|
|
+ {% endif %}
|
|
|
+ </div>
|
|
|
{% endif %}
|
|
|
-</div>
|
|
|
-{% endif %}
|
|
|
|
|
|
-<div class="list-nav last">
|
|
|
- {{ pager(false) }}
|
|
|
+ <div class="thread-buttons">
|
|
|
+ {{ pager(false) }}
|
|
|
+ {% if user.is_authenticated() and acl.threads.can_reply(forum, thread) %}
|
|
|
+ <a href="{% url 'thread_reply' thread=thread.pk, slug=thread.slug %}" class="btn btn-inverse pull-right"><i class="icon-pencil"></i> {% trans %}Reply{% endtrans %}</a>
|
|
|
+ {% endif %}
|
|
|
+ </div>
|
|
|
+
|
|
|
{% if user.is_authenticated() and acl.threads.can_reply(forum, thread) %}
|
|
|
- <ul class="nav nav-pills pull-right">
|
|
|
- <li class="primary"><a href="{% url 'thread_reply' thread=thread.pk, slug=thread.slug %}"><i class="icon-pencil"></i> {% trans %}Reply{% endtrans %}</a></li>
|
|
|
- </ul>
|
|
|
+ <div class="thread-quick-reply">
|
|
|
+ <form action="{% url 'thread_reply' thread=thread.pk, slug=thread.slug %}" method="post">
|
|
|
+ <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
|
|
|
+ <input type="hidden" name="quick_reply" value="1">
|
|
|
+ <img src="{{ user.get_avatar() }}" alt="{% trans %}Your Avatar{% endtrans %}" class="user-avatar">
|
|
|
+ <div class="arrow"></div>
|
|
|
+ {{ editor.editor(quick_reply.post, _('Post Reply'), extra=editor_extra()) }}
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
{% endif %}
|
|
|
-</div>
|
|
|
|
|
|
-{% if user.is_authenticated() and acl.threads.can_reply(forum, thread) %}
|
|
|
-<div class="quick-reply">
|
|
|
- <form action="{% url 'thread_reply' thread=thread.pk, slug=thread.slug %}" method="post">
|
|
|
- <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
|
|
|
- <input type="hidden" name="quick_reply" value="1">
|
|
|
- <img src="{{ user.get_avatar() }}" alt="{% trans %}Your Avatar{% endtrans %}" class="avatar-big">
|
|
|
- <div class="arrow"></div>
|
|
|
- {{ editor.editor(quick_reply.post, _('Post Reply'), extra=editor_extra()) }}
|
|
|
- </form>
|
|
|
</div>
|
|
|
-{% endif %}
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
@@ -332,22 +459,22 @@
|
|
|
|
|
|
|
|
|
{% macro pager(extra=true) %}
|
|
|
- <ul class="pager pull-left">
|
|
|
+<div class="pagination pull-left">
|
|
|
+ <ul>
|
|
|
+ {% if pagination['total'] > 0 %}
|
|
|
+ <li class="count">{{ macros.pager_label(pagination) }}</li>
|
|
|
{%- if pagination['prev'] > 1 %}<li><a href="{% url 'thread' slug=thread.slug, thread=thread.id %}" class="tooltip-top" title="{% trans %}Go to first page{% endtrans %}"><i class="icon-chevron-left"></i> {% trans %}First{% endtrans %}</a></li>{% endif -%}
|
|
|
{%- if pagination['prev'] > 0 %}<li><a href="{%- if pagination['prev'] > 1 %}{% url 'thread' slug=thread.slug, thread=thread.id, page=pagination['prev'] %}{% else %}{% url 'thread' slug=thread.slug, thread=thread.id %}{% endif %}" class="tooltip-top" title="{% trans %}Older Posts{% endtrans %}"><i class="icon-chevron-left"></i></a></li>{% endif -%}
|
|
|
{%- if pagination['next'] > 0 %}<li><a href="{% url 'thread' slug=thread.slug, thread=thread.id, page=pagination['next'] %}" class="tooltip-top" title="{% trans %}Newest Posts{% endtrans %}"><i class="icon-chevron-right"></i></a></li>{% endif -%}
|
|
|
{%- if pagination['next'] > 0 and pagination['next'] < pagination['total'] %}<li><a href="{% url 'thread' slug=thread.slug, thread=thread.id, page=pagination['total'] %}" class="tooltip-top" title="{% trans %}Go to last page{% endtrans %}">{% trans %}Last{% endtrans %} <i class="icon-chevron-right"></i></a></li>{% endif -%}
|
|
|
- <li class="count">
|
|
|
- {%- trans current_page=pagination['page'], pages=pagination['total'] -%}
|
|
|
- Page {{ current_page }} of {{ pages }}
|
|
|
- {%- endtrans -%}
|
|
|
- </li>
|
|
|
+ {% endif %}
|
|
|
{% if extra and user.is_authenticated() %}
|
|
|
- {% if not is_read %}<li class="unread"><a href="{% url 'thread_new' slug=thread.slug, thread=thread.id %}" class="tooltip-top" title="{% trans %}Go to first unread{% endtrans %}"><i class="icon-star"></i> {% trans %}First Unread{% endtrans %}</a></li>{% endif %}
|
|
|
- {% if thread.replies_moderated > 0 and acl.threads.can_approve(forum) %}<li class="moderated"><a href="{% url 'thread_moderated' slug=thread.slug, thread=thread.id %}" class="tooltip-top" title="{% trans %}Go to first post awaiting review{% endtrans %}"><i class="icon-eye-close"></i> {% trans %}First Unreviewed{% endtrans %}</a></li>{% endif %}
|
|
|
- {% if thread.replies_reported > 0 and acl.threads.can_mod_posts(thread) %}<li class="reported"><a href="{% url 'thread_reported' slug=thread.slug, thread=thread.id %}" class="tooltip-top" title="{% trans %}Go to first reported post{% endtrans %}"><i class="icon-fire"></i> {% trans %}First Reported{% endtrans %}</a></li>{% endif %}
|
|
|
+ {% if not is_read %}<li><a href="{% url 'thread_new' slug=thread.slug, thread=thread.id %}" class="tooltip-top" title="{% trans %}Go to first unread{% endtrans %}"><i class="icon-star"></i> {% trans %}First Unread{% endtrans %}</a></li>{% endif %}
|
|
|
+ {% if thread.replies_moderated > 0 and acl.threads.can_approve(forum) %}<li><a href="{% url 'thread_moderated' slug=thread.slug, thread=thread.id %}" class="tooltip-top" title="{% trans %}Go to first post awaiting review{% endtrans %}"><i class="icon-eye-close"></i> {% trans %}First Unreviewed{% endtrans %}</a></li>{% endif %}
|
|
|
+ {% if thread.replies_reported > 0 and acl.threads.can_mod_posts(thread) %}<li><a href="{% url 'thread_reported' slug=thread.slug, thread=thread.id %}" class="tooltip-top" title="{% trans %}Go to first reported post{% endtrans %}"><i class="icon-fire"></i> {% trans %}First Reported{% endtrans %}</a></li>{% endif %}
|
|
|
{% endif %}
|
|
|
</ul>
|
|
|
+</div>
|
|
|
{% endmacro %}
|
|
|
|
|
|
|
|
@@ -370,5 +497,5 @@
|
|
|
|
|
|
|
|
|
{% macro editor_extra() %}
|
|
|
- <button id="editor-preview" name="preview" type="submit" class="btn btn-success pull-right">{% trans %}Full Editor{% endtrans %}</button>
|
|
|
+ <button id="editor-preview" name="preview" type="submit" class="btn pull-right">{% trans %}Full Editor{% endtrans %}</button>
|
|
|
{% endmacro %}
|