From 1f5869fcfe8c537d223b750754025cb2937d4bad Mon Sep 17 00:00:00 2001
From: Vitaly Takmazov
Date: Wed, 7 Mar 2018 14:53:23 +0300
Subject: drop replies tree
---
.../resources/templates/views/macros/tree.html | 57 -------------------
.../templates/views/partial/thread_list.html | 49 -----------------
.../templates/views/partial/thread_tree.html | 2 -
.../src/main/resources/templates/views/thread.html | 64 +++++++++++++++++-----
4 files changed, 49 insertions(+), 123 deletions(-)
delete mode 100644 juick-www/src/main/resources/templates/views/macros/tree.html
delete mode 100644 juick-www/src/main/resources/templates/views/partial/thread_list.html
delete mode 100644 juick-www/src/main/resources/templates/views/partial/thread_tree.html
(limited to 'juick-www/src/main/resources/templates')
diff --git a/juick-www/src/main/resources/templates/views/macros/tree.html b/juick-www/src/main/resources/templates/views/macros/tree.html
deleted file mode 100644
index 71ffd74b..00000000
--- a/juick-www/src/main/resources/templates/views/macros/tree.html
+++ /dev/null
@@ -1,57 +0,0 @@
-{% macro tree(replies, visitor, level, margin, hidden) %}
-{% for msg in replies %}
- {% if msg.replyto == level %}
-
-
-
-
{{ msg | formatMessage }}
- {% if msg.AttachmentType is not empty %}
-
- {% endif %}
-
/{{ msg.rid }}
-{% if msg.replyto > 0 %}
- {{ i18n("messages","reply.inReplyTo") }}
/{{ msg.replyto }}
-{% endif %}
-{% if msg.VisitorCanComment %}
- ·
-
-{% elseif visitor.uid == 0 %}
- ·
{{ i18n("messages","reply.reply") }}
-{% endif %}
-
-{% if level == 0 and msg.childsCount > 1 and replies.size() > 10 %}
-
-{% endif %}
-
- {% if (level == 0 and msg.childsCount > 1 and replies.size() > 10) %}
- {{ tree(msg.childs, visitor, msg.rid, margin + 20, true) }}
- {% elseif (msg.childsCount > 0) %}
- {{ tree(msg.childs, visitor, msg.rid, margin + 20, hidden) }}
- {% endif %}
- {% endif %}
-{% endfor %}
-{% endmacro %}
\ No newline at end of file
diff --git a/juick-www/src/main/resources/templates/views/partial/thread_list.html b/juick-www/src/main/resources/templates/views/partial/thread_list.html
deleted file mode 100644
index f273dec7..00000000
--- a/juick-www/src/main/resources/templates/views/partial/thread_list.html
+++ /dev/null
@@ -1,49 +0,0 @@
-{% for msg in replies %}
-
-
-
-
{{ msg | formatMessage }}
- {% if msg.AttachmentType is not empty %}
-
- {% endif %}
-
/{{ msg.rid }}
- {% if msg.replyto > 0 %}
- {{ i18n("messages","reply.inReplyTo") }}
/{{ msg.replyto }}
- {% endif %}
- {% if msg.VisitorCanComment %}
- ·
-
-
- {% elseif visitor.uid == 0 %}
- ·
{{ i18n("messages","reply.reply") }}
-
- {% else %}
-
- {% endif %}
-
-
-{% endfor %}
\ No newline at end of file
diff --git a/juick-www/src/main/resources/templates/views/partial/thread_tree.html b/juick-www/src/main/resources/templates/views/partial/thread_tree.html
deleted file mode 100644
index f207b8e0..00000000
--- a/juick-www/src/main/resources/templates/views/partial/thread_tree.html
+++ /dev/null
@@ -1,2 +0,0 @@
-{% import "views/macros/tree" %}
-{{ tree(replies, visitor, 0, 0, false) }}
\ No newline at end of file
diff --git a/juick-www/src/main/resources/templates/views/thread.html b/juick-www/src/main/resources/templates/views/thread.html
index 2115f442..ae429365 100644
--- a/juick-www/src/main/resources/templates/views/thread.html
+++ b/juick-www/src/main/resources/templates/views/thread.html
@@ -108,25 +108,59 @@
-
{{ i18n("messages","reply.replies") }} ({{ replies.size() }})
- {% if (listview) %}
- {% include "views/partial/thread_list" %}
- {% else %}
- {% include "views/partial/thread_tree" %}
- {% endif %}
+ {% for msg in replies %}
+ -
+
+
+
{{ msg | formatMessage }}
+ {% if msg.AttachmentType is not empty %}
+
+ {% endif %}
+
/{{ msg.rid }}
+ {% if msg.replyto > 0 %}
+ {{ i18n("messages","reply.inReplyTo") }}
/{{ msg.replyto }}
+ {% endif %}
+ {% if msg.VisitorCanComment %}
+ ·
+
+
+ {% elseif visitor.uid == 0 %}
+ ·
{{ i18n("messages","reply.reply") }}
+
+ {% else %}
+
+ {% endif %}
+
+
+ {% endfor %}
{% endblock %}
{% block "column" %}
--
cgit v1.2.3