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 ++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 juick-www/src/main/webapp/WEB-INF/views/macros/tree.html (limited to 'juick-www/src/main/webapp/WEB-INF/views/macros') 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 %} +
  • +
    +
    +{% if not msg.user.banned %} + @{{ msg.user.name }}: +
    + {{ msg.user.name }} +
    +{% else %} + [удалено]: +
    + +
    +{% endif %} +
    + +
    + +
    +
    {{ msg | formatMessage }}
    +
    + + +{% elseif visitor.uid == 0 %} + ·
    +{% endif %} + +{% if level == 0 and msg.childsCount > 1 and replies.size() > 10 %} +
    {{ msg | formatReplies }}
    +{% 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 -- cgit v1.2.3