Show More
@@ -49,6 +49,7 b" PARAMETER_OP_ID = 'opening_post_id'" | |||||
49 | PARAMETER_NEED_OPEN_LINK = 'need_open_link' |
|
49 | PARAMETER_NEED_OPEN_LINK = 'need_open_link' | |
50 | PARAMETER_REPLY_LINK = 'reply_link' |
|
50 | PARAMETER_REPLY_LINK = 'reply_link' | |
51 | PARAMETER_NEED_OP_DATA = 'need_op_data' |
|
51 | PARAMETER_NEED_OP_DATA = 'need_op_data' | |
|
52 | PARAMETER_OP_EXTENSIONS = 'op_extensions' | |||
52 |
|
53 | |||
53 | POST_VIEW_PARAMS = ( |
|
54 | POST_VIEW_PARAMS = ( | |
54 | 'need_op_data', |
|
55 | 'need_op_data', | |
@@ -164,6 +165,8 b' class Post(models.Model, Viewable):' | |||||
164 | """ |
|
165 | """ | |
165 | thread = kwargs.get('thread') or self.get_thread() |
|
166 | thread = kwargs.get('thread') or self.get_thread() | |
166 |
|
167 | |||
|
168 | op_extensions = dict() | |||
|
169 | ||||
167 | css_classes = [CSS_CLS_POST] |
|
170 | css_classes = [CSS_CLS_POST] | |
168 | if thread.is_archived(): |
|
171 | if thread.is_archived(): | |
169 | css_classes.append(CSS_CLS_ARCHIVE_POST) |
|
172 | css_classes.append(CSS_CLS_ARCHIVE_POST) | |
@@ -173,6 +176,9 b' class Post(models.Model, Viewable):' | |||||
173 | css_classes.append(CSS_CLS_HIDDEN_POST) |
|
176 | css_classes.append(CSS_CLS_HIDDEN_POST) | |
174 | if thread.is_monochrome(): |
|
177 | if thread.is_monochrome(): | |
175 | css_classes.append(CSS_CLS_MONOCHROME) |
|
178 | css_classes.append(CSS_CLS_MONOCHROME) | |
|
179 | op_extensions['Monochrome'] = '☯' | |||
|
180 | if thread.is_stickerpack(): | |||
|
181 | op_extensions['Sticker Pack'] = '📷' | |||
176 |
|
182 | |||
177 | params = dict() |
|
183 | params = dict() | |
178 | for param in POST_VIEW_PARAMS: |
|
184 | for param in POST_VIEW_PARAMS: | |
@@ -184,6 +190,7 b' class Post(models.Model, Viewable):' | |||||
184 | PARAMETER_IS_OPENING: self.is_opening(), |
|
190 | PARAMETER_IS_OPENING: self.is_opening(), | |
185 | PARAMETER_THREAD: thread, |
|
191 | PARAMETER_THREAD: thread, | |
186 | PARAMETER_CSS_CLASS: CSS_CLASS_DELIMITER.join(css_classes), |
|
192 | PARAMETER_CSS_CLASS: CSS_CLASS_DELIMITER.join(css_classes), | |
|
193 | PARAMETER_OP_EXTENSIONS: op_extensions, | |||
187 | }) |
|
194 | }) | |
188 |
|
195 | |||
189 | return params |
|
196 | return params |
@@ -13,11 +13,9 b'' | |||||
13 | <div class="post-info"> |
|
13 | <div class="post-info"> | |
14 | <a class="post_id" href="{{ post.get_absolute_url }}">#{{ post.id }}</a> |
|
14 | <a class="post_id" href="{{ post.get_absolute_url }}">#{{ post.id }}</a> | |
15 | {% if is_opening %} |
|
15 | {% if is_opening %} | |
16 | {% if thread.is_stickerpack %} |
|
16 | {% for name, character in op_extensions.items %} | |
17 |
<span title="{% trans |
|
17 | <span title="{% trans name %}">{{ character }}</span> | |
18 |
{% e |
|
18 | {% endfor %} | |
19 | <span title="{% trans "Monochrome" %}">☯</span> |
|
|||
20 | {% endif %} |
|
|||
21 | {% endif %} |
|
19 | {% endif %} | |
22 | <span class="title">{{ post.title|escape }}</span> |
|
20 | <span class="title">{{ post.title|escape }}</span> | |
23 | <span class="pub_time" {% if perms.boards.change_post and post.has_ip %}style="border-bottom: solid 2px #{{ post.get_ip_color }};" title="{{ post.poster_ip }}"{% endif %}> |
|
21 | <span class="pub_time" {% if perms.boards.change_post and post.has_ip %}style="border-bottom: solid 2px #{{ post.get_ip_color }};" title="{{ post.poster_ip }}"{% endif %}> |
General Comments 0
You need to be logged in to leave comments.
Login now