diff options
Diffstat (limited to 'juick-www/src/main/resources')
4 files changed, 49 insertions, 123 deletions
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 %} - <li id="{{ msg.rid }}" style="margin-left: {{ margin }}px;{% if hidden %}display: none;{% endif %}" 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-ts"> - <a href="/{{ msg.mid }}#{{ msg.rid }}"> - <time datetime="{{ msg.timestamp | timestamp | date('yyyy-MM-dd HH:mm:ss') }}Z" - title="{{ msg.timestamp | timestamp | date('yyyy-MM-dd HH:mm:ss') }} GMT"> - {{ msg.timestamp | prettyTime }} - </time> - </a> - </div> - </div> - <div class="msg-txt">{{ msg | formatMessage }}</div> - {% if msg.AttachmentType is not empty %} - <div class="msg-media"> - <a href="//i.juick.com/p/{{ msg.mid }}-{{ msg.rid }}.{{ msg.AttachmentType }}" data-fname="{{ msg.mid }}-{{ msg.rid }}.{{ msg.AttachmentType }}"> - <img src="//i.juick.com/photos-512/{{ msg.mid }}-{{ msg.rid }}.{{ msg.AttachmentType }}" alt=""/> - </a> - </div> - {% endif %} - <div class="msg-links">/{{ msg.rid }} -{% if msg.replyto > 0 %} - {{ i18n("messages","reply.inReplyTo") }} <a href="#{{ msg.replyto }}">/{{ msg.replyto }}</a> -{% endif %} -{% if msg.VisitorCanComment %} - · <a href="/post?body=%23{{ msg.mid }}/{{ msg.rid }}%20" class="a-thread-comment">{{ i18n("messages","reply.reply") }}</a></div> - <div class="msg-comment-target msg-comment-hidden"></div> -{% elseif visitor.uid == 0 %} - · <a href="#" class="a-login">{{ i18n("messages","reply.reply") }}</a></div> -{% endif %} - -{% if level == 0 and msg.childsCount > 1 and replies.size() > 10 %} - <div class="msg-comments"><a href="#">{{ msg | formatReplies }}</a></div> -{% endif %} - </li> - {% 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 %} -<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-ts"> - <a href="/{{ msg.mid }}#{{ msg.rid }}"> - <time datetime="{{ msg.timestamp | timestamp | date('yyyy-MM-dd HH:mm:ss') }}Z" - title="{{ msg.timestamp | timestamp | date('yyyy-MM-dd HH:mm:ss') }} GMT"> - {{ msg.timestamp | prettyTime }} - </time> - </a> - </div> - </div> - <div class="msg-txt">{{ msg | formatMessage }}</div> - {% if msg.AttachmentType is not empty %} - <div class="msg-media"> - <a href="//i.juick.com/p/{{ msg.mid }}-{{ msg.rid }}.{{ msg.AttachmentType }}" data-fname="{{ msg.mid }}-{{ msg.rid }}.{{ msg.AttachmentType }}"> - <img src="//i.juick.com/photos-512/{{ msg.mid }}-{{ msg.rid }}.{{ msg.AttachmentType }}" alt=""/> - </a> - </div> - {% endif %} - <div class="msg-links">/{{ msg.rid }} - {% if msg.replyto > 0 %} - {{ i18n("messages","reply.inReplyTo") }} <a href="#{{ msg.replyto }}">/{{ msg.replyto }}</a> - {% endif %} - {% if msg.VisitorCanComment %} - · <a href="/post?body=%23{{ msg.mid }}/{{ msg.rid }}%20" class="a-thread-comment">{{ i18n("messages","reply.reply") }}</a> - </div> - <div class="msg-comment-target msg-comment-hidden"></div> - {% elseif visitor.uid == 0 %} - · <a href="#" class="a-login">{{ i18n("messages","reply.reply") }}</a> - </div> - {% else %} - </div> - {% endif %} - </div> -</li> -{% 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 @@ </li> </ul> <div class="title2"> - <div class="title2-right"> - {% if listview %} - <a href="?view=tree" rel="nofollow">{{ i18n("messages","replies.showAsTree") }}</a> - {% else %} - {% if foldable %} - <span id="unfoldall"><a href="#">{{ i18n("messages","replies.unfoldAll") }}</a> · </span> - {% endif %} - <a href="?view=list" rel="nofollow">{{ i18n("messages","replies.showAsList") }}</a> - {% endif %} - </div> <h2>{{ i18n("messages","reply.replies") }} ({{ replies.size() }})</h2> </div> <ul id="replies"> - {% if (listview) %} - {% include "views/partial/thread_list" %} - {% else %} - {% include "views/partial/thread_tree" %} - {% endif %} + {% 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-ts"> + <a href="/{{ msg.mid }}#{{ msg.rid }}"> + <time datetime="{{ msg.timestamp | timestamp | date('yyyy-MM-dd HH:mm:ss') }}Z" + title="{{ msg.timestamp | timestamp | date('yyyy-MM-dd HH:mm:ss') }} GMT"> + {{ msg.timestamp | prettyTime }} + </time> + </a> + </div> + </div> + <div class="msg-txt">{{ msg | formatMessage }}</div> + {% if msg.AttachmentType is not empty %} + <div class="msg-media"> + <a href="//i.juick.com/p/{{ msg.mid }}-{{ msg.rid }}.{{ msg.AttachmentType }}" data-fname="{{ msg.mid }}-{{ msg.rid }}.{{ msg.AttachmentType }}"> + <img src="//i.juick.com/photos-512/{{ msg.mid }}-{{ msg.rid }}.{{ msg.AttachmentType }}" alt=""/> + </a> + </div> + {% endif %} + <div class="msg-links">/{{ msg.rid }} + {% if msg.replyto > 0 %} + {{ i18n("messages","reply.inReplyTo") }} <a href="#{{ msg.replyto }}">/{{ msg.replyto }}</a> + {% endif %} + {% if msg.VisitorCanComment %} + · <a href="/post?body=%23{{ msg.mid }}/{{ msg.rid }}%20" class="a-thread-comment">{{ i18n("messages","reply.reply") }}</a> + </div> + <div class="msg-comment-target msg-comment-hidden"></div> + {% elseif visitor.uid == 0 %} + · <a href="#" class="a-login">{{ i18n("messages","reply.reply") }}</a> + </div> + {% else %} + </div> + {% endif %} + </div> + </li> + {% endfor %} </ul> {% endblock %} {% block "column" %} |