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