diff --git a/boards/models/post/__init__.py b/boards/models/post/__init__.py --- a/boards/models/post/__init__.py +++ b/boards/models/post/__init__.py @@ -49,6 +49,7 @@ PARAMETER_OP_ID = 'opening_post_id' PARAMETER_NEED_OPEN_LINK = 'need_open_link' PARAMETER_REPLY_LINK = 'reply_link' PARAMETER_NEED_OP_DATA = 'need_op_data' +PARAMETER_OP_EXTENSIONS = 'op_extensions' POST_VIEW_PARAMS = ( 'need_op_data', @@ -164,6 +165,8 @@ class Post(models.Model, Viewable): """ thread = kwargs.get('thread') or self.get_thread() + op_extensions = dict() + css_classes = [CSS_CLS_POST] if thread.is_archived(): css_classes.append(CSS_CLS_ARCHIVE_POST) @@ -173,6 +176,9 @@ class Post(models.Model, Viewable): css_classes.append(CSS_CLS_HIDDEN_POST) if thread.is_monochrome(): css_classes.append(CSS_CLS_MONOCHROME) + op_extensions['Monochrome'] = '☯' + if thread.is_stickerpack(): + op_extensions['Sticker Pack'] = '📷' params = dict() for param in POST_VIEW_PARAMS: @@ -184,6 +190,7 @@ class Post(models.Model, Viewable): PARAMETER_IS_OPENING: self.is_opening(), PARAMETER_THREAD: thread, PARAMETER_CSS_CLASS: CSS_CLASS_DELIMITER.join(css_classes), + PARAMETER_OP_EXTENSIONS: op_extensions, }) return params diff --git a/boards/templates/boards/post.html b/boards/templates/boards/post.html --- a/boards/templates/boards/post.html +++ b/boards/templates/boards/post.html @@ -13,11 +13,9 @@