##// END OF EJS Templates
Removed faulty caches
neko259 -
r1649:0d7c9d95 default
parent child Browse files
Show More
@@ -1,213 +1,210 b''
1 {% extends "boards/base.html" %}
1 {% extends "boards/base.html" %}
2
2
3 {% load i18n %}
3 {% load i18n %}
4 {% load board %}
4 {% load board %}
5 {% load static %}
5 {% load static %}
6 {% load tz %}
6 {% load tz %}
7 {% load cache %}
8
7
9 {% block head %}
8 {% block head %}
10 <meta name="robots" content="noindex">
9 <meta name="robots" content="noindex">
11
10
12 {% if tag %}
11 {% if tag %}
13 <title>{{ tag.name }} - {{ site_name }}</title>
12 <title>{{ tag.name }} - {{ site_name }}</title>
14 {% else %}
13 {% else %}
15 <title>{{ site_name }}</title>
14 <title>{{ site_name }}</title>
16 {% endif %}
15 {% endif %}
17
16
18 {% if prev_page_link %}
17 {% if prev_page_link %}
19 <link rel="prev" href="{{ prev_page_link }}" />
18 <link rel="prev" href="{{ prev_page_link }}" />
20 {% endif %}
19 {% endif %}
21 {% if next_page_link %}
20 {% if next_page_link %}
22 <link rel="next" href="{{ next_page_link }}" />
21 <link rel="next" href="{{ next_page_link }}" />
23 {% endif %}
22 {% endif %}
24
23
25 {% endblock %}
24 {% endblock %}
26
25
27 {% block content %}
26 {% block content %}
28
27
29 {% get_current_language as LANGUAGE_CODE %}
28 {% get_current_language as LANGUAGE_CODE %}
30 {% get_current_timezone as TIME_ZONE %}
29 {% get_current_timezone as TIME_ZONE %}
31
30
32 {% for banner in banners %}
31 {% for banner in banners %}
33 <div class="post">
32 <div class="post">
34 <div class="title">{{ banner.title }}</div>
33 <div class="title">{{ banner.title }}</div>
35 <div>{{ banner.get_text|safe }}</div>
34 <div>{{ banner.get_text|safe }}</div>
36 <div>{% trans 'Details' %}: <a href="{{ banner.post.get_absolute_url }}">>>{{ banner.post.id }}</a></div>
35 <div>{% trans 'Details' %}: <a href="{{ banner.post.get_absolute_url }}">>>{{ banner.post.id }}</a></div>
37 </div>
36 </div>
38 {% endfor %}
37 {% endfor %}
39
38
40 {% if tag %}
39 {% if tag %}
41 <div class="tag_info" style="border-bottom: solid .5ex #{{ tag.get_color }}">
40 <div class="tag_info" style="border-bottom: solid .5ex #{{ tag.get_color }}">
42 {% if random_image_post %}
41 {% if random_image_post %}
43 <div class="tag-image">
42 <div class="tag-image">
44 {% with image=random_image_post.get_first_image %}
43 {% with image=random_image_post.get_first_image %}
45 <a href="{{ random_image_post.get_absolute_url }}"><img
44 <a href="{{ random_image_post.get_absolute_url }}"><img
46 src="{{ image.get_thumb_url }}"
45 src="{{ image.get_thumb_url }}"
47 width="{{ image.get_preview_size.0 }}"
46 width="{{ image.get_preview_size.0 }}"
48 height="{{ image.get_preview_size.1 }}"
47 height="{{ image.get_preview_size.1 }}"
49 alt="{{ random_image_post.id }}"/></a>
48 alt="{{ random_image_post.id }}"/></a>
50 {% endwith %}
49 {% endwith %}
51 </div>
50 </div>
52 {% endif %}
51 {% endif %}
53 <div class="tag-text-data">
52 <div class="tag-text-data">
54 <h2>
53 <h2>
55 /{{ tag.get_view|safe }}/
54 /{{ tag.get_view|safe }}/
56 </h2>
55 </h2>
57 {% if perms.change_tag %}
56 {% if perms.change_tag %}
58 <div class="moderator_info"><a href="{% url 'admin:boards_tag_change' tag.id %}">{% trans 'Edit tag' %}</a></div>
57 <div class="moderator_info"><a href="{% url 'admin:boards_tag_change' tag.id %}">{% trans 'Edit tag' %}</a></div>
59 {% endif %}
58 {% endif %}
60 <p>
59 <p>
61 <form action="{% url 'tag' tag.name %}" method="post" class="post-button-form">
60 <form action="{% url 'tag' tag.name %}" method="post" class="post-button-form">
62 {% if is_favorite %}
61 {% if is_favorite %}
63 <button name="method" value="unsubscribe" class="fav">★ {% trans "Remove from favorites" %}</button>
62 <button name="method" value="unsubscribe" class="fav">★ {% trans "Remove from favorites" %}</button>
64 {% else %}
63 {% else %}
65 <button name="method" value="subscribe" class="not_fav">★ {% trans "Add to favorites" %}</button>
64 <button name="method" value="subscribe" class="not_fav">★ {% trans "Add to favorites" %}</button>
66 {% endif %}
65 {% endif %}
67 </form>
66 </form>
68 <form action="{% url 'tag' tag.name %}" method="post" class="post-button-form">
67 <form action="{% url 'tag' tag.name %}" method="post" class="post-button-form">
69 {% if is_hidden %}
68 {% if is_hidden %}
70 <button name="method" value="unhide" class="fav">{% trans "Show" %}</button>
69 <button name="method" value="unhide" class="fav">{% trans "Show" %}</button>
71 {% else %}
70 {% else %}
72 <button name="method" value="hide" class="not_fav">{% trans "Hide" %}</button>
71 <button name="method" value="hide" class="not_fav">{% trans "Hide" %}</button>
73 {% endif %}
72 {% endif %}
74 </form>
73 </form>
75 <a href="{% url 'tag_gallery' tag.name %}">{% trans 'Gallery' %}</a>
74 <a href="{% url 'tag_gallery' tag.name %}">{% trans 'Gallery' %}</a>
76 </p>
75 </p>
77 {% if tag.get_description %}
76 {% if tag.get_description %}
78 <p>{{ tag.get_description|safe }}</p>
77 <p>{{ tag.get_description|safe }}</p>
79 {% endif %}
78 {% endif %}
80 <p>
79 <p>
81 {% with active_count=tag.get_active_thread_count bumplimit_count=tag.get_bumplimit_thread_count archived_count=tag.get_archived_thread_count %}
80 {% with active_count=tag.get_active_thread_count bumplimit_count=tag.get_bumplimit_thread_count archived_count=tag.get_archived_thread_count %}
82 {% if active_count %}
81 {% if active_count %}
83 ● {{ active_count }}&ensp;
82 ● {{ active_count }}&ensp;
84 {% endif %}
83 {% endif %}
85 {% if bumplimit_count %}
84 {% if bumplimit_count %}
86 ◍ {{ bumplimit_count }}&ensp;
85 ◍ {{ bumplimit_count }}&ensp;
87 {% endif %}
86 {% endif %}
88 {% if archived_count %}
87 {% if archived_count %}
89 ○ {{ archived_count }}&ensp;
88 ○ {{ archived_count }}&ensp;
90 {% endif %}
89 {% endif %}
91 {% endwith %}
90 {% endwith %}
92 ♥ {{ tag.get_post_count }}
91 ♥ {{ tag.get_post_count }}
93 </p>
92 </p>
94 {% if tag.get_all_parents %}
93 {% if tag.get_all_parents %}
95 <p>
94 <p>
96 {% for parent in tag.get_all_parents %}
95 {% for parent in tag.get_all_parents %}
97 {{ parent.get_view|safe }} &gt;
96 {{ parent.get_view|safe }} &gt;
98 {% endfor %}
97 {% endfor %}
99 {{ tag.get_view|safe }}
98 {{ tag.get_view|safe }}
100 </p>
99 </p>
101 {% endif %}
100 {% endif %}
102 {% if tag.get_children.all %}
101 {% if tag.get_children.all %}
103 <p>
102 <p>
104 {% trans "Subsections: " %}
103 {% trans "Subsections: " %}
105 {% for child in tag.get_children.all %}
104 {% for child in tag.get_children.all %}
106 {{ child.get_view|safe }}{% if not forloop.last%}, {% endif %}
105 {{ child.get_view|safe }}{% if not forloop.last%}, {% endif %}
107 {% endfor %}
106 {% endfor %}
108 </p>
107 </p>
109 {% endif %}
108 {% endif %}
110 </div>
109 </div>
111 </div>
110 </div>
112 {% endif %}
111 {% endif %}
113
112
114 {% if threads %}
113 {% if threads %}
115 {% if prev_page_link %}
114 {% if prev_page_link %}
116 <div class="page_link">
115 <div class="page_link">
117 <a href="{{ prev_page_link }}">{% trans "Previous page" %}</a>
116 <a href="{{ prev_page_link }}">{% trans "Previous page" %}</a>
118 </div>
117 </div>
119 {% endif %}
118 {% endif %}
120
119
121 {% for thread in threads %}
120 {% for thread in threads %}
122 {% cache 500 thread thread.id thread.last_edit_time LANGUAGE_CODE TIME_ZONE %}
123 <div class="thread">
121 <div class="thread">
124 {% post_view thread.get_opening_post thread=thread truncated=True need_open_link=True %}
122 {% post_view thread.get_opening_post thread=thread truncated=True need_open_link=True %}
125 {% if not thread.archived %}
123 {% if not thread.archived %}
126 {% with last_replies=thread.get_last_replies %}
124 {% with last_replies=thread.get_last_replies %}
127 {% if last_replies %}
125 {% if last_replies %}
128 {% with skipped_replies_count=thread.get_skipped_replies_count %}
126 {% with skipped_replies_count=thread.get_skipped_replies_count %}
129 {% if skipped_replies_count %}
127 {% if skipped_replies_count %}
130 <div class="skipped_replies">
128 <div class="skipped_replies">
131 <a href="{% url 'thread' thread.get_opening_post_id %}">
129 <a href="{% url 'thread' thread.get_opening_post_id %}">
132 {% blocktrans count count=skipped_replies_count %}Skipped {{ count }} reply. Open thread to see all replies.{% plural %}Skipped {{ count }} replies. Open thread to see all replies.{% endblocktrans %}
130 {% blocktrans count count=skipped_replies_count %}Skipped {{ count }} reply. Open thread to see all replies.{% plural %}Skipped {{ count }} replies. Open thread to see all replies.{% endblocktrans %}
133 </a>
131 </a>
134 </div>
132 </div>
135 {% endif %}
133 {% endif %}
136 {% endwith %}
134 {% endwith %}
137 <div class="last-replies">
135 <div class="last-replies">
138 {% for post in last_replies %}
136 {% for post in last_replies %}
139 {% post_view post truncated=True %}
137 {% post_view post truncated=True %}
140 {% endfor %}
138 {% endfor %}
141 </div>
139 </div>
142 {% endif %}
140 {% endif %}
143 {% endwith %}
141 {% endwith %}
144 {% endif %}
142 {% endif %}
145 </div>
143 </div>
146 {% endcache %}
147 {% endfor %}
144 {% endfor %}
148
145
149 {% if next_page_link %}
146 {% if next_page_link %}
150 <div class="page_link">
147 <div class="page_link">
151 <a href="{{ next_page_link }}">{% trans "Next page" %}</a>
148 <a href="{{ next_page_link }}">{% trans "Next page" %}</a>
152 </div>
149 </div>
153 {% endif %}
150 {% endif %}
154 {% else %}
151 {% else %}
155 <div class="post">
152 <div class="post">
156 {% trans 'No threads exist. Create the first one!' %}</div>
153 {% trans 'No threads exist. Create the first one!' %}</div>
157 {% endif %}
154 {% endif %}
158
155
159 <div class="post-form-w">
156 <div class="post-form-w">
160 <script src="{% static 'js/panel.js' %}"></script>
157 <script src="{% static 'js/panel.js' %}"></script>
161 <div class="post-form" data-hasher="{% static 'js/3party/sha256.js' %}"
158 <div class="post-form" data-hasher="{% static 'js/3party/sha256.js' %}"
162 data-pow-script="{% static 'js/proof_of_work.js' %}">
159 data-pow-script="{% static 'js/proof_of_work.js' %}">
163 <div class="form-title">{% trans "Create new thread" %}</div>
160 <div class="form-title">{% trans "Create new thread" %}</div>
164 <div class="swappable-form-full">
161 <div class="swappable-form-full">
165 <form enctype="multipart/form-data" method="post" id="form">{% csrf_token %}
162 <form enctype="multipart/form-data" method="post" id="form">{% csrf_token %}
166 {{ form.as_div }}
163 {{ form.as_div }}
167 <div class="form-submit">
164 <div class="form-submit">
168 <input type="submit" value="{% trans "Post" %}"/>
165 <input type="submit" value="{% trans "Post" %}"/>
169 <button id="preview-button" type="button" onclick="return false;">{% trans 'Preview' %}</button>
166 <button id="preview-button" type="button" onclick="return false;">{% trans 'Preview' %}</button>
170 <button id="file-source-button" type="button" onclick="return false;">{% trans 'Change file source' %}</button>
167 <button id="file-source-button" type="button" onclick="return false;">{% trans 'Change file source' %}</button>
171 </div>
168 </div>
172 </form>
169 </form>
173 </div>
170 </div>
174 <div>
171 <div>
175 {% trans 'Tags must be delimited by spaces. Text or image is required.' %}
172 {% trans 'Tags must be delimited by spaces. Text or image is required.' %}
176 {% with size=max_file_size|filesizeformat %}
173 {% with size=max_file_size|filesizeformat %}
177 {% blocktrans %}Max file size is {{ size }}.{% endblocktrans %}
174 {% blocktrans %}Max file size is {{ size }}.{% endblocktrans %}
178 {% endwith %}
175 {% endwith %}
179 </div>
176 </div>
180 <div id="preview-text"></div>
177 <div id="preview-text"></div>
181 <div><a href="{% url "staticpage" name="help" %}">{% trans 'Text syntax' %}</a></div>
178 <div><a href="{% url "staticpage" name="help" %}">{% trans 'Text syntax' %}</a></div>
182 <div><a href="{% url "tags" "required" %}">{% trans 'Tags' %}</a></div>
179 <div><a href="{% url "tags" "required" %}">{% trans 'Tags' %}</a></div>
183 </div>
180 </div>
184 </div>
181 </div>
185
182
186 <script src="{% static 'js/form.js' %}"></script>
183 <script src="{% static 'js/form.js' %}"></script>
187 <script src="{% static 'js/3party/jquery.blockUI.js' %}"></script>
184 <script src="{% static 'js/3party/jquery.blockUI.js' %}"></script>
188 <script src="{% static 'js/thread_create.js' %}"></script>
185 <script src="{% static 'js/thread_create.js' %}"></script>
189
186
190 {% endblock %}
187 {% endblock %}
191
188
192 {% block metapanel %}
189 {% block metapanel %}
193
190
194 <span class="metapanel">
191 <span class="metapanel">
195 <b><a href="{% url "authors" %}">{{ site_name }}</a> {{ version }}</b>
192 <b><a href="{% url "authors" %}">{{ site_name }}</a> {{ version }}</b>
196 {% trans "Pages:" %}
193 {% trans "Pages:" %}
197 [
194 [
198 {% with dividers=paginator.get_dividers %}
195 {% with dividers=paginator.get_dividers %}
199 {% for page in paginator.get_divided_range %}
196 {% for page in paginator.get_divided_range %}
200 {% if page in dividers %}
197 {% if page in dividers %}
201 …,
198 …,
202 {% endif %}
199 {% endif %}
203 <a
200 <a
204 {% ifequal page current_page.number %}
201 {% ifequal page current_page.number %}
205 class="current_page"
202 class="current_page"
206 {% endifequal %}
203 {% endifequal %}
207 href="{% page_url paginator page %}">{{ page }}</a>{% if not forloop.last %},{% endif %}
204 href="{% page_url paginator page %}">{{ page }}</a>{% if not forloop.last %},{% endif %}
208 {% endfor %}
205 {% endfor %}
209 {% endwith %}
206 {% endwith %}
210 ]
207 ]
211 </span>
208 </span>
212
209
213 {% endblock %}
210 {% endblock %}
General Comments 0
You need to be logged in to leave comments. Login now