Unverified Commit 631f8fd0 authored by SHooZ's avatar SHooZ

Add thread options;

parent 867b275b
......@@ -8,8 +8,8 @@ msgid ""
msgstr ""
"Project-Id-Version: 1.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-08-03 20:48+0000\n"
"PO-Revision-Date: 2017-07-21 01:52+3\n"
"POT-Creation-Date: 2017-08-12 18:29+0000\n"
"PO-Revision-Date: 2017-08-12 21:31\n"
"Last-Translator: SHooZ <shooz@ex.ua>\n"
"Language-Team: Kropyva.ch\n"
"Language: Ukrainian\n"
......@@ -97,8 +97,8 @@ msgid "sage"
msgstr "sage"
#: posts/templates/posts/post_form.html:36
#: posts/templates/posts/post_form.html:52
#: posts/templates/posts/post_form.html:66
#: posts/templates/posts/post_form.html:59
#: posts/templates/posts/post_form.html:98
msgid "Spoiler Image"
msgstr "Зображення під спойлер"
......@@ -106,28 +106,36 @@ msgstr "Зображення під спойлер"
msgid "Subject"
msgstr "Тема"
#: posts/templates/posts/post_form.html:55
msgid "By posting I've agreed with <a href='/about/rules/'>the rules</a>"
msgstr "Відписуючи я погоджуюся з <a href='/about/rules/'>правилами</a>"
#: posts/templates/posts/post_form.html:60
#: posts/templates/posts/post_form.html:53
msgid "Comment"
msgstr "Коментар"
#: posts/templates/posts/post_form.html:72
#: posts/templates/posts/post_form.html:65
#: posts/templates/posts/report_delete.html:7
msgid "File"
msgstr "Файл"
#: posts/templates/posts/post_form.html:81
#: posts/templates/posts/post_form.html:74
#: posts/templates/posts/report_delete.html:7
msgid "Password"
msgstr "Пароль"
#: posts/templates/posts/post_form.html:85
#: posts/templates/posts/post_form.html:78
msgid "For file deletion."
msgstr "Для видаляння допису."
#: posts/templates/posts/post_form.html:83
msgid "Options"
msgstr "Додатково"
#: posts/templates/posts/post_form.html:85
msgid "Use op-stickers"
msgstr "Використовувати наліпки для ОП"
#: posts/templates/posts/post_form.html:94
msgid "By posting I've agreed with <a href='/about/rules/'>the rules</a>"
msgstr "Відписуючи я погоджуюся з <a href='/about/rules/'>правилами</a>"
#: posts/templates/posts/post_thread.html:32
msgid "Reply"
msgstr "Дописати"
......
......@@ -48,6 +48,7 @@ class PostForm(ModelForm):
subject = self.cleaned_data['subject']
body = self.cleaned_data['body']
password = self.cleaned_data['password']
stickers = self.cleaned_data['op_stickers']
time = datetime.timestamp(datetime.now())
if thread is None and len(self.files) == 0:
return False
......@@ -78,6 +79,7 @@ class PostForm(ModelForm):
new_post.name = name
new_post.num_files = len(files)
new_post.subject = subject
new_post.op_stickers = stickers
new_post.email = email
bb_parser = get_parser()
gi = GeoIP.new(GeoIP.GEOIP_MEMORY_CACHE)
......
......@@ -43,6 +43,7 @@ class Post(models.Model):
board = models.ForeignKey(Board, on_delete=models.CASCADE)
id = models.IntegerField(blank=True, null=True)
thread = models.IntegerField(blank=True, null=True)
op_stickers = models.BooleanField(blank=True, default=True)
subject = models.CharField(max_length=100, blank=True, null=True)
email = models.CharField(max_length=30, blank=True, null=True)
name = models.CharField(max_length=35, blank=True, null=True)
......
......@@ -78,6 +78,14 @@
<span class="unimportant">({% trans 'For file deletion.' %})</span>
</td>
</tr>
{% if not id %}
<tr>
<th>{% trans 'Options' %}</th>
<td>
{{ form.op_stickers }}{% trans 'Use op-stickers' %}
</td>
</tr>
{% endif %}
<tr>
<th>
</th>
......
......@@ -13,7 +13,9 @@
{% include 'posts/post/poster_id.html' %}&nbsp;
<a class="post_no" id="post_no_{{ post.id }}" onclick="highlightReply({{ post.id }})" href="{% url 'thread' board.uri post.thread %}#{{post.id}}">No.</a>
<a class="post_no" onclick="citeReply({{ post.id }})" href="{% url 'thread' board.uri post.thread %}#{{post.id}}">{{ post.id }}</a>
{% if post.ip == thread.ip %}<span class="op-reply">OP</span>{% endif %}
{% if thread.op_stickers %}
{% if post.ip == thread.ip %}<span class="op-reply">OP</span>{% endif %}
{% endif %}
</p>
{% include 'posts/post/fileinfo.html' %}
{% include 'posts/post/post_controls.html' %}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment