##// END OF EJS Templates
Moved some other JS code to the end of page
Moved some other JS code to the end of page

File last commit:

r446:7ef61490 default
r446:7ef61490 default
Show More
posting_general.html
244 lines | 9.1 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 prev_page %}
<link rel="next" href="
{% if tag %}
{% url "tag" tag_name=tag page=prev_page %}
{% else %}
{% url "index" page=prev_page %}
{% endif %}
" />
{% endif %}
{% if next_page %}
<link rel="next" href="
{% if tag %}
{% url "tag" tag_name=tag page=next_page %}
{% else %}
{% url "index" page=next_page %}
{% 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 prev_page %}
<div class="page_link">
<a href="
{% if tag %}
{% url "tag" tag_name=tag page=prev_page %}
{% else %}
{% url "index" page=prev_page %}
{% endif %}
">{% trans "Previous page" %}</a>
</div>
{% endif %}
{% for thread in threads %}
{% cache 600 thread_short 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 }}"
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.thread.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 }}"
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 next_page %}
<div class="page_link">
<a href="
{% if tag %}
{% url "tag" tag_name=tag page=next_page %}
{% else %}
{% url "index" page=next_page %}
{% 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.4</b>
{% trans "Pages:" %}
{% for page in pages %}
[<a href="
{% if tag %}
{% url "tag" tag_name=tag page=page %}
{% else %}
{% url "index" page=page %}
{% endif %}
">{{ page }}</a>]
{% endfor %}
[<a href="rss/">RSS</a>]
</span>
{% endblock %}