##// END OF EJS Templates
Show images count in OP
neko259 -
r538:09070c91 default
parent child Browse files
Show More
@@ -68,6 +68,9 b''
68 </div>
68 </div>
69 {% if post.is_opening and post.thread_new.tags.exists %}
69 {% if post.is_opening and post.thread_new.tags.exists %}
70 <div class="metadata">
70 <div class="metadata">
71 {% if post.is_opening %}
72 {{ post.thread_new.get_images_count }} {% trans 'images' %}.
73 {% endif %}
71 <span class="tags">
74 <span class="tags">
72 {% for tag in post.thread_new.get_tags %}
75 {% for tag in post.thread_new.get_tags %}
73 <a class="tag" href="{% url 'tag' tag.name %}">
76 <a class="tag" href="{% url 'tag' tag.name %}">
@@ -51,6 +51,10 b' def image_actions(*args, **kwargs):'
51
51
52 @register.inclusion_tag('boards/post.html', name='post_view')
52 @register.inclusion_tag('boards/post.html', name='post_view')
53 def post_view(*args, **kwargs):
53 def post_view(*args, **kwargs):
54 """
55 Get post
56 """
57
54 post = args[0]
58 post = args[0]
55
59
56 return { 'post': post }
60 return { 'post': post }
@@ -58,6 +62,11 b' def post_view(*args, **kwargs):'
58
62
59 @register.inclusion_tag('boards/post.html', name='post_view_truncated')
63 @register.inclusion_tag('boards/post.html', name='post_view_truncated')
60 def post_view_truncated(*args, **kwargs):
64 def post_view_truncated(*args, **kwargs):
65 """
66 Get post with truncated text. If the 'open' or 'reply' link is needed, pass
67 the second parameter as True.
68 """
69
61 post = args[0]
70 post = args[0]
62 if len(args) > 1:
71 if len(args) > 1:
63 need_open_link = args[1]
72 need_open_link = args[1]
General Comments 0
You need to be logged in to leave comments. Login now