Show More
@@ -1,93 +1,89 b'' | |||||
1 | {% extends "boards/base.html" %} |
|
1 | {% extends "boards/base.html" %} | |
2 |
|
2 | |||
3 | {% load i18n %} |
|
3 | {% load i18n %} | |
4 | {% load cache %} |
|
4 | {% load cache %} | |
5 | {% load static from staticfiles %} |
|
5 | {% load static from staticfiles %} | |
6 | {% load board %} |
|
6 | {% load board %} | |
7 |
|
7 | |||
8 | {% block head %} |
|
8 | {% block head %} | |
9 | <title>{{ opening_post.get_title|striptags|truncatewords:10 }} |
|
9 | <title>{{ opening_post.get_title|striptags|truncatewords:10 }} | |
10 | - {{ site_name }}</title> |
|
10 | - {{ site_name }}</title> | |
11 | {% endblock %} |
|
11 | {% endblock %} | |
12 |
|
12 | |||
13 | {% block content %} |
|
13 | {% block content %} | |
14 | {% get_current_language as LANGUAGE_CODE %} |
|
14 | {% get_current_language as LANGUAGE_CODE %} | |
15 |
|
15 | |||
16 | {% cache 600 thread_view thread.id thread.last_edit_time moderator LANGUAGE_CODE %} |
|
16 | {% cache 600 thread_view thread.id thread.last_edit_time moderator LANGUAGE_CODE %} | |
17 |
|
17 | |||
18 | <div class="image-mode-tab"> |
|
18 | <div class="image-mode-tab"> | |
19 | <a class="current_mode" href="{% url 'thread' opening_post.id %}">{% trans 'Normal mode' %}</a>, |
|
19 | <a class="current_mode" href="{% url 'thread' opening_post.id %}">{% trans 'Normal mode' %}</a>, | |
20 | <a href="{% url 'thread_gallery' opening_post.id %}">{% trans 'Gallery mode' %}</a> |
|
20 | <a href="{% url 'thread_gallery' opening_post.id %}">{% trans 'Gallery mode' %}</a> | |
21 | </div> |
|
21 | </div> | |
22 |
|
22 | |||
23 | {% if bumpable %} |
|
23 | {% if bumpable %} | |
24 | <div class="bar-bg"> |
|
24 | <div class="bar-bg"> | |
25 | <div class="bar-value" style="width:{{ bumplimit_progress }}%" id="bumplimit_progress"> |
|
25 | <div class="bar-value" style="width:{{ bumplimit_progress }}%" id="bumplimit_progress"> | |
26 | </div> |
|
26 | </div> | |
27 | <div class="bar-text"> |
|
27 | <div class="bar-text"> | |
28 | <span id="left_to_limit">{{ posts_left }}</span> {% trans 'posts to bumplimit' %} |
|
28 | <span id="left_to_limit">{{ posts_left }}</span> {% trans 'posts to bumplimit' %} | |
29 | </div> |
|
29 | </div> | |
30 | </div> |
|
30 | </div> | |
31 | {% endif %} |
|
31 | {% endif %} | |
32 |
|
32 | |||
33 | <div class="thread"> |
|
33 | <div class="thread"> | |
34 | {% with can_bump=thread.can_bump %} |
|
|||
35 | {% for post in thread.get_replies %} |
|
34 | {% for post in thread.get_replies %} | |
36 | {% with is_opening=forloop.first %} |
|
35 | {% post_view post moderator=moderator %} | |
37 | {% post_view post moderator=moderator %} |
|
|||
38 | {% endwith %} |
|
|||
39 | {% endfor %} |
|
36 | {% endfor %} | |
40 | {% endwith %} |
|
|||
41 | </div> |
|
37 | </div> | |
42 |
|
38 | |||
43 | {% if not thread.archived %} |
|
39 | {% if not thread.archived %} | |
44 | <div class="post-form-w"> |
|
40 | <div class="post-form-w"> | |
45 | <script src="{% static 'js/panel.js' %}"></script> |
|
41 | <script src="{% static 'js/panel.js' %}"></script> | |
46 | <div class="form-title">{% trans "Reply to thread" %} #{{ opening_post.id }}</div> |
|
42 | <div class="form-title">{% trans "Reply to thread" %} #{{ opening_post.id }}</div> | |
47 | <div class="post-form" id="compact-form"> |
|
43 | <div class="post-form" id="compact-form"> | |
48 | <div class="swappable-form-full"> |
|
44 | <div class="swappable-form-full"> | |
49 | <form enctype="multipart/form-data" method="post" id="form">{% csrf_token %} |
|
45 | <form enctype="multipart/form-data" method="post" id="form">{% csrf_token %} | |
50 | <div class="compact-form-text"></div> |
|
46 | <div class="compact-form-text"></div> | |
51 | {{ form.as_div }} |
|
47 | {{ form.as_div }} | |
52 | <div class="form-submit"> |
|
48 | <div class="form-submit"> | |
53 | <input type="submit" value="{% trans "Post" %}"/> |
|
49 | <input type="submit" value="{% trans "Post" %}"/> | |
54 | </div> |
|
50 | </div> | |
55 | (ctrl-enter) |
|
51 | (ctrl-enter) | |
56 | </form> |
|
52 | </form> | |
57 | </div> |
|
53 | </div> | |
58 | <div><a href="{% url "staticpage" name="help" %}"> |
|
54 | <div><a href="{% url "staticpage" name="help" %}"> | |
59 | {% trans 'Text syntax' %}</a></div> |
|
55 | {% trans 'Text syntax' %}</a></div> | |
60 | </div> |
|
56 | </div> | |
61 | </div> |
|
57 | </div> | |
62 |
|
58 | |||
63 | <script src="{% static 'js/jquery.form.min.js' %}"></script> |
|
59 | <script src="{% static 'js/jquery.form.min.js' %}"></script> | |
64 | {% endif %} |
|
60 | {% endif %} | |
65 |
|
61 | |||
66 | <script src="{% static 'js/form.js' %}"></script> |
|
62 | <script src="{% static 'js/form.js' %}"></script> | |
67 | <script src="{% static 'js/thread.js' %}"></script> |
|
63 | <script src="{% static 'js/thread.js' %}"></script> | |
68 | <script src="{% static 'js/thread_update.js' %}"></script> |
|
64 | <script src="{% static 'js/thread_update.js' %}"></script> | |
69 | <script src="{% static 'js/3party/centrifuge.js' %}"></script> |
|
65 | <script src="{% static 'js/3party/centrifuge.js' %}"></script> | |
70 |
|
66 | |||
71 | {% endcache %} |
|
67 | {% endcache %} | |
72 | {% endblock %} |
|
68 | {% endblock %} | |
73 |
|
69 | |||
74 | {% block metapanel %} |
|
70 | {% block metapanel %} | |
75 |
|
71 | |||
76 | {% get_current_language as LANGUAGE_CODE %} |
|
72 | {% get_current_language as LANGUAGE_CODE %} | |
77 |
|
73 | |||
78 | <span class="metapanel" |
|
74 | <span class="metapanel" | |
79 | data-last-update="{{ last_update }}" |
|
75 | data-last-update="{{ last_update }}" | |
80 | data-ws-token="{{ ws_token }}" |
|
76 | data-ws-token="{{ ws_token }}" | |
81 | data-ws-project="{{ ws_project }}" |
|
77 | data-ws-project="{{ ws_project }}" | |
82 | data-ws-host="{{ ws_host }}" |
|
78 | data-ws-host="{{ ws_host }}" | |
83 | data-ws-port="{{ ws_port }}"> |
|
79 | data-ws-port="{{ ws_port }}"> | |
84 | {% cache 600 thread_meta thread.last_edit_time moderator LANGUAGE_CODE %} |
|
80 | {% cache 600 thread_meta thread.last_edit_time moderator LANGUAGE_CODE %} | |
85 | <button id="autoupdate">{% trans 'Update' %}</button> |
|
81 | <button id="autoupdate">{% trans 'Update' %}</button> | |
86 | <span id="reply-count">{{ thread.get_reply_count }}</span>/{{ max_replies }} {% trans 'messages' %}, |
|
82 | <span id="reply-count">{{ thread.get_reply_count }}</span>/{{ max_replies }} {% trans 'messages' %}, | |
87 | <span id="image-count">{{ thread.get_images_count }}</span> {% trans 'images' %}. |
|
83 | <span id="image-count">{{ thread.get_images_count }}</span> {% trans 'images' %}. | |
88 | {% trans 'Last update: ' %}<span id="last-update"><time datetime="{{ thread.last_edit_time|date:'c' }}">{{ thread.last_edit_time|date:'r' }}</time></span> |
|
84 | {% trans 'Last update: ' %}<span id="last-update"><time datetime="{{ thread.last_edit_time|date:'c' }}">{{ thread.last_edit_time|date:'r' }}</time></span> | |
89 | [<a href="rss/">RSS</a>] |
|
85 | [<a href="rss/">RSS</a>] | |
90 | {% endcache %} |
|
86 | {% endcache %} | |
91 | </span> |
|
87 | </span> | |
92 |
|
88 | |||
93 | {% endblock %} |
|
89 | {% endblock %} |
General Comments 0
You need to be logged in to leave comments.
Login now