##// END OF EJS Templates
Made normal and gallery view use the same super-template with the same...
neko259 -
r1042:603aff15 default
parent child Browse files
Show More
@@ -10,63 +10,6 b''
10 10 - {{ site_name }}</title>
11 11 {% endblock %}
12 12
13 {% block content %}
14 {% get_current_language as LANGUAGE_CODE %}
15
16 {% cache 600 thread_view thread.id thread.last_edit_time moderator LANGUAGE_CODE %}
17
18 <div class="image-mode-tab">
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>
21 </div>
22
23 {% if bumpable %}
24 <div class="bar-bg">
25 <div class="bar-value" style="width:{{ bumplimit_progress }}%" id="bumplimit_progress">
26 </div>
27 <div class="bar-text">
28 <span id="left_to_limit">{{ posts_left }}</span> {% trans 'posts to bumplimit' %}
29 </div>
30 </div>
31 {% endif %}
32
33 <div class="thread">
34 {% for post in thread.get_replies %}
35 {% post_view post moderator=moderator %}
36 {% endfor %}
37 </div>
38
39 {% if not thread.archived %}
40 <div class="post-form-w">
41 <script src="{% static 'js/panel.js' %}"></script>
42 <div class="form-title">{% trans "Reply to thread" %} #{{ opening_post.id }}</div>
43 <div class="post-form" id="compact-form">
44 <div class="swappable-form-full">
45 <form enctype="multipart/form-data" method="post" id="form">{% csrf_token %}
46 <div class="compact-form-text"></div>
47 {{ form.as_div }}
48 <div class="form-submit">
49 <input type="submit" value="{% trans "Post" %}"/>
50 </div>
51 (ctrl-enter)
52 </form>
53 </div>
54 <div><a href="{% url "staticpage" name="help" %}">
55 {% trans 'Text syntax' %}</a></div>
56 </div>
57 </div>
58
59 <script src="{% static 'js/jquery.form.min.js' %}"></script>
60 {% endif %}
61
62 <script src="{% static 'js/form.js' %}"></script>
63 <script src="{% static 'js/thread.js' %}"></script>
64 <script src="{% static 'js/thread_update.js' %}"></script>
65 <script src="{% static 'js/3party/centrifuge.js' %}"></script>
66
67 {% endcache %}
68 {% endblock %}
69
70 13 {% block metapanel %}
71 14
72 15 {% get_current_language as LANGUAGE_CODE %}
@@ -77,8 +20,11 b''
77 20 data-ws-project="{{ ws_project }}"
78 21 data-ws-host="{{ ws_host }}"
79 22 data-ws-port="{{ ws_port }}">
23
24 {% block thread_meta_panel %}
25 {% endblock %}
26
80 27 {% cache 600 thread_meta thread.last_edit_time moderator LANGUAGE_CODE %}
81 <button id="autoupdate">{% trans 'Update' %}</button>
82 28 <span id="reply-count">{{ thread.get_reply_count }}</span>/{{ max_replies }} {% trans 'messages' %},
83 29 <span id="image-count">{{ thread.get_images_count }}</span> {% trans 'images' %}.
84 30 {% trans 'Last update: ' %}<span id="last-update"><time datetime="{{ thread.last_edit_time|date:'c' }}">{{ thread.last_edit_time|date:'r' }}</time></span>
@@ -1,4 +1,4 b''
1 {% extends "boards/base.html" %}
1 {% extends "boards/thread.html" %}
2 2
3 3 {% load i18n %}
4 4 {% load cache %}
@@ -51,19 +51,3 b''
51 51
52 52 {% endspaceless %}
53 53 {% endblock %}
54
55 {% block metapanel %}
56
57 {% get_current_language as LANGUAGE_CODE %}
58
59 <span class="metapanel" data-last-update="{{ last_update }}">
60 {% cache 600 thread_gallery_meta thread.last_edit_time moderator LANGUAGE_CODE %}
61 <span id="reply-count">{{ thread.get_reply_count }}</span>/{{ max_replies }}
62 {% trans 'messages' %},
63 <span id="image-count">{{ thread.get_images_count }}</span> {% trans 'images' %}.
64 {% trans 'Last update: ' %}<time datetime="{{ thread.last_edit_time|date:'c' }}">{{ thread.last_edit_time|date:'r' }}</time>
65 [<a href="rss/">RSS</a>]
66 {% endcache %}
67 </span>
68
69 {% endblock %}
@@ -1,7 +1,7 b''
1 1 from boards import settings
2 2 from boards.views.thread import ThreadView
3 3
4 TEMPLATE_NORMAL = 'boards/thread.html'
4 TEMPLATE_NORMAL = 'boards/thread_normal.html'
5 5
6 6 CONTEXT_OP = 'opening_post'
7 7 CONTEXT_BUMPLIMIT_PRG = 'bumplimit_progress'
General Comments 0
You need to be logged in to leave comments. Login now