|
@@ -6,7 +6,7 @@
|
|
|
{% block title %}{{ macros.page_title(title=thread.name,parent=_("Private Threads"),page=pagination['page']) }}{% endblock %}
|
|
|
|
|
|
{% block breadcrumb %}{{ super() }} <span class="divider"><i class="icon-chevron-right"></i></span></li>
|
|
|
-<li><a href="{% url 'private_threads' %}">{% trans %}Private Threads{% endtrans %}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
|
|
|
+<li><a href="{{ url('private_threads') }}">{% trans %}Private Threads{% endtrans %}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
|
|
|
<li class="active">{{ thread.name }}
|
|
|
{%- endblock %}
|
|
|
|
|
@@ -21,7 +21,7 @@
|
|
|
<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-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 -%}
|
|
@@ -29,7 +29,7 @@
|
|
|
{%- endif %}</li>
|
|
|
{% if thread.closed %}<li><i class="icon-lock"></i> {% trans %}Locked{% endtrans %}</li>{% endif %}
|
|
|
<li class="stats-form">
|
|
|
- <form class="leave-form" action="{% url 'private_thread_remove_user' thread=thread.pk, slug=thread.slug %}" method="post">
|
|
|
+ <form class="leave-form" action="{{ url('private_thread_remove_user', thread=thread.pk, slug=thread.slug) }}" method="post">
|
|
|
<input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
|
|
|
<input type="hidden" name="user" value="{{ user.pk }}">
|
|
|
<button type="submit" class="btn"><i class="icon-remove"></i> {% trans %}Leave Thread{% endtrans %}</button>
|
|
@@ -52,21 +52,21 @@
|
|
|
<div class="thread-buttons">
|
|
|
{{ pager() }}
|
|
|
{% if acl.threads.can_reply(forum, thread) and (acl.private_threads.is_mod() or participants|length > 1) %}
|
|
|
- <a href="{% url 'private_thread_reply' thread=thread.pk, slug=thread.slug %}" class="btn btn-inverse pull-right"><i class="icon-pencil"></i> {% trans %}Reply{% endtrans %}</a>
|
|
|
+ <a href="{{ url('private_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 'private_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>
|
|
|
+ <form action="{{ url('private_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 %}
|
|
|
- <form action="{% url 'private_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>
|
|
|
+ <form action="{{ url('private_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 %}
|
|
|
- <form action="{% url 'private_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>
|
|
|
+ <form action="{{ url('private_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 %}
|
|
|
{% else %}
|
|
|
- <form action="{% url 'private_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 'private_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>
|
|
|
+ <form action="{{ url('private_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('private_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 ignored_posts %}
|
|
|
- <form action="{% url 'private_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>
|
|
|
+ <form action="{{ url('private_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 %}
|
|
|
</div>
|
|
|
|
|
@@ -81,7 +81,7 @@
|
|
|
{% 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 %}"><img src="{{ post.user.get_avatar(50) }}" alt="" class="user-avatar"></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 %}
|
|
|
<img src="{{ macros.avatar_guest(60) }}" alt="" class="user-avatar">
|
|
|
{% endif %}
|
|
@@ -89,23 +89,23 @@
|
|
|
<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() %} {{ user_label(post.user) }}{% endif %}
|
|
|
+ <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() %} {{ user_label(post.user) }}{% 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="{% url 'private_thread_find' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="post-date">{{ post.date|reltimesince }}</a>
|
|
|
+ <a href="{{ url('private_thread_find', thread=thread.pk, slug=thread.slug, 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 'private_thread_changelog' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="post-changelog tooltip-bottom" title="{% trans %}Show changelog{% endtrans %}">{% trans edits=post.edits %}One edit{% pluralize %}{{ edits }} edits{% endtrans %}</a>
|
|
|
+ <a href="{{ url('private_thread_changelog', thread=thread.pk, slug=thread.slug, post=post.pk) }}" class="post-changelog tooltip-bottom" title="{% trans %}Show changelog{% endtrans %}">{% trans edits=post.edits %}One edit{% pluralize %}{{ edits }} edits{% endtrans %}</a>
|
|
|
{% else %}
|
|
|
<span class="post-changelog">{% trans edits=post.edits %}One edit{% pluralize %}{{ edits }} edits{% endtrans %}</span>
|
|
|
{% endif %}
|
|
|
{% endif %}
|
|
|
</div>
|
|
|
|
|
|
- <a href="{% url 'private_thread_find' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="post-perma tooltip-left" title="{% trans %}Direct link to this post{% endtrans %}">#{{ pagination['start'] + loop.index }}</a>
|
|
|
+ <a href="{{ url('private_thread_find', thread=thread.pk, slug=thread.slug, 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">
|
|
@@ -128,10 +128,10 @@
|
|
|
<div class="post-content">
|
|
|
<div class="post-header">
|
|
|
<div class="post-header-compact">
|
|
|
- <a href="{% url 'private_thread_find' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="post-date">{{ post.date|reltimesince }}</a>
|
|
|
+ <a href="{{ url('private_thread_find', thread=thread.pk, slug=thread.slug, post=post.pk) }}" class="post-date">{{ post.date|reltimesince }}</a>
|
|
|
</div>
|
|
|
|
|
|
- <a href="{% url 'private_thread_find' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="post-perma tooltip-left" title="{% trans %}Direct link to this post{% endtrans %}">#{{ pagination['start'] + loop.index }}</a>
|
|
|
+ <a href="{{ url('private_thread_find', thread=thread.pk, slug=thread.slug, 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">
|
|
@@ -150,7 +150,7 @@
|
|
|
{% else %}
|
|
|
<div class="post-body">
|
|
|
{% if post.user_id %}
|
|
|
- <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>
|
|
|
+ <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 %}
|
|
|
<img src="{{ macros.avatar_guest(100) }}" alt="" class="user-avatar">
|
|
|
{% endif %}
|
|
@@ -158,20 +158,20 @@
|
|
|
<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() %} {{ user_label(post.user) }}{% endif %}
|
|
|
+ <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() %} {{ user_label(post.user) }}{% 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 'private_thread' thread=thread.pk, slug=thread.slug, page=pagination['page'] %}
|
|
|
+ {{ url('private_thread', thread=thread.pk, slug=thread.slug, page=pagination['page']) }}
|
|
|
{%- else -%}
|
|
|
- {% url 'private_thread' thread=thread.pk, slug=thread.slug %}
|
|
|
+ {{ url('private_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 'private_thread_changelog' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="post-changelog tooltip-bottom" title="{% trans %}Show changelog{% endtrans %}">{% trans edits=post.edits %}One edit{% pluralize %}{{ edits }} edits{% endtrans %}</a>
|
|
|
+ <a href="{{ url('private_thread_changelog', thread=thread.pk, slug=thread.slug, post=post.pk) }}" class="post-changelog tooltip-bottom" title="{% trans %}Show changelog{% endtrans %}">{% trans edits=post.edits %}One edit{% pluralize %}{{ edits }} edits{% endtrans %}</a>
|
|
|
{% else %}
|
|
|
<span class="post-changelog">{% trans edits=post.edits %}One edit{% pluralize %}{{ edits }} edits{% endtrans %}</span>
|
|
|
{% endif %}
|
|
@@ -182,9 +182,9 @@
|
|
|
{% endif %}
|
|
|
|
|
|
<a href="{% if pagination['page'] > 1 -%}
|
|
|
- {% url 'private_thread' thread=thread.pk, slug=thread.slug, page=pagination['page'] %}
|
|
|
+ {{ url('private_thread', thread=thread.pk, slug=thread.slug, page=pagination['page']) }}
|
|
|
{%- else -%}
|
|
|
- {% url 'private_thread' thread=thread.pk, slug=thread.slug %}
|
|
|
+ {{ url('private_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">
|
|
@@ -236,43 +236,43 @@
|
|
|
<div class="post-footer">{% filter trim %}
|
|
|
<div class="post-actions">
|
|
|
{% if acl.users.can_see_users_trails() -%}
|
|
|
- <a href="{% url 'private_post_info' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="post-trail">{% trans %}Info{% endtrans %}</a>
|
|
|
+ <a href="{{ url('private_post_info', thread=thread.pk, slug=thread.slug, post=post.pk) }}" class="post-trail">{% trans %}Info{% endtrans %}</a>
|
|
|
{% endif %}
|
|
|
{% if post.reported and acl.reports.can_handle() and acl.threads.can_mod_posts(forum) %}
|
|
|
- <a href="{% url 'private_post_report_show' thread=thread.pk, slug=thread.slug, post=post.pk %}">{% trans %}Show report{% endtrans %}</a>
|
|
|
+ <a href="{{ url('private_post_report_show', thread=thread.pk, slug=thread.slug, post=post.pk) }}">{% trans %}Show report{% endtrans %}</a>
|
|
|
{% endif %}
|
|
|
{% if acl.reports.can_report() %}
|
|
|
- <form action="{% url 'private_post_report' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="form-inline form-report" method="post" autocomplete="off">
|
|
|
+ <form action="{{ url('private_post_report', thread=thread.pk, slug=thread.slug, post=post.pk) }}" class="form-inline form-report" method="post" autocomplete="off">
|
|
|
<input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
|
|
|
<button type="submit" class="btn btn-link btn-report tooltip-top" title="{% trans %}Bring this post to moderator attention.{% endtrans %}">{% trans %}Report{% endtrans %}</button>
|
|
|
</form>
|
|
|
{% endif %}
|
|
|
{% if acl.threads.can_edit_thread(user, forum, thread, post) and thread.start_post_id == post.pk %}
|
|
|
- <a href="{% url 'private_thread_edit' thread=thread.pk, slug=thread.slug %}" class="post-edit">{% trans %}Edit{% endtrans %}</a>
|
|
|
+ <a href="{{ url('private_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 'private_post_edit' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="post-edit">{% trans %}Edit{% endtrans %}</a>
|
|
|
+ <a href="{{ url('private_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) and (acl.private_threads.is_mod() or participants|length > 1) %}
|
|
|
- <a href="{% url 'private_thread_reply' thread=thread.pk, slug=thread.slug, quote=post.pk %}" class="post-reply">{% trans %}Reply{% endtrans %}</a>
|
|
|
+ <a href="{{ url('private_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) %}
|
|
|
{% if post.deleted %}
|
|
|
- <form action="{% url 'private_thread_show' thread=thread.pk, slug=thread.slug %}" class="form-inline" method="post">
|
|
|
+ <form action="{{ url('private_thread_show', 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 btn-link btn-hide tooltip-top" title="{% trans %}Make this thread visible to other users{% endtrans %}">{% trans %}Restore{% endtrans %}</button>
|
|
|
</form>
|
|
|
{% else %}
|
|
|
- <form action="{% url 'private_thread_hide' thread=thread.pk, slug=thread.slug %}" class="form-inline" method="post">
|
|
|
+ <form action="{{ url('private_thread_hide', 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 btn-link btn-hide tooltip-top" title="{% trans %}Hide this thread from other users{% endtrans %}">{% trans %}Hide{% endtrans %}</button>
|
|
|
</form>
|
|
|
{% endif %}
|
|
|
{% endif %}
|
|
|
{% if acl.threads.can_delete_thread(user, forum, thread, post) == 2 %}
|
|
|
- <form action="{% url 'private_thread_delete' thread=thread.pk, slug=thread.slug %}" class="form-inline prompt-delete-thread" method="post">
|
|
|
+ <form action="{{ url('private_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 }}">
|
|
|
<button type="submit" class="btn btn-link tooltip-top" title="{% trans %}Delete this thread for good{% endtrans %}">{% trans %}Delete{% endtrans %}</button>
|
|
|
</form>
|
|
@@ -282,19 +282,19 @@
|
|
|
<div class="post-actions">
|
|
|
{% if acl.threads.can_delete_post(user, forum, thread, post) %}
|
|
|
{% if post.deleted %}
|
|
|
- <form action="{% url 'private_post_show' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="form-inline" method="post">
|
|
|
+ <form action="{{ url('private_post_show', 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 btn-hide tooltip-top" title="{% trans %}Make this reply visible to other users{% endtrans %}">{% trans %}Restore{% endtrans %}</button>
|
|
|
</form>
|
|
|
{% else %}
|
|
|
- <form action="{% url 'private_post_hide' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="form-inline" method="post">
|
|
|
+ <form action="{{ url('private_post_hide', 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 btn-hide tooltip-top" title="{% trans %}Hide this reply from other users{% endtrans %}">{% trans %}Hide{% endtrans %}</button>
|
|
|
</form>
|
|
|
{% endif %}
|
|
|
{% endif %}
|
|
|
{% if acl.threads.can_delete_post(user, forum, thread, post) == 2 -%}
|
|
|
- <form action="{% url 'private_post_delete' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="form-inline prompt-delete-post" method="post">
|
|
|
+ <form action="{{ url('private_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 }}">
|
|
|
<button type="submit" class="btn btn-link tooltip-top" title="{% trans %}Delete this reply for good{% endtrans %}">{% trans %}Delete{% endtrans %}</button>
|
|
|
</form>
|
|
@@ -335,13 +335,13 @@
|
|
|
{% if user.is_authenticated() %}
|
|
|
{% if acl.threads.can_delete_checkpoint(forum) %}
|
|
|
{% if checkpoint.deleted %}
|
|
|
- <form action="{% url 'private_post_checkpoint_show' slug=thread.slug, thread=thread.pk, checkpoint=checkpoint.pk %}" method="post" class="form-inline">
|
|
|
+ <form action="{{ url('private_post_checkpoint_show', slug=thread.slug, thread=thread.pk, checkpoint=checkpoint.pk) }}" method="post" class="form-inline">
|
|
|
<input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
|
|
|
<input type="hidden" name="retreat" value="{{ request_path }}#post-{{ post.pk }}">
|
|
|
<button type="submit" class="btn btn-link btn-show">{% trans %}Restore{% endtrans %}</button>
|
|
|
</form>
|
|
|
{% else %}
|
|
|
- <form action="{% url 'private_post_checkpoint_hide' slug=thread.slug, thread=thread.pk, checkpoint=checkpoint.pk %}" method="post" class="form-inline">
|
|
|
+ <form action="{{ url('private_post_checkpoint_hide', slug=thread.slug, thread=thread.pk, checkpoint=checkpoint.pk) }}" method="post" class="form-inline">
|
|
|
<input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
|
|
|
<input type="hidden" name="retreat" value="{{ request_path }}#post-{{ post.pk }}">
|
|
|
<button type="submit" class="btn btn-link btn-hide">{% trans %}Hide{% endtrans %}</button>
|
|
@@ -349,7 +349,7 @@
|
|
|
{% endif %}
|
|
|
{% endif %}
|
|
|
{% if acl.threads.can_delete_checkpoint(forum) == 2 %}
|
|
|
- <form action="{% url 'private_post_checkpoint_delete' slug=thread.slug, thread=thread.pk, checkpoint=checkpoint.pk %}" method="post" class="form-inline prompt-delete-checkpoint">
|
|
|
+ <form action="{{ url('private_post_checkpoint_delete', slug=thread.slug, thread=thread.pk, checkpoint=checkpoint.pk) }}" method="post" class="form-inline prompt-delete-checkpoint">
|
|
|
<input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
|
|
|
<input type="hidden" name="retreat" value="{{ request_path }}#post-{{ post.pk }}">
|
|
|
<button type="submit" class="btn btn-link btn-delete">{% trans %}Delete{% endtrans %}</button>
|
|
@@ -388,7 +388,7 @@
|
|
|
<div class="thread-buttons">
|
|
|
{{ pager(false) }}
|
|
|
{% if acl.threads.can_reply(forum, thread) and (acl.private_threads.is_mod() or participants|length > 1) %}
|
|
|
- <a href="{% url 'private_thread_reply' thread=thread.pk, slug=thread.slug %}" class="btn btn-inverse pull-right"><i class="icon-pencil"></i> {% trans %}Reply{% endtrans %}</a>
|
|
|
+ <a href="{{ url('private_thread_reply', thread=thread.pk, slug=thread.slug) }}" class="btn btn-inverse pull-right"><i class="icon-pencil"></i> {% trans %}Reply{% endtrans %}</a>
|
|
|
{% else %}
|
|
|
<p class="lead thread-signin-message">{% trans %}This thread has too few participants.{% endtrans %}</p>
|
|
|
{% endif %}
|
|
@@ -396,7 +396,7 @@
|
|
|
|
|
|
{% if acl.threads.can_reply(forum, thread) and (acl.private_threads.is_mod() or participants|length > 1) %}
|
|
|
<div class="thread-quick-reply">
|
|
|
- <form action="{% url 'private_thread_reply' thread=thread.pk, slug=thread.slug %}" method="post">
|
|
|
+ <form action="{{ url('private_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(100) }}" alt="{% trans %}Your Avatar{% endtrans %}" class="user-avatar">
|
|
@@ -416,9 +416,9 @@
|
|
|
<ul class="unstyled">{% for participant in participants %}
|
|
|
<li>
|
|
|
<img src="{{ participant.get_avatar(24) }}" alt="" class="avatar-small">
|
|
|
- <a href="{% url 'user' username=participant.username_slug, user=participant.pk %}">{{ participant.username }}</a>
|
|
|
+ <a href="{{ url('user', username=participant.username_slug, user=participant.pk) }}">{{ participant.username }}</a>
|
|
|
{% if user.pk == thread.start_poster_id or acl.private_threads.is_mod() %}
|
|
|
- <form class="form-inline {% if user.pk == participant.pk %}leave-form{% else %}kick-form{% endif %} tooltip-left" action="{% url 'private_thread_remove_user' thread=thread.pk, slug=thread.slug %}" method="post" title="{% if participant.pk == user.pk %}{% trans %}Leave this thread{% endtrans %}{% else %}{% trans %}Remove from this thread{% endtrans %}{% endif %}">
|
|
|
+ <form class="form-inline {% if user.pk == participant.pk %}leave-form{% else %}kick-form{% endif %} tooltip-left" action="{{ url('private_thread_remove_user', thread=thread.pk, slug=thread.slug) }}" method="post" title="{% if participant.pk == user.pk %}{% trans %}Leave this thread{% endtrans %}{% else %}{% trans %}Remove from this thread{% endtrans %}{% endif %}">
|
|
|
<input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
|
|
|
<input type="hidden" name="retreat" value="{{ request_path }}">
|
|
|
<input type="hidden" name="user" value="{{ participant.pk }}">
|
|
@@ -435,7 +435,7 @@
|
|
|
|
|
|
<h4>{% trans %}Invite User{% endtrans %}</h4>
|
|
|
<div class="invite-participant">
|
|
|
- <form class="form-inline" action="{% url 'private_thread_invite_user' thread=thread.pk, slug=thread.slug %}" method="post">
|
|
|
+ <form class="form-inline" action="{{ url('private_thread_invite_user', 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 }}">
|
|
|
{{ form_theme.input_text(invite_form.fields.username, width="2", attrs={'placeholder':lang_user_to_invite()}) }}
|
|
@@ -520,7 +520,7 @@
|
|
|
|
|
|
|
|
|
{% macro user_label(user) -%}
|
|
|
-<{% if user.rank and user.rank.as_tab %}a href="{% url 'users' slug=user.rank.slug %}"{% else %}span{% endif %} class="label post-author-label{% if user.rank and user.rank.style %} post-label-{{ user.rank.style }}{% endif %}">{{ user.get_title() }}</{% if user.rank and user.rank.as_tab%}a{% else %}span{% endif %}>
|
|
|
+<{% if user.rank and user.rank.as_tab %}a href="{{ url('users', slug=user.rank.slug) }}"{% else %}span{% endif %} class="label post-author-label{% if user.rank and user.rank.style %} post-label-{{ user.rank.style }}{% endif %}">{{ user.get_title() }}</{% if user.rank and user.rank.as_tab%}a{% else %}span{% endif %}>
|
|
|
{%- endmacro %}
|
|
|
|
|
|
|
|
@@ -529,15 +529,15 @@
|
|
|
<ul>
|
|
|
{% if pagination['total'] > 0 %}
|
|
|
<li class="count">{{ macros.pager_label(pagination) }}</li>
|
|
|
- {%- if pagination['prev'] > 1 %}<li><a href="{% url 'private_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 'private_thread' slug=thread.slug, thread=thread.id, page=pagination['prev'] %}{% else %}{% url 'private_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 'private_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 'private_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 -%}
|
|
|
+ {%- if pagination['prev'] > 1 %}<li><a href="{{ url('private_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('private_thread', slug=thread.slug, thread=thread.id, page=pagination['prev']) }}{% else %}{{ url('private_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('private_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('private_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 -%}
|
|
|
{% endif %}
|
|
|
{% if extra %}
|
|
|
- {% if not is_read %}<li><a href="{% url 'private_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 not is_read %}<li><a href="{{ url('private_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 %}
|
|
|
{% endif %}
|
|
|
- {% if thread.replies_reported > 0 and acl.threads.can_mod_posts(thread) %}<li><a href="{% url 'private_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 thread.replies_reported > 0 and acl.threads.can_mod_posts(thread) %}<li><a href="{{ url('private_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 %}
|
|
|
</ul>
|
|
|
</div>
|
|
|
{% endmacro %}
|
|
@@ -545,7 +545,7 @@
|
|
|
|
|
|
{% macro checkpoint_user(checkpoint) -%}
|
|
|
{%- if checkpoint.user_id -%}
|
|
|
-<a href="{{ 'user'|url(user=checkpoint.user_id, username=checkpoint.user_slug) }}">{{ checkpoint.user_name }}</a>
|
|
|
+<a href="{{ url('user', user=checkpoint.user_id, username=checkpoint.user_slug) }}">{{ checkpoint.user_name }}</a>
|
|
|
{%- else -%}
|
|
|
<strong>{{ checkpoint.user_name }}</strong>
|
|
|
{%- endif -%}
|
|
@@ -554,7 +554,7 @@
|
|
|
|
|
|
{% macro checkpoint_target(checkpoint) -%}
|
|
|
{%- if checkpoint.target_user_id -%}
|
|
|
-<a href="{{ 'user'|url(user=checkpoint.target_user_id, username=checkpoint.target_user_slug) }}">{{ checkpoint.target_user_name }}</a>
|
|
|
+<a href="{{ url('user', user=checkpoint.target_user_id, username=checkpoint.target_user_slug) }}">{{ checkpoint.target_user_name }}</a>
|
|
|
{%- else -%}
|
|
|
<strong>{{ checkpoint.target_user_name }}</strong>
|
|
|
{%- endif -%}
|
|
@@ -563,7 +563,7 @@
|
|
|
|
|
|
{% macro edit_user(post) -%}
|
|
|
{%- if post.edit_user_id -%}
|
|
|
-<a href="{{ 'user'|url(user=post.edit_user_id, username=post.edit_user_slug) }}">{{ post.edit_user_name }}</a>
|
|
|
+<a href="{{ url('user', user=post.edit_user_id, username=post.edit_user_slug) }}">{{ post.edit_user_name }}</a>
|
|
|
{%- else -%}
|
|
|
<strong>{{ post.edit_user_name }}</strong>
|
|
|
{%- endif -%}
|