From d91c5508f2172347e18ad93f6048582deda4ae02 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Mon, 26 Feb 2018 12:06:10 +0300 Subject: www: move templates to resources --- .../resources/templates/views/macros/tags.html | 5 ++ .../resources/templates/views/macros/tree.html | 57 ++++++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 juick-www/src/main/resources/templates/views/macros/tags.html create mode 100644 juick-www/src/main/resources/templates/views/macros/tree.html (limited to 'juick-www/src/main/resources/templates/views/macros') diff --git a/juick-www/src/main/resources/templates/views/macros/tags.html b/juick-www/src/main/resources/templates/views/macros/tags.html new file mode 100644 index 00000000..09278ffe --- /dev/null +++ b/juick-www/src/main/resources/templates/views/macros/tags.html @@ -0,0 +1,5 @@ +{% macro tags(uname="", tagsList) %} +{% for tag in tagsList %} +{{ tag | raw }} +{% endfor %} +{% endmacro %} \ No newline at end of file diff --git a/juick-www/src/main/resources/templates/views/macros/tree.html b/juick-www/src/main/resources/templates/views/macros/tree.html new file mode 100644 index 00000000..71ffd74b --- /dev/null +++ b/juick-www/src/main/resources/templates/views/macros/tree.html @@ -0,0 +1,57 @@ +{% 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 }}
    + {% if msg.AttachmentType is not empty %} +
    + + + +
    + {% endif %} + +
    +{% 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