##// END OF EJS Templates
Reflinks to OPs are bold now. Refactored reflinks to build using the same code. Refactored autoescaping
Reflinks to OPs are bold now. Refactored reflinks to build using the same code. Refactored autoescaping

File last commit:

r1309:a2eaff61 default
r1309:a2eaff61 default
Show More
all_threads.html
186 lines | 7.2 KiB | text/html | HtmlLexer
{% extends "boards/base.html" %}
{% load i18n %}
{% load board %}
{% load static %}
{% load tz %}
{% block head %}
<meta name="robots" content="noindex">
{% if tag %}
<title>{{ tag.name }} - {{ site_name }}</title>
{% else %}
<title>{{ site_name }}</title>
{% endif %}
{% if prev_page_link %}
<link rel="prev" href="{{ prev_page_link }}" />
{% endif %}
{% if next_page_link %}
<link rel="next" href="{{ next_page_link }}" />
{% endif %}
{% endblock %}
{% block content %}
{% get_current_language as LANGUAGE_CODE %}
{% get_current_timezone as TIME_ZONE %}
{% for banner in banners %}
<div class="post">
<div class="title">{{ banner.title }}</div>
<div>{{ banner.text }}</div>
<div>{% trans 'Related message' %}: <a href="{{ banner.post.get_absolute_url }}">>>{{ banner.post.id }}</a></div>
</div>
{% endfor %}
{% if tag %}
<div class="tag_info">
{% if random_image_post %}
<div class="tag-image">
{% with image=random_image_post.images.first %}
<a href="{{ random_image_post.get_absolute_url }}"><img
src="{{ image.image.url_200x150 }}"
width="{{ image.pre_width }}"
height="{{ image.pre_height }}"/></a>
{% endwith %}
</div>
{% endif %}
<div class="tag-text-data">
<h2>
<form action="{% url 'tag' tag.name %}" method="post" class="post-button-form">
{% if is_favorite %}
<button name="method" value="unsubscribe" class="fav"></button>
{% else %}
<button name="method" value="subscribe" class="not_fav"></button>
{% endif %}
</form>
<form action="{% url 'tag' tag.name %}" method="post" class="post-button-form">
{% if is_hidden %}
<button name="method" value="unhide" class="fav">H</button>
{% else %}
<button name="method" value="hide" class="not_fav">H</button>
{% endif %}
</form>
{{ tag.get_view|safe }}
{% if moderator %}
<span class="moderator_info">| <a href="{% url 'admin:boards_tag_change' tag.id %}">{% trans 'Edit tag' %}</a></span>
{% endif %}
</h2>
{% if tag.get_description %}
<p>{{ tag.get_description|safe }}</p>
{% endif %}
<p>{% blocktrans with active_thread_count=tag.get_active_thread_count thread_count=tag.get_thread_count post_count=tag.get_post_count %}This tag has {{ thread_count }} threads ({{ active_thread_count}} active) and {{ post_count }} posts.{% endblocktrans %}</p>
{% if related_tags %}
<p>{% trans 'Related tags:' %}
{% for rel_tag in related_tags %}
{{ rel_tag.get_view|safe }}{% if not forloop.last %}, {% else %}.{% endif %}
{% endfor %}
</p>
{% endif %}
</div>
</div>
{% endif %}
{% if threads %}
{% if prev_page_link %}
<div class="page_link">
<a href="{{ prev_page_link }}">{% trans "Previous page" %}</a>
</div>
{% endif %}
{% for thread in threads %}
<div class="thread">
{% post_view thread.get_opening_post moderator=moderator is_opening=True thread=thread truncated=True need_open_link=True %}
{% if not thread.archived %}
{% with last_replies=thread.get_last_replies %}
{% if last_replies %}
{% with skipped_replies_count=thread.get_skipped_replies_count %}
{% if skipped_replies_count %}
<div class="skipped_replies">
<a href="{% url 'thread' thread.get_opening_post_id %}">
{% blocktrans with count=skipped_replies_count %}Skipped {{ count }} replies. Open thread to see all replies.{% endblocktrans %}
</a>
</div>
{% endif %}
{% endwith %}
<div class="last-replies">
{% for post in last_replies %}
{% post_view post is_opening=False moderator=moderator truncated=True %}
{% endfor %}
</div>
{% endif %}
{% endwith %}
{% endif %}
</div>
{% endfor %}
{% if next_page_link %}
<div class="page_link">
<a href="{{ next_page_link }}">{% trans "Next page" %}</a>
</div>
{% endif %}
{% else %}
<div class="post">
{% trans 'No threads exist. Create the first one!' %}</div>
{% endif %}
<div class="post-form-w">
<script src="{% static 'js/panel.js' %}"></script>
<div class="post-form">
<div class="form-title">{% trans "Create new thread" %}</div>
<div class="swappable-form-full">
<form enctype="multipart/form-data" method="post" id="form">{% csrf_token %}
{{ form.as_div }}
<div class="form-submit">
<input type="submit" value="{% trans "Post" %}"/>
</div>
</form>
</div>
<div>
{% trans 'Tags must be delimited by spaces. Text or image is required.' %}
</div>
<div><button id="preview-button">{% trans 'Preview' %}</button></div>
<div id="preview-text"></div>
<div><a href="{% url "staticpage" name="help" %}">{% trans 'Text syntax' %}</a></div>
<div><a href="{% url "tags" "required" %}">{% trans 'Tags' %}</a></div>
</div>
</div>
<script src="{% static 'js/form.js' %}"></script>
<script src="{% static 'js/thread_create.js' %}"></script>
{% endblock %}
{% block metapanel %}
<span class="metapanel">
<b><a href="{% url "authors" %}">{{ site_name }}</a> {{ version }}</b>
{% trans "Pages:" %}
[
{% with dividers=paginator.get_dividers %}
{% for page in paginator.get_divided_range %}
{% if page in dividers %}
…,
{% endif %}
<a
{% ifequal page current_page.number %}
class="current_page"
{% endifequal %}
href="
{% if tag %}
{% url "tag" tag_name=tag.name %}?page={{ page }}
{% else %}
{% url "index" %}?page={{ page }}
{% endif %}
">{{ page }}</a>
{% if not forloop.last %},{% endif %}
{% endfor %}
{% endwith %}
]
[<a href="rss/">RSS</a>]
</span>
{% endblock %}