aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src/main/webapp/WEB-INF/views/partial
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2017-07-28 14:21:01 +0300
committerGravatar Vitaly Takmazov2017-08-18 09:39:11 +0000
commitf5a87d2b7072426cfe36527db1270e5f85b73e01 (patch)
tree66c2e2834b7bcd28a083e2239b23a7ee12ae06d9 /juick-www/src/main/webapp/WEB-INF/views/partial
parent6110f14830a9345aeac7eccfe4919c109b4a6434 (diff)
user thread is on pebble now
Diffstat (limited to 'juick-www/src/main/webapp/WEB-INF/views/partial')
-rw-r--r--juick-www/src/main/webapp/WEB-INF/views/partial/message.html6
-rw-r--r--juick-www/src/main/webapp/WEB-INF/views/partial/thread_list.html44
-rw-r--r--juick-www/src/main/webapp/WEB-INF/views/partial/thread_tree.html2
3 files changed, 50 insertions, 2 deletions
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 @@
<article data-mid="{{ msg.mid }}">
- <header class="h">@<a href="/{{ msg.user.name }}/">{{ msg.user.name }}</a>:
+ <header class="h">
+ @<a href="/{{ msg.user.name }}/">{{ msg.user.name }}</a>:
<div class="msg-avatar"><a href="/{{ msg.user.name }}/">
- <img src="//i.juick.com/a/{{ msg.user.uid }}.png" alt="{{ msg.user.name }}"/></a></div>
+ <img src="//i.juick.com/a/{{ msg.user.uid }}.png" alt="{{ msg.user.name }}"/></a>
+ </div>
<div class="msg-menu"><a href="#"></a></div>
<div class="msg-ts">
<a href="/{{ msg.user.name }}/{{ msg.mid }}">
diff --git a/juick-www/src/main/webapp/WEB-INF/views/partial/thread_list.html b/juick-www/src/main/webapp/WEB-INF/views/partial/thread_list.html
new file mode 100644
index 00000000..b59d8b22
--- /dev/null
+++ b/juick-www/src/main/webapp/WEB-INF/views/partial/thread_list.html
@@ -0,0 +1,44 @@
+{% for msg in replies %}
+<li id="{{ msg.rid }}" class="msg">
+ <div class="msg-cont">
+ <div class="msg-header">
+ {% if not msg.user.banned %}
+ @<a href="/{{ msg.user.name }}/">{{ msg.user.name }}</a>:
+ <div class="msg-avatar"><a href="/{{ msg.user.name }}/">
+ <img src="//i.juick.com/a/{{ msg.user.uid }}.png" alt="{{ msg.user.name }}"/></a>
+ </div>
+ {% else %}
+ [удалено]:
+ <div class="msg-avatar">
+ <img src="//i.juick.com/av-96.png"/>
+ </div>
+ {% endif %}
+ <div class="msg-menu">
+ <a href="#" class="a-thread-links"></a>
+ </div>
+ <div class="msg-ts">
+ <a href="/{{ msg.mid }}#{{ msg.rid }}">
+ <time datetime="{{ msg.date | date('yyyy-MM-dd HH:mm:ss') }}Z"
+ title="{{ msg.date | date('yyyy-MM-dd HH:mm:ss') }} GMT">
+ {{ msg.date | prettyTime }}
+ </time>
+ </a>
+ </div>
+ </div>
+ <div class="msg-txt">{{ msg | formatMessage }}</div>
+ <div class="msg-media"></div>
+ <div class="msg-links">/{{ msg.rid }}
+ {% if msg.replyto > 0 %}
+ в ответ на <a href="#{{ msg.replyto }}">/{{ msg.replyto }}</a>
+ {% endif %}
+ {% if msg.VisitorCanComment %}
+ &#183; <a href="/post?body=%23{{ msg.mid }}/{{ msg.rid }}%20" class="a-thread-comment">Ответить</a>
+ </div>
+ <div class="msg-comment" style="display: none;"></div>
+ {% else %}
+ </div>
+ {% endif %}
+ </div>
+ </div>
+</li>
+{% 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