##// END OF EJS Templates
Do not treat preview and file input buttons as submit buttons
Do not treat preview and file input buttons as submit buttons

File last commit:

r1622:64568a12 default
r1622:64568a12 default
Show More
all_threads.html
210 lines | 8.9 KiB | text/html | HtmlLexer
neko259
Renamed posting_general.html to all_threads.html to clarify its purpose
r1164 {% 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>
neko259
Added PoW instead of 30-second captcha
r1428 <div>{{ banner.get_text|safe }}</div>
neko259
Allow banner with no text. If so, details post text is used
r1418 <div>{% trans 'Details' %}: <a href="{{ banner.post.get_absolute_url }}">>>{{ banner.post.id }}</a></div>
neko259
Renamed posting_general.html to all_threads.html to clarify its purpose
r1164 </div>
{% endfor %}
{% if tag %}
neko259
Tag colors
r1338 <div class="tag_info" style="border-bottom: solid .5ex #{{ tag.get_color }}">
neko259
Don't show random image for tag that does not have images
r1266 {% if random_image_post %}
<div class="tag-image">
neko259
Store images as regular attachments instead of separate model
r1590 {% with image=random_image_post.get_first_image %}
neko259
Don't show random image for tag that does not have images
r1266 <a href="{{ random_image_post.get_absolute_url }}"><img
neko259
Store images as regular attachments instead of separate model
r1590 src="{{ image.get_thumb_url }}"
width="{{ image.get_preview_size.0 }}"
height="{{ image.get_preview_size.1 }}"
neko259
Tag buttons on the separate line
r1409 alt="{{ random_image_post.id }}"/></a>
neko259
Don't show random image for tag that does not have images
r1266 {% endwith %}
</div>
{% endif %}
neko259
Show tag image to the left
r1262 <div class="tag-text-data">
<h2>
neko259
Tag buttons on the separate line
r1409 /{{ tag.get_view|safe }}/
</h2>
neko259
Style changes in the tag view page
r1617 {% if perms.change_tag %}
<div class="moderator_info"><a href="{% url 'admin:boards_tag_change' tag.id %}">{% trans 'Edit tag' %}</a></div>
{% endif %}
neko259
Tag buttons on the separate line
r1409 <p>
neko259
Show tag image to the left
r1262 <form action="{% url 'tag' tag.name %}" method="post" class="post-button-form">
{% if is_favorite %}
neko259
Added labels to the tag form buttons
r1426 <button name="method" value="unsubscribe" class="fav">★ {% trans "Remove from favorites" %}</button>
neko259
Show tag image to the left
r1262 {% else %}
neko259
Added labels to the tag form buttons
r1426 <button name="method" value="subscribe" class="not_fav">★ {% trans "Add to favorites" %}</button>
neko259
Show tag image to the left
r1262 {% endif %}
</form>
<form action="{% url 'tag' tag.name %}" method="post" class="post-button-form">
{% if is_hidden %}
neko259
Added labels to the tag form buttons
r1426 <button name="method" value="unhide" class="fav">{% trans "Show" %}</button>
neko259
Show tag image to the left
r1262 {% else %}
neko259
Added labels to the tag form buttons
r1426 <button name="method" value="hide" class="not_fav">{% trans "Hide" %}</button>
neko259
Show tag image to the left
r1262 {% endif %}
</form>
neko259
Added tag gallery
r1419 <a href="{% url 'tag_gallery' tag.name %}">{% trans 'Gallery' %}</a>
neko259
Tag buttons on the separate line
r1409 </p>
neko259
Show tag image to the left
r1262 {% if tag.get_description %}
neko259
Reflinks to OPs are bold now. Refactored reflinks to build using the same code. Refactored autoescaping
r1309 <p>{{ tag.get_description|safe }}</p>
neko259
Renamed posting_general.html to all_threads.html to clarify its purpose
r1164 {% endif %}
neko259
Changed tag description, made it plural
r1364 <p>
neko259
Show only non-zero thread count in the tag detailed info
r1397 {% with active_count=tag.get_active_thread_count bumplimit_count=tag.get_bumplimit_thread_count archived_count=tag.get_archived_thread_count %}
{% if active_count %}
{% blocktrans count count=active_count %}{{ count }} active thread{% plural %}active threads{% endblocktrans %},
{% endif %}
{% if bumplimit_count %}
{% blocktrans count count=bumplimit_count %}{{ count }} thread in bumplimit{% plural %} threads in bumplimit{% endblocktrans %},
{% endif %}
{% if archived_count %}
{% blocktrans count count=archived_count %}{{ count }} archived thread{% plural %}archived threads{% endblocktrans %},
{% endif %}
{% endwith %}
neko259
Changed tag description, made it plural
r1364 {% blocktrans count count=tag.get_post_count %}{{ count }} message{% plural %}messages{% endblocktrans %}.
</p>
neko259
Show all tag parents at the tag page
r1361 {% if tag.get_all_parents %}
neko259
Don't show tag children, only a parent
r1350 <p>
neko259
Show all tag parents at the tag page
r1361 {% for parent in tag.get_all_parents %}
{{ parent.get_view|safe }} &gt;
{% endfor %}
neko259
Don't show tag children, only a parent
r1350 {{ tag.get_view|safe }}
</p>
{% endif %}
neko259
Show tag's subsections
r1450 {% if tag.get_children.all %}
<p>
{% trans "Subsections: " %}
{% for child in tag.get_children.all %}
{{ child.get_view|safe }}{% if not forloop.last%}, {% endif %}
{% endfor %}
</p>
{% endif %}
neko259
Show tag image to the left
r1262 </div>
neko259
Renamed posting_general.html to all_threads.html to clarify its purpose
r1164 </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">
neko259
Do not pass over perms variable manually to the post template. Fixed thread...
r1390 {% post_view thread.get_opening_post thread=thread truncated=True need_open_link=True %}
neko259
Renamed posting_general.html to all_threads.html to clarify its purpose
r1164 {% 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 %}">
neko259
Pluralize skipped replies message
r1336 {% blocktrans count count=skipped_replies_count %}Skipped {{ count }} reply. Open thread to see all replies.{% plural %}Skipped {{ count }} replies. Open thread to see all replies.{% endblocktrans %}
neko259
Renamed posting_general.html to all_threads.html to clarify its purpose
r1164 </a>
</div>
{% endif %}
{% endwith %}
<div class="last-replies">
{% for post in last_replies %}
neko259
Do not pass over perms variable manually to the post template. Fixed thread...
r1390 {% post_view post truncated=True %}
neko259
Renamed posting_general.html to all_threads.html to clarify its purpose
r1164 {% 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>
neko259
Don't include pow and hasher scripts to both document and worker. Import...
r1468 <div class="post-form" data-hasher="{% static 'js/3party/sha256.js' %}"
data-pow-script="{% static 'js/proof_of_work.js' %}">
neko259
Renamed posting_general.html to all_threads.html to clarify its purpose
r1164 <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" %}"/>
neko259
Do not treat preview and file input buttons as submit buttons
r1622 <button id="preview-button" type="button" onclick="return false;">{% trans 'Preview' %}</button>
<button id="file-source-button" type="button" onclick="return false;">{% trans 'Change file source' %}</button>
neko259
Renamed posting_general.html to all_threads.html to clarify its purpose
r1164 </div>
</form>
</div>
<div>
{% trans 'Tags must be delimited by spaces. Text or image is required.' %}
neko259
Show max file size in the posting templates
r1396 {% with size=max_file_size|filesizeformat %}
{% blocktrans %}Max file size is {{ size }}.{% endblocktrans %}
{% endwith %}
neko259
Renamed posting_general.html to all_threads.html to clarify its purpose
r1164 </div>
neko259
Added AJAX text preview to the form.
r1217 <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>
neko259
Renamed posting_general.html to all_threads.html to clarify its purpose
r1164 </div>
</div>
<script src="{% static 'js/form.js' %}"></script>
neko259
Block the form while computing PoW.
r1451 <script src="{% static 'js/3party/jquery.blockUI.js' %}"></script>
neko259
Renamed posting_general.html to all_threads.html to clarify its purpose
r1164 <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:" %}
[
neko259
Pretty divided paginator with ellipsis
r1200 {% 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 %}
neko259
Show reflink popups from left-top always. Don't insert spaces after comma in...
r1457 href="{% page_url paginator page %}">{{ page }}</a>{% if not forloop.last %},{% endif %}
neko259
Pretty divided paginator with ellipsis
r1200 {% endfor %}
{% endwith %}
neko259
Renamed posting_general.html to all_threads.html to clarify its purpose
r1164 ]
</span>
{% endblock %}