aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src/main/webapp/WEB-INF/views/thread.html
blob: 5f1cb1485880ddd1011cf029650c0cde013fb8e0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
{% extends "layouts/content" %}
{% import "views/macros/tags" %}
{% block content %}
<ul>
    <li id="msg-{{ msg.mid }}" class="msg msgthread">
        <div class="msg-cont">
            <div class="msg-menu"><a href="#"><i data-icon="ei-link" data-size="s"></i></a></div>
            <div class="msg-ts"><a href="/{{ msg.user.name }}/{{ msg.mid }}">
                <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 class="msg-avatar">
                <a href="/{{ msg.user.name }}/">
                    <img src="//i.juick.com/a/{{ msg.user.uid }}.png" alt="{{ msg.user.name }}"/></a>
            </div>
            <div class="msg-header">@<a href="/{{ msg.user.name }}/">{{ msg.user.name }}</a>:
                <div class="msg-tags">
                    {{ tags(msg.user.name, msg.tags | tagsList) }}
                </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.AttachmentType }}" data-fname="{{ msg.mid }}.{{ msg.AttachmentType }}">
                    <img src="//i.juick.com/photos-512/{{ msg.mid }}.{{ msg.AttachmentType }}" alt=""/>
                </a>
            </div>
            {% endif %}
            {% if msg.VisitorCanComment %}
            <form action="/comment" method="POST" enctype="multipart/form-data">
                <input type="hidden" name="mid" value="{{ msg.mid }}"/>
                <div class="msg-comment">
                    <div class="ta-wrapper">
                        <textarea name="body" rows="1" class="reply" placeholder="{{ i18n("messages","message.writeComment") }}"></textarea>
                    </div>
                </div>
            </form>
            {% endif %}
            {% if recomm is not empty %}
            <div class="msg-recomms">{{ i18n("messages","message.recommendedBy") }} ({{ recomm.size() }}):
                {% for rec in recomm %}
                <a href="/{{ rec }}/">@{{ rec }}</a>{% if loop.index < (loop.length - 1) %}, {% endif %}
                {% endfor %}
            </div>
            {% endif %}
        </div>
    </li>

    <li class="toolbar">
        <ul>
            <li><a href="/{{ msg.mid }}">
                <div style="background-position: -64px 0"></div>
                {{ msg.mid }}</a>
            </li>
            {% if visitor.uid > 0 %}
            {% if visitor.uid != msg.user.uid %}
            {% if visitorSubscribed %}
            <li><a href="/post?body=U+%23{{ msg.mid }}">
                <div style="background-position: -48px 0"></div>
                {{ i18n("messages","message.subscribed") }}</a></li>
            {% else %}
            <li><a href="/post?body=S+%23{{ msg.mid }}">
                <div style="background-position: -16px 0"></div>
                {{ i18n("messages","message.subscribe") }}</a></li>
            {% endif %}
            {% if not visitorInBL %}
            <li><a href="/post?body=%21+%23{{ msg.mid }}">
                <div style="background-position: -32px 0"></div>
                {{ i18n("messages","message.recommend") }}</a></li>
            {% endif %}
            {% else %}
            <li><a href="/post?body=D+%23{{ msg.mid }}">
                <div style="background-position: 0"></div>
                {{ i18n("messages","message.delete") }}</a></li>
            {% endif %}
            {% endif %}
        </ul>
    </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> &middot; </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 %}
</ul>
{% endblock %}
{% block "column" %}
{% endblock %}