Show More
@@ -1,200 +1,202 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 board %} |
|
5 | {% load board %} | |
6 | {% load static %} |
|
6 | {% load static %} | |
7 |
|
7 | |||
8 | {% block head %} |
|
8 | {% block head %} | |
9 | {% if tag %} |
|
9 | {% if tag %} | |
10 | <title>{{ tag.name }} - {{ site_name }}</title> |
|
10 | <title>{{ tag.name }} - {{ site_name }}</title> | |
11 | {% else %} |
|
11 | {% else %} | |
12 | <title>{{ site_name }}</title> |
|
12 | <title>{{ site_name }}</title> | |
13 | {% endif %} |
|
13 | {% endif %} | |
14 |
|
14 | |||
15 | {% if current_page.has_previous %} |
|
15 | {% if current_page.has_previous %} | |
16 | <link rel="prev" href=" |
|
16 | <link rel="prev" href=" | |
17 | {% if tag %} |
|
17 | {% if tag %} | |
18 | {% url "tag" tag_name=tag.name page=current_page.previous_page_number %} |
|
18 | {% url "tag" tag_name=tag.name page=current_page.previous_page_number %} | |
19 | {% elif archived %} |
|
19 | {% elif archived %} | |
20 | {% url "archive" page=current_page.previous_page_number %} |
|
20 | {% url "archive" page=current_page.previous_page_number %} | |
21 | {% else %} |
|
21 | {% else %} | |
22 | {% url "index" page=current_page.previous_page_number %} |
|
22 | {% url "index" page=current_page.previous_page_number %} | |
23 | {% endif %} |
|
23 | {% endif %} | |
24 | " /> |
|
24 | " /> | |
25 | {% endif %} |
|
25 | {% endif %} | |
26 | {% if current_page.has_next %} |
|
26 | {% if current_page.has_next %} | |
27 | <link rel="next" href=" |
|
27 | <link rel="next" href=" | |
28 | {% if tag %} |
|
28 | {% if tag %} | |
29 | {% url "tag" tag_name=tag.name page=current_page.next_page_number %} |
|
29 | {% url "tag" tag_name=tag.name page=current_page.next_page_number %} | |
30 | {% elif archived %} |
|
30 | {% elif archived %} | |
31 | {% url "archive" page=current_page.next_page_number %} |
|
31 | {% url "archive" page=current_page.next_page_number %} | |
32 | {% else %} |
|
32 | {% else %} | |
33 | {% url "index" page=current_page.next_page_number %} |
|
33 | {% url "index" page=current_page.next_page_number %} | |
34 | {% endif %} |
|
34 | {% endif %} | |
35 | " /> |
|
35 | " /> | |
36 | {% endif %} |
|
36 | {% endif %} | |
37 |
|
37 | |||
38 | {% endblock %} |
|
38 | {% endblock %} | |
39 |
|
39 | |||
40 | {% block content %} |
|
40 | {% block content %} | |
41 |
|
41 | |||
42 | {% get_current_language as LANGUAGE_CODE %} |
|
42 | {% get_current_language as LANGUAGE_CODE %} | |
43 |
|
43 | |||
44 | {% if tag %} |
|
44 | {% if tag %} | |
45 | <div class="tag_info"> |
|
45 | <div class="tag_info"> | |
46 | <h2> |
|
46 | <h2> | |
47 | {% if tag in fav_tags %} |
|
47 | {% if tag in fav_tags %} | |
48 | <a href="{% url 'tag' tag.name %}?method=unsubscribe&next={{ request.path }}" |
|
48 | <a href="{% url 'tag' tag.name %}?method=unsubscribe&next={{ request.path }}" | |
49 | class="fav" rel="nofollow">β </a> |
|
49 | class="fav" rel="nofollow">β </a> | |
50 | {% else %} |
|
50 | {% else %} | |
51 | <a href="{% url 'tag' tag.name %}?method=subscribe&next={{ request.path }}" |
|
51 | <a href="{% url 'tag' tag.name %}?method=subscribe&next={{ request.path }}" | |
52 | class="not_fav" rel="nofollow">β </a> |
|
52 | class="not_fav" rel="nofollow">β </a> | |
53 | {% endif %} |
|
53 | {% endif %} | |
54 | {% if tag in hidden_tags %} |
|
54 | {% if tag in hidden_tags %} | |
55 | <a href="{% url 'tag' tag.name %}?method=unhide&next={{ request.path }}" |
|
55 | <a href="{% url 'tag' tag.name %}?method=unhide&next={{ request.path }}" | |
56 | title="{% trans 'Show tag' %}" |
|
56 | title="{% trans 'Show tag' %}" | |
57 | class="fav" rel="nofollow">H</a> |
|
57 | class="fav" rel="nofollow">H</a> | |
58 | {% else %} |
|
58 | {% else %} | |
59 | <a href="{% url 'tag' tag.name %}?method=hide&next={{ request.path }}" |
|
59 | <a href="{% url 'tag' tag.name %}?method=hide&next={{ request.path }}" | |
60 | title="{% trans 'Hide tag' %}" |
|
60 | title="{% trans 'Hide tag' %}" | |
61 | class="not_fav" rel="nofollow">H</a> |
|
61 | class="not_fav" rel="nofollow">H</a> | |
62 | {% endif %} |
|
62 | {% endif %} | |
63 | {% autoescape off %} |
|
63 | {% autoescape off %} | |
64 | {{ tag.get_view }} |
|
64 | {{ tag.get_view }} | |
65 | {% endautoescape %} |
|
65 | {% endautoescape %} | |
|
66 | {% if moderator %} | |||
66 | [<a href="{% url 'admin:boards_tag_change' tag.id %}"$>{% trans 'Edit tag' %}</a>] |
|
67 | [<a href="{% url 'admin:boards_tag_change' tag.id %}"$>{% trans 'Edit tag' %}</a>] | |
|
68 | {% endif %} | |||
67 | </h2> |
|
69 | </h2> | |
68 | </div> |
|
70 | </div> | |
69 | {% endif %} |
|
71 | {% endif %} | |
70 |
|
72 | |||
71 | {% if threads %} |
|
73 | {% if threads %} | |
72 | {% if current_page.has_previous %} |
|
74 | {% if current_page.has_previous %} | |
73 | <div class="page_link"> |
|
75 | <div class="page_link"> | |
74 | <a href=" |
|
76 | <a href=" | |
75 | {% if tag %} |
|
77 | {% if tag %} | |
76 | {% url "tag" tag_name=tag.name page=current_page.previous_page_number %} |
|
78 | {% url "tag" tag_name=tag.name page=current_page.previous_page_number %} | |
77 | {% elif archived %} |
|
79 | {% elif archived %} | |
78 | {% url "archive" page=current_page.previous_page_number %} |
|
80 | {% url "archive" page=current_page.previous_page_number %} | |
79 | {% else %} |
|
81 | {% else %} | |
80 | {% url "index" page=current_page.previous_page_number %} |
|
82 | {% url "index" page=current_page.previous_page_number %} | |
81 | {% endif %} |
|
83 | {% endif %} | |
82 | ">{% trans "Previous page" %}</a> |
|
84 | ">{% trans "Previous page" %}</a> | |
83 | </div> |
|
85 | </div> | |
84 | {% endif %} |
|
86 | {% endif %} | |
85 |
|
87 | |||
86 | {% for thread in threads %} |
|
88 | {% for thread in threads %} | |
87 | {% cache 600 thread_short thread.id thread.last_edit_time moderator LANGUAGE_CODE %} |
|
89 | {% cache 600 thread_short thread.id thread.last_edit_time moderator LANGUAGE_CODE %} | |
88 | <div class="thread"> |
|
90 | <div class="thread"> | |
89 | {% with can_bump=thread.can_bump %} |
|
91 | {% with can_bump=thread.can_bump %} | |
90 | {% post_view thread.get_opening_post moderator is_opening=True thread=thread can_bump=can_bump truncated=True need_open_link=True %} |
|
92 | {% post_view thread.get_opening_post moderator is_opening=True thread=thread can_bump=can_bump truncated=True need_open_link=True %} | |
91 | {% if not thread.archived %} |
|
93 | {% if not thread.archived %} | |
92 | {% with last_replies=thread.get_last_replies %} |
|
94 | {% with last_replies=thread.get_last_replies %} | |
93 | {% if last_replies %} |
|
95 | {% if last_replies %} | |
94 | {% if thread.get_skipped_replies_count %} |
|
96 | {% if thread.get_skipped_replies_count %} | |
95 | <div class="skipped_replies"> |
|
97 | <div class="skipped_replies"> | |
96 | <a href="{% url 'thread' thread.get_opening_post.id %}"> |
|
98 | <a href="{% url 'thread' thread.get_opening_post.id %}"> | |
97 | {% blocktrans with count=thread.get_skipped_replies_count %}Skipped {{ count }} replies. Open thread to see all replies.{% endblocktrans %} |
|
99 | {% blocktrans with count=thread.get_skipped_replies_count %}Skipped {{ count }} replies. Open thread to see all replies.{% endblocktrans %} | |
98 | </a> |
|
100 | </a> | |
99 | </div> |
|
101 | </div> | |
100 | {% endif %} |
|
102 | {% endif %} | |
101 | <div class="last-replies"> |
|
103 | <div class="last-replies"> | |
102 | {% for post in last_replies %} |
|
104 | {% for post in last_replies %} | |
103 | {% post_view post moderator=moderator is_opening=False thread=thread can_bump=can_bump truncated=True %} |
|
105 | {% post_view post moderator=moderator is_opening=False thread=thread can_bump=can_bump truncated=True %} | |
104 | {% endfor %} |
|
106 | {% endfor %} | |
105 | </div> |
|
107 | </div> | |
106 | {% endif %} |
|
108 | {% endif %} | |
107 | {% endwith %} |
|
109 | {% endwith %} | |
108 | {% endif %} |
|
110 | {% endif %} | |
109 | {% endwith %} |
|
111 | {% endwith %} | |
110 | </div> |
|
112 | </div> | |
111 | {% endcache %} |
|
113 | {% endcache %} | |
112 | {% endfor %} |
|
114 | {% endfor %} | |
113 |
|
115 | |||
114 | {% if current_page.has_next %} |
|
116 | {% if current_page.has_next %} | |
115 | <div class="page_link"> |
|
117 | <div class="page_link"> | |
116 | <a href=" |
|
118 | <a href=" | |
117 | {% if tag %} |
|
119 | {% if tag %} | |
118 | {% url "tag" tag_name=tag.name page=current_page.next_page_number %} |
|
120 | {% url "tag" tag_name=tag.name page=current_page.next_page_number %} | |
119 | {% elif archived %} |
|
121 | {% elif archived %} | |
120 | {% url "archive" page=current_page.next_page_number %} |
|
122 | {% url "archive" page=current_page.next_page_number %} | |
121 | {% else %} |
|
123 | {% else %} | |
122 | {% url "index" page=current_page.next_page_number %} |
|
124 | {% url "index" page=current_page.next_page_number %} | |
123 | {% endif %} |
|
125 | {% endif %} | |
124 | ">{% trans "Next page" %}</a> |
|
126 | ">{% trans "Next page" %}</a> | |
125 | </div> |
|
127 | </div> | |
126 | {% endif %} |
|
128 | {% endif %} | |
127 | {% else %} |
|
129 | {% else %} | |
128 | <div class="post"> |
|
130 | <div class="post"> | |
129 | {% trans 'No threads exist. Create the first one!' %}</div> |
|
131 | {% trans 'No threads exist. Create the first one!' %}</div> | |
130 | {% endif %} |
|
132 | {% endif %} | |
131 |
|
133 | |||
132 | <div class="post-form-w"> |
|
134 | <div class="post-form-w"> | |
133 | <script src="{% static 'js/panel.js' %}"></script> |
|
135 | <script src="{% static 'js/panel.js' %}"></script> | |
134 | <div class="post-form"> |
|
136 | <div class="post-form"> | |
135 | <div class="form-title">{% trans "Create new thread" %}</div> |
|
137 | <div class="form-title">{% trans "Create new thread" %}</div> | |
136 | <div class="swappable-form-full"> |
|
138 | <div class="swappable-form-full"> | |
137 | <form enctype="multipart/form-data" method="post">{% csrf_token %} |
|
139 | <form enctype="multipart/form-data" method="post">{% csrf_token %} | |
138 | {{ form.as_div }} |
|
140 | {{ form.as_div }} | |
139 | <div class="form-submit"> |
|
141 | <div class="form-submit"> | |
140 | <input type="submit" value="{% trans "Post" %}"/> |
|
142 | <input type="submit" value="{% trans "Post" %}"/> | |
141 | </div> |
|
143 | </div> | |
142 | </form> |
|
144 | </form> | |
143 | </div> |
|
145 | </div> | |
144 | <div> |
|
146 | <div> | |
145 | {% trans 'Tags must be delimited by spaces. Text or image is required.' %} |
|
147 | {% trans 'Tags must be delimited by spaces. Text or image is required.' %} | |
146 | </div> |
|
148 | </div> | |
147 | <div><a href="{% url "staticpage" name="help" %}"> |
|
149 | <div><a href="{% url "staticpage" name="help" %}"> | |
148 | {% trans 'Text syntax' %}</a></div> |
|
150 | {% trans 'Text syntax' %}</a></div> | |
149 | </div> |
|
151 | </div> | |
150 | </div> |
|
152 | </div> | |
151 |
|
153 | |||
152 | <script src="{% static 'js/form.js' %}"></script> |
|
154 | <script src="{% static 'js/form.js' %}"></script> | |
153 |
|
155 | |||
154 | {% endblock %} |
|
156 | {% endblock %} | |
155 |
|
157 | |||
156 | {% block metapanel %} |
|
158 | {% block metapanel %} | |
157 |
|
159 | |||
158 | <span class="metapanel"> |
|
160 | <span class="metapanel"> | |
159 | <b><a href="{% url "authors" %}">{{ site_name }}</a> {{ version }}</b> |
|
161 | <b><a href="{% url "authors" %}">{{ site_name }}</a> {{ version }}</b> | |
160 | {% trans "Pages:" %} |
|
162 | {% trans "Pages:" %} | |
161 | <a href=" |
|
163 | <a href=" | |
162 | {% if tag %} |
|
164 | {% if tag %} | |
163 | {% url "tag" tag_name=tag.name page=paginator.page_range|first %} |
|
165 | {% url "tag" tag_name=tag.name page=paginator.page_range|first %} | |
164 | {% elif archived %} |
|
166 | {% elif archived %} | |
165 | {% url "archive" page=paginator.page_range|first %} |
|
167 | {% url "archive" page=paginator.page_range|first %} | |
166 | {% else %} |
|
168 | {% else %} | |
167 | {% url "index" page=paginator.page_range|first %} |
|
169 | {% url "index" page=paginator.page_range|first %} | |
168 | {% endif %} |
|
170 | {% endif %} | |
169 | "><<</a> |
|
171 | "><<</a> | |
170 | [ |
|
172 | [ | |
171 | {% for page in paginator.center_range %} |
|
173 | {% for page in paginator.center_range %} | |
172 | <a |
|
174 | <a | |
173 | {% ifequal page current_page.number %} |
|
175 | {% ifequal page current_page.number %} | |
174 | class="current_page" |
|
176 | class="current_page" | |
175 | {% endifequal %} |
|
177 | {% endifequal %} | |
176 | href=" |
|
178 | href=" | |
177 | {% if tag %} |
|
179 | {% if tag %} | |
178 | {% url "tag" tag_name=tag.name page=page %} |
|
180 | {% url "tag" tag_name=tag.name page=page %} | |
179 | {% elif archived %} |
|
181 | {% elif archived %} | |
180 | {% url "archive" page=page %} |
|
182 | {% url "archive" page=page %} | |
181 | {% else %} |
|
183 | {% else %} | |
182 | {% url "index" page=page %} |
|
184 | {% url "index" page=page %} | |
183 | {% endif %} |
|
185 | {% endif %} | |
184 | ">{{ page }}</a> |
|
186 | ">{{ page }}</a> | |
185 | {% if not forloop.last %},{% endif %} |
|
187 | {% if not forloop.last %},{% endif %} | |
186 | {% endfor %} |
|
188 | {% endfor %} | |
187 | ] |
|
189 | ] | |
188 | <a href=" |
|
190 | <a href=" | |
189 | {% if tag %} |
|
191 | {% if tag %} | |
190 | {% url "tag" tag_name=tag.name page=paginator.page_range|last %} |
|
192 | {% url "tag" tag_name=tag.name page=paginator.page_range|last %} | |
191 | {% elif archived %} |
|
193 | {% elif archived %} | |
192 | {% url "archive" page=paginator.page_range|last %} |
|
194 | {% url "archive" page=paginator.page_range|last %} | |
193 | {% else %} |
|
195 | {% else %} | |
194 | {% url "index" page=paginator.page_range|last %} |
|
196 | {% url "index" page=paginator.page_range|last %} | |
195 | {% endif %} |
|
197 | {% endif %} | |
196 | ">>></a> |
|
198 | ">>></a> | |
197 | [<a href="rss/">RSS</a>] |
|
199 | [<a href="rss/">RSS</a>] | |
198 | </span> |
|
200 | </span> | |
199 |
|
201 | |||
200 | {% endblock %} |
|
202 | {% endblock %} |
General Comments 0
You need to be logged in to leave comments.
Login now