Show More
@@ -1,96 +1,93 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 %} |
|
34 | {% with can_bump=thread.can_bump %} | |
35 | {% for post in thread.get_replies %} |
|
35 | {% for post in thread.get_replies %} | |
36 | {% with is_opening=forloop.first %} |
|
36 | {% with is_opening=forloop.first %} | |
37 | {% post_view post moderator=moderator is_opening=is_opening thread=thread bumpable=can_bump opening_post_id=opening_post.id %} |
|
37 | {% post_view post moderator=moderator is_opening=is_opening thread=thread bumpable=can_bump opening_post_id=opening_post.id %} | |
38 | {% endwith %} |
|
38 | {% endwith %} | |
39 | {% endfor %} |
|
39 | {% endfor %} | |
40 | {% endwith %} |
|
40 | {% endwith %} | |
41 | </div> |
|
41 | </div> | |
42 |
|
42 | |||
43 | {% if not thread.archived %} |
|
43 | {% if not thread.archived %} | |
44 | <div class="post-form-w" id="form"> |
|
44 | <div class="post-form-w" id="form"> | |
45 | <script src="{% static 'js/panel.js' %}"></script> |
|
45 | <script src="{% static 'js/panel.js' %}"></script> | |
46 | <div class="form-title">{% trans "Reply to thread" %} #{{ opening_post.id }}</div> |
|
46 | <div class="form-title">{% trans "Reply to thread" %} #{{ opening_post.id }}</div> | |
47 | <div class="post-form" id="compact-form"> |
|
47 | <div class="post-form" id="compact-form"> | |
48 | <div class="swappable-form-full"> |
|
48 | <div class="swappable-form-full"> | |
49 | <form enctype="multipart/form-data" method="post" |
|
49 | <form enctype="multipart/form-data" method="post" | |
50 | >{% csrf_token %} |
|
50 | >{% csrf_token %} | |
51 | <div class="compact-form-text"></div> |
|
51 | <div class="compact-form-text"></div> | |
52 | {{ form.as_div }} |
|
52 | {{ form.as_div }} | |
53 | <div class="form-submit"> |
|
53 | <div class="form-submit"> | |
54 | <input type="submit" value="{% trans "Post" %}"/> |
|
54 | <input type="submit" value="{% trans "Post" %}"/> | |
55 | </div> |
|
55 | </div> | |
56 | </form> |
|
56 | </form> | |
57 | </div> |
|
57 | </div> | |
58 | <a onclick="swapForm(); return false;" href="#"> |
|
|||
59 | {% trans 'Switch mode' %} |
|
|||
60 | </a> |
|
|||
61 | <div><a href="{% url "staticpage" name="help" %}"> |
|
58 | <div><a href="{% url "staticpage" name="help" %}"> | |
62 | {% trans 'Text syntax' %}</a></div> |
|
59 | {% trans 'Text syntax' %}</a></div> | |
63 | </div> |
|
60 | </div> | |
64 | </div> |
|
61 | </div> | |
65 |
|
62 | |||
66 | <script src="{% static 'js/jquery.form.min.js' %}"></script> |
|
63 | <script src="{% static 'js/jquery.form.min.js' %}"></script> | |
67 | <script src="{% static 'js/thread_update.js' %}"></script> |
|
64 | <script src="{% static 'js/thread_update.js' %}"></script> | |
68 | <script src="{% static 'js/3party/centrifuge.js' %}"></script> |
|
65 | <script src="{% static 'js/3party/centrifuge.js' %}"></script> | |
69 | {% endif %} |
|
66 | {% endif %} | |
70 |
|
67 | |||
71 | <script src="{% static 'js/form.js' %}"></script> |
|
68 | <script src="{% static 'js/form.js' %}"></script> | |
72 | <script src="{% static 'js/thread.js' %}"></script> |
|
69 | <script src="{% static 'js/thread.js' %}"></script> | |
73 |
|
70 | |||
74 | {% endcache %} |
|
71 | {% endcache %} | |
75 | {% endblock %} |
|
72 | {% endblock %} | |
76 |
|
73 | |||
77 | {% block metapanel %} |
|
74 | {% block metapanel %} | |
78 |
|
75 | |||
79 | {% get_current_language as LANGUAGE_CODE %} |
|
76 | {% get_current_language as LANGUAGE_CODE %} | |
80 |
|
77 | |||
81 | <span class="metapanel" |
|
78 | <span class="metapanel" | |
82 | data-last-update="{{ last_update }}" |
|
79 | data-last-update="{{ last_update }}" | |
83 | data-ws-token="{{ ws_token }}" |
|
80 | data-ws-token="{{ ws_token }}" | |
84 | data-ws-project="{{ ws_project }}" |
|
81 | data-ws-project="{{ ws_project }}" | |
85 | data-ws-host="{{ ws_host }}" |
|
82 | data-ws-host="{{ ws_host }}" | |
86 | data-ws-port="{{ ws_port }}"> |
|
83 | data-ws-port="{{ ws_port }}"> | |
87 | {% cache 600 thread_meta thread.last_edit_time moderator LANGUAGE_CODE %} |
|
84 | {% cache 600 thread_meta thread.last_edit_time moderator LANGUAGE_CODE %} | |
88 | <span id="autoupdate">[-]</span> |
|
85 | <span id="autoupdate">[-]</span> | |
89 | <span id="reply-count">{{ thread.get_reply_count }}</span>/{{ max_replies }} {% trans 'messages' %}, |
|
86 | <span id="reply-count">{{ thread.get_reply_count }}</span>/{{ max_replies }} {% trans 'messages' %}, | |
90 | <span id="image-count">{{ thread.get_images_count }}</span> {% trans 'images' %}. |
|
87 | <span id="image-count">{{ thread.get_images_count }}</span> {% trans 'images' %}. | |
91 | {% trans 'Last update: ' %}<span id="last-update">{{ thread.last_edit_time }}</span> |
|
88 | {% trans 'Last update: ' %}<span id="last-update">{{ thread.last_edit_time }}</span> | |
92 | [<a href="rss/">RSS</a>] |
|
89 | [<a href="rss/">RSS</a>] | |
93 | {% endcache %} |
|
90 | {% endcache %} | |
94 | </span> |
|
91 | </span> | |
95 |
|
92 | |||
96 | {% endblock %} |
|
93 | {% endblock %} |
General Comments 0
You need to be logged in to leave comments.
Login now