##// 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
@@ -21,43 +21,43 b''
21 {% block head %}{% endblock %}
21 {% block head %}{% endblock %}
22 </head>
22 </head>
23 <body>
23 <body>
24 <script src="{% static 'js/jquery-2.0.1.min.js' %}"></script>
24 <script src="{% static 'js/jquery-2.0.1.min.js' %}"></script>
25 <script src="{% static 'js/jquery-ui-1.10.3.custom.min.js' %}"></script>
25 <script src="{% static 'js/jquery-ui-1.10.3.custom.min.js' %}"></script>
26 <script src="{% static 'js/jquery.mousewheel.js' %}"></script>
26 <script src="{% static 'js/jquery.mousewheel.js' %}"></script>
27 <script src="{% url 'js_info_dict' %}"></script>
27 <script src="{% url 'js_info_dict' %}"></script>
28
28
29 <div class="navigation_panel header">
29 <div class="navigation_panel header">
30 <a class="link" href="{% url 'index' %}">{% trans "All threads" %}</a>
30 <a class="link" href="{% url 'index' %}">{% trans "All threads" %}</a>
31 {% autoescape off %}
31 {% autoescape off %}
32 {{ tags_str }},
32 {{ tags_str }},
33 {% endautoescape %}
33 {% endautoescape %}
34 <a href="{% url 'tags' %}" title="{% trans 'Tag management' %}"
34 <a href="{% url 'tags' %}" title="{% trans 'Tag management' %}"
35 >[...]</a>,
35 >[...]</a>,
36 <a href="{% url 'search' %}" title="{% trans 'Search' %}">[S]</a>.
36 <a href="{% url 'search' %}" title="{% trans 'Search' %}">[S]</a>.
37
37
38 {% if username %}
38 {% if username %}
39 <a href="{% url 'notifications' username %}" title="{% trans 'Notifications' %}"><b>{{ new_notifications_count }}</b> {% trans 'notifications' %}</a>.
39 <a href="{% url 'notifications' username %}" title="{% trans 'Notifications' %}"><b>{{ new_notifications_count }}</b> {% trans 'notifications' %}</a>.
40 {% endif %}
40 {% endif %}
41
41
42 <a class="link" href="{% url 'settings' %}">{% trans 'Settings' %}</a>
42 <a class="link" href="{% url 'settings' %}">{% trans 'Settings' %}</a>
43 </div>
43 </div>
44
44
45 {% block content %}{% endblock %}
45 {% block content %}{% endblock %}
46
46
47 <script src="{% static 'js/3party/highlight.min.js' %}"></script>
47 <script src="{% static 'js/3party/highlight.min.js' %}"></script>
48 <script src="{% static 'js/popup.js' %}"></script>
48 <script src="{% static 'js/popup.js' %}"></script>
49 <script src="{% static 'js/image.js' %}"></script>
49 <script src="{% static 'js/image.js' %}"></script>
50 <script src="{% static 'js/refpopup.js' %}"></script>
50 <script src="{% static 'js/refpopup.js' %}"></script>
51 <script src="{% static 'js/main.js' %}"></script>
51 <script src="{% static 'js/main.js' %}"></script>
52
52
53 <div class="navigation_panel footer">
53 <div class="navigation_panel footer">
54 {% block metapanel %}{% endblock %}
54 {% block metapanel %}{% endblock %}
55 [<a href="{% url 'admin:index' %}">{% trans 'Admin' %}</a>]
55 [<a href="{% url 'admin:index' %}">{% trans 'Admin' %}</a>]
56 {% with ppd=posts_per_day|floatformat:2 %}
56 {% with ppd=posts_per_day|floatformat:2 %}
57 {% blocktrans %}Speed: {{ ppd }} posts per day{% endblocktrans %}
57 {% blocktrans %}Speed: {{ ppd }} posts per day{% endblocktrans %}
58 {% endwith %}
58 {% endwith %}
59 <a class="link" href="#top" id="up">{% trans 'Up' %}</a>
59 <a class="link" href="#top" id="up">{% trans 'Up' %}</a>
60 </div>
60 </div>
61
61
62 </body>
62 </body>
63 </html>
63 </html>
@@ -10,63 +10,6 b''
10 - {{ site_name }}</title>
10 - {{ site_name }}</title>
11 {% endblock %}
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 {% block metapanel %}
13 {% block metapanel %}
71
14
72 {% get_current_language as LANGUAGE_CODE %}
15 {% get_current_language as LANGUAGE_CODE %}
@@ -77,8 +20,11 b''
77 data-ws-project="{{ ws_project }}"
20 data-ws-project="{{ ws_project }}"
78 data-ws-host="{{ ws_host }}"
21 data-ws-host="{{ ws_host }}"
79 data-ws-port="{{ ws_port }}">
22 data-ws-port="{{ ws_port }}">
23
24 {% block thread_meta_panel %}
25 {% endblock %}
26
80 {% cache 600 thread_meta thread.last_edit_time moderator LANGUAGE_CODE %}
27 {% cache 600 thread_meta thread.last_edit_time moderator LANGUAGE_CODE %}
81 <button id="autoupdate">{% trans 'Update' %}</button>
82 <span id="reply-count">{{ thread.get_reply_count }}</span>/{{ max_replies }} {% trans 'messages' %},
28 <span id="reply-count">{{ thread.get_reply_count }}</span>/{{ max_replies }} {% trans 'messages' %},
83 <span id="image-count">{{ thread.get_images_count }}</span> {% trans 'images' %}.
29 <span id="image-count">{{ thread.get_images_count }}</span> {% trans 'images' %}.
84 {% trans 'Last update: ' %}<span id="last-update"><time datetime="{{ thread.last_edit_time|date:'c' }}">{{ thread.last_edit_time|date:'r' }}</time></span>
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 {% load i18n %}
3 {% load i18n %}
4 {% load cache %}
4 {% load cache %}
@@ -51,19 +51,3 b''
51
51
52 {% endspaceless %}
52 {% endspaceless %}
53 {% endblock %}
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 from boards import settings
1 from boards import settings
2 from boards.views.thread import ThreadView
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 CONTEXT_OP = 'opening_post'
6 CONTEXT_OP = 'opening_post'
7 CONTEXT_BUMPLIMIT_PRG = 'bumplimit_progress'
7 CONTEXT_BUMPLIMIT_PRG = 'bumplimit_progress'
General Comments 0
You need to be logged in to leave comments. Login now