diff --git a/templates/post_thread.html b/templates/post_thread.html
index fdf6369a..acacd602 100644
--- a/templates/post_thread.html
+++ b/templates/post_thread.html
@@ -28,49 +28,10 @@
{{ post.filename|e|bidi_cleanup }}
{% endif %}
{% endif %}
- {% if post.thumb != 'file' and config.image_identification %}
- ,
-
- io
- {% if post.file|extension == 'jpg' %}
- e
- {% endif %}
- g
- t
-
- {% endif %}
+ {% include "post/image_identification.html" %}
)
-
- {% if post.thumb|extension == 'webm' %}
-
- {% else %}
-
- {% endif %}
-
+ {% include "post/image.html" %}
{% endif %}
@@ -98,21 +59,7 @@
{% if post.mod and post.mod|hasPermission(config.mod.show_ip, board.uri) %}
[{{ post.ip }}]
{% endif %}
- {% if config.display_flags and post.modifiers.flag %}
-
- {% endif %}
+ {% include 'post/flag.html' %}
{% if config.poster_ids %}
--
cgit v1.3
From 59874b83769259e3a1b0730405e5f65e46243666 Mon Sep 17 00:00:00 2001
From: czaks
Date: Wed, 16 Apr 2014 15:01:37 +0200
Subject: modularize post templates a little more
---
templates/post/ip.html | 3 +++
templates/post/name.html | 16 ++++++++++++++++
templates/post/poster_id.html | 3 +++
templates/post/subject.html | 5 +++++
templates/post/time.html | 1 +
templates/post_reply.html | 33 ++++++---------------------------
templates/post_thread.html | 32 +++++---------------------------
7 files changed, 39 insertions(+), 54 deletions(-)
create mode 100644 templates/post/ip.html
create mode 100644 templates/post/name.html
create mode 100644 templates/post/poster_id.html
create mode 100644 templates/post/subject.html
create mode 100644 templates/post/time.html
(limited to 'templates/post_reply.html')
diff --git a/templates/post/ip.html b/templates/post/ip.html
new file mode 100644
index 00000000..11581ff9
--- /dev/null
+++ b/templates/post/ip.html
@@ -0,0 +1,3 @@
+{% if post.mod and post.mod|hasPermission(config.mod.show_ip, board.uri) %}
+ [{{ post.ip }}]
+{% endif %}
diff --git a/templates/post/name.html b/templates/post/name.html
new file mode 100644
index 00000000..009b234d
--- /dev/null
+++ b/templates/post/name.html
@@ -0,0 +1,16 @@
+{% set capcode = post.capcode|capcode %}
+{% if post.email|length > 0 %}
+ {# start email #}
+
+{% endif %}
+ {{ post.name|bidi_cleanup }}
+ {% if post.trip|length > 0 %}
+ {{ post.trip }}
+ {% endif %}
+{% if post.email|length > 0 %}
+ {# end email #}
+
+{% endif %}
+{% if capcode %}
+ {{ capcode.cap }}
+{% endif %}
diff --git a/templates/post/poster_id.html b/templates/post/poster_id.html
new file mode 100644
index 00000000..3f168003
--- /dev/null
+++ b/templates/post/poster_id.html
@@ -0,0 +1,3 @@
+{% if config.poster_ids %}
+ ID: {{ post.ip|poster_id(post.id) }}
+{% endif %}
diff --git a/templates/post/subject.html b/templates/post/subject.html
new file mode 100644
index 00000000..0d80d95e
--- /dev/null
+++ b/templates/post/subject.html
@@ -0,0 +1,5 @@
+{% if post.subject|length > 0 %}
+ {# show subject #}
+ {{ post.subject|bidi_cleanup }}
+{% endif %}
+
diff --git a/templates/post/time.html b/templates/post/time.html
new file mode 100644
index 00000000..e6273f94
--- /dev/null
+++ b/templates/post/time.html
@@ -0,0 +1 @@
+
diff --git a/templates/post_reply.html b/templates/post_reply.html
index 530d2626..90ac5065 100644
--- a/templates/post_reply.html
+++ b/templates/post_reply.html
@@ -5,35 +5,14 @@
- {% if config.poster_ids %}
- ID: {{ post.ip|poster_id(post.thread) }}
- {% endif %}
+ {% include 'post/poster_id.html' %}
+
No.
{{ post.id }}
diff --git a/templates/post_thread.html b/templates/post_thread.html
index acacd602..f74427e4 100644
--- a/templates/post_thread.html
+++ b/templates/post_thread.html
@@ -36,35 +36,13 @@