##// END OF EJS Templates
Updating last_update time if the thread in autoupdate
Updating last_update time if the thread in autoupdate

File last commit:

r535:809fb544 default
r536:886da067 default
Show More
posting_general.html
254 lines | 9.9 KiB | text/html | HtmlLexer
{% extends "boards/base.html" %}
{% load i18n %}
{% load cache %}
{% load board %}
{% load static %}
{% block head %}
{% if tag %}
<title>Neboard - {{ tag.name }}</title>
{% else %}
<title>Neboard</title>
{% endif %}
{% if current_page.has_previous %}
<link rel="prev" href="
{% if tag %}
{% url "tag" tag_name=tag page=current_page.previous_page_number %}
{% else %}
{% url "index" page=current_page.previous_page_number %}
{% endif %}
" />
{% endif %}
{% if current_page.has_next %}
<link rel="next" href="
{% if tag %}
{% url "tag" tag_name=tag page=current_page.next_page_number %}
{% else %}
{% url "index" page=current_page.next_page_number %}
{% endif %}
" />
{% endif %}
{% endblock %}
{% block content %}
{% get_current_language as LANGUAGE_CODE %}
{% if tag %}
<div class="tag_info">
<h2>
{% if tag in user.fav_tags.all %}
<a href="{% url 'tag_unsubscribe' tag.name %}?next={{ request.path }}"
class="fav">★</a>
{% else %}
<a href="{% url 'tag_subscribe' tag.name %}?next={{ request.path }}"
class="not_fav">★</a>
{% endif %}
#{{ tag.name }}
</h2>
</div>
{% endif %}
{% if threads %}
{% if current_page.has_previous %}
<div class="page_link">
<a href="
{% if tag %}
{% url "tag" tag_name=tag page=current_page.previous_page_number %}
{% else %}
{% url "index" page=current_page.previous_page_number %}
{% endif %}
">{% trans "Previous page" %}</a>
</div>
{% endif %}
{% for thread in threads %}
{% cache 600 thread_short thread.thread.id thread.thread.last_edit_time moderator LANGUAGE_CODE %}
<div class="thread">
{% if thread.bumpable %}
<div class="post" id="{{ thread.op.id }}">
{% else %}
<div class="post dead_post" id="{{ thread.op.id }}">
{% endif %}
{% if thread.op.image %}
<div class="image">
<a class="thumb"
href="{{ thread.op.image.url }}"><img
src="{{ thread.op.image.url_200x150 }}"
alt="{{ thread.op.id }}"
width="{{ thread.op.image_pre_width }}"
height="{{ thread.op.image_pre_height }}"
data-width="{{ thread.op.image_width }}"
data-height="{{ thread.op.image_height }}"/>
</a>
</div>
{% endif %}
<div class="message">
<div class="post-info">
<span class="title">{{ thread.op.title }}</span>
<a class="post_id" href="{% url 'thread' thread.op.id %}"
> ({{ thread.op.id }})</a>
[{{ thread.op.pub_time }}]
[<a class="link" href="
{% url 'thread' thread.op.id %}#form"
>{% trans "Reply" %}</a>]
{% if moderator %}
<span class="moderator_info">
[<a href="
{% url 'delete' post_id=thread.op.id %}?next={{ request.path }}"
>{% trans 'Delete' %}</a>]
({{ thread.op.poster_ip }})
[<a href="
{% url 'ban' post_id=thread.op.id %}?next={{ request.path }}"
>{% trans 'Ban IP' %}</a>]
</span>
{% endif %}
</div>
{% autoescape off %}
{{ thread.op.text.rendered|truncatewords_html:50 }}
{% endautoescape %}
{% if thread.op.is_referenced %}
<div class="refmap">
{% trans "Replies" %}:
{% for ref_post in thread.op.get_sorted_referenced_posts %}
<a href="{% post_url ref_post.id %}">&gt;&gt;{{ ref_post.id }}</a
>{% if not forloop.last %},{% endif %}
{% endfor %}
</div>
{% endif %}
</div>
<div class="metadata">
{{ thread.thread.get_images_count }} {% trans 'images' %}.
{% if thread.thread.tags %}
<span class="tags">
{% for tag in thread.thread.get_tags %}
<a class="tag" href="
{% url 'tag' tag_name=tag.name %}">
#{{ tag.name }}</a
>{% if not forloop.last %},{% endif %}
{% endfor %}
</span>
{% endif %}
</div>
</div>
{% if thread.last_replies.exists %}
{% if thread.skipped_replies %}
<div class="skipped_replies">
<a href="{% url 'thread' thread.op.id %}">
{% blocktrans with count=thread.skipped_replies %}Skipped {{ count }} replies. Open thread to see all replies.{% endblocktrans %}
</a>
</div>
{% endif %}
<div class="last-replies">
{% for post in thread.last_replies %}
{% if thread.bumpable %}
<div class="post" id="{{ post.id }}">
{% else %}
<div class="post dead_post" id="{{ post.id }}">
{% endif %}
{% if post.image %}
<div class="image">
<a class="thumb"
href="{{ post.image.url }}"><img
src=" {{ post.image.url_200x150 }}"
alt="{{ post.id }}"
width="{{ post.image_pre_width }}"
height="{{ post.image_pre_height }}"
data-width="{{ post.image_width }}"
data-height="{{ post.image_height }}"/>
</a>
</div>
{% endif %}
<div class="message">
<div class="post-info">
<span class="title">{{ post.title }}</span>
<a class="post_id" href="
{% url 'thread' thread.op.id %}#{{ post.id }}">
({{ post.id }})</a>
[{{ post.pub_time }}]
</div>
{% autoescape off %}
{{ post.text.rendered|truncatewords_html:50 }}
{% endautoescape %}
</div>
{% if post.is_referenced %}
<div class="refmap">
{% trans "Replies" %}:
{% for ref_post in post.get_sorted_referenced_posts %}
<a href="{% post_url ref_post.id %}">&gt;&gt;{{ ref_post.id }}</a
>{% if not forloop.last %},{% endif %}
{% endfor %}
</div>
{% endif %}
</div>
{% endfor %}
</div>
{% endif %}
</div>
{% endcache %}
{% endfor %}
{% if current_page.has_next %}
<div class="page_link">
<a href="
{% if tag %}
{% url "tag" tag_name=tag page=current_page.next_page_number %}
{% else %}
{% url "index" page=current_page.next_page_number %}
{% endif %}
">{% 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>
<form enctype="multipart/form-data" method="post">{% csrf_token %}
{{ form.as_div }}
<div class="form-submit">
<input type="submit" value="{% trans "Post" %}"/>
</div>
</form>
<div>
{% trans 'Tags must be delimited by spaces. Text or image is required.' %}
</div>
<div><a href="{% url "staticpage" name="help" %}">
{% trans 'Text syntax' %}</a></div>
</div>
</div>
{% endblock %}
{% block metapanel %}
<span class="metapanel">
<b><a href="{% url "authors" %}">Neboard</a> 1.6 Amon</b>
{% trans "Pages:" %}[
{% for page in paginator.page_range %}
<a
{% ifequal page current_page.number %}
class="current_page"
{% endifequal %}
href="
{% if tag %}
{% url "tag" tag_name=tag page=page %}
{% else %}
{% url "index" page=page %}
{% endif %}
">{{ page }}</a>
{% if not forloop.last %},{% endif %}
{% endfor %}
]
[<a href="rss/">RSS</a>]
</span>
{% endblock %}