From f5a87d2b7072426cfe36527db1270e5f85b73e01 Mon Sep 17 00:00:00 2001
From: Vitaly Takmazov
Date: Fri, 28 Jul 2017 14:21:01 +0300
Subject: user thread is on pebble now
---
.../src/main/webapp/WEB-INF/views/macros/tree.html | 54 +++++++++++
.../main/webapp/WEB-INF/views/partial/message.html | 6 +-
.../webapp/WEB-INF/views/partial/thread_list.html | 44 +++++++++
.../webapp/WEB-INF/views/partial/thread_tree.html | 2 +
.../src/main/webapp/WEB-INF/views/thread.html | 108 +++++++++++++++++++++
5 files changed, 212 insertions(+), 2 deletions(-)
create mode 100644 juick-www/src/main/webapp/WEB-INF/views/macros/tree.html
create mode 100644 juick-www/src/main/webapp/WEB-INF/views/partial/thread_list.html
create mode 100644 juick-www/src/main/webapp/WEB-INF/views/partial/thread_tree.html
create mode 100644 juick-www/src/main/webapp/WEB-INF/views/thread.html
(limited to 'juick-www/src/main/webapp/WEB-INF/views')
diff --git a/juick-www/src/main/webapp/WEB-INF/views/macros/tree.html b/juick-www/src/main/webapp/WEB-INF/views/macros/tree.html
new file mode 100644
index 00000000..3e35f92a
--- /dev/null
+++ b/juick-www/src/main/webapp/WEB-INF/views/macros/tree.html
@@ -0,0 +1,54 @@
+{% macro tree(replies, visitor, level, margin, hidden) %}
+{% for msg in replies %}
+ {% if msg.replyto == level %}
+
+
+
+
{{ msg | formatMessage }}
+
+
/{{ msg.rid }}
+{% if msg.replyto > 0 %}
+ в ответ на
/{{ msg.replyto }}
+{% endif %}
+{% if msg.VisitorCanComment %}
+ ·
+
+{% elseif visitor.uid == 0 %}
+ ·
Ответить
+{% 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/webapp/WEB-INF/views/partial/message.html b/juick-www/src/main/webapp/WEB-INF/views/partial/message.html
index cdfad6b6..f67362ce 100644
--- a/juick-www/src/main/webapp/WEB-INF/views/partial/message.html
+++ b/juick-www/src/main/webapp/WEB-INF/views/partial/message.html
@@ -1,7 +1,9 @@
- @{{ msg.user.name }}:
+
+ @{{ msg.user.name }}:
+
+
+
+
+{% endfor %}
\ No newline at end of file
diff --git a/juick-www/src/main/webapp/WEB-INF/views/partial/thread_tree.html b/juick-www/src/main/webapp/WEB-INF/views/partial/thread_tree.html
new file mode 100644
index 00000000..f207b8e0
--- /dev/null
+++ b/juick-www/src/main/webapp/WEB-INF/views/partial/thread_tree.html
@@ -0,0 +1,2 @@
+{% import "views/macros/tree" %}
+{{ tree(replies, visitor, 0, 0, false) }}
\ No newline at end of file
diff --git a/juick-www/src/main/webapp/WEB-INF/views/thread.html b/juick-www/src/main/webapp/WEB-INF/views/thread.html
new file mode 100644
index 00000000..301ad8f8
--- /dev/null
+++ b/juick-www/src/main/webapp/WEB-INF/views/thread.html
@@ -0,0 +1,108 @@
+{% extends "layouts/content" %}
+{% import "views/macros/tags" %}
+{% block content %}
+
+ -
+
+
+
+
+
+
+
+
+
{{ msg | formatMessage }}
+ {% if msg.AttachmentType is not empty %}
+
+ {% endif %}
+ {% if msg.VisitorCanComment %}
+
+ {% endif %}
+ {% if recomm is not empty %}
+
Рекомендовали ({{ recomm.size() }}):
+ {% for rec in recomm %}
+
@{{ rec }}{% if loop.index < (loop.length - 1) %}, {% endif %}
+ {% endfor %}
+
+ {% endif %}
+
+
+
+ -
+
+
+
+
+
+
Ответы ({{ replies.size() }})
+
+
+
+ {% if (listview) %}
+ {% include "views/partial/thread_list" %}
+ {% else %}
+ {% include "views/partial/thread_tree" %}
+ {% endif %}
+
+{% endblock %}
+{% block "column" %}
+{% endblock %}
\ No newline at end of file
--
cgit v1.2.3