##// END OF EJS Templates
Slightly changed and optimized tag thread counters
neko259 -
r2087:1a07d841 default
parent child Browse files
Show More
@@ -79,17 +79,7 b''
79 <p>{{ tag.get_description|safe }}</p>
79 <p>{{ tag.get_description|safe }}</p>
80 {% endif %}
80 {% endif %}
81 <p>
81 <p>
82 {% with active_count=tag.get_active_thread_count bumplimit_count=tag.get_bumplimit_thread_count archived_count=tag.get_archived_thread_count %}
82 ● {{ tag_thread_count_active }} + {{ tag_thread_count_bumplimit }} + {{ tag_thread_count_archive }} = {{ tag_thread_count }}<br/>
83 {% if active_count %}
84 ● {{ active_count }}&ensp;
85 {% endif %}
86 {% if bumplimit_count %}
87 ◍ {{ bumplimit_count }}&ensp;
88 {% endif %}
89 {% if archived_count %}
90 ○ {{ archived_count }}&ensp;
91 {% endif %}
92 {% endwith %}
93 ♥ {{ tag.get_post_count }}
83 ♥ {{ tag.get_post_count }}
94 </p>
84 </p>
95 {% if tag.get_all_parents %}
85 {% if tag.get_all_parents %}
@@ -14,6 +14,10 b" PARAM_IS_FAVORITE = 'is_favorite'"
14 PARAM_IS_HIDDEN = 'is_hidden'
14 PARAM_IS_HIDDEN = 'is_hidden'
15 PARAM_RANDOM_IMAGE_POST = 'random_image_post'
15 PARAM_RANDOM_IMAGE_POST = 'random_image_post'
16 PARAM_RELATED_TAGS = 'related_tags'
16 PARAM_RELATED_TAGS = 'related_tags'
17 PARAM_THREAD_COUNT = 'tag_thread_count'
18 PARAM_THREAD_COUNT_ACTIVE = 'tag_thread_count_active'
19 PARAM_THREAD_COUNT_BUMPLIMIT = 'tag_thread_count_bumplimit'
20 PARAM_THREAD_COUNT_ARCHIVE = 'tag_thread_count_archive'
17
21
18
22
19 __author__ = 'neko259'
23 __author__ = 'neko259'
@@ -52,6 +56,16 b' class TagView(AllThreadsView, Dispatcher'
52 params[PARAM_RANDOM_IMAGE_POST] = tag.get_random_image_post()
56 params[PARAM_RANDOM_IMAGE_POST] = tag.get_random_image_post()
53 params[PARAM_RELATED_TAGS] = tag.get_related_tags()
57 params[PARAM_RELATED_TAGS] = tag.get_related_tags()
54
58
59 active_count = tag.get_active_thread_count()
60 bumplimit_count = tag.get_bumplimit_thread_count()
61 archive_count = tag.get_archived_thread_count()
62 total_count = active_count + bumplimit_count + archive_count
63
64 params[PARAM_THREAD_COUNT_ACTIVE] = active_count
65 params[PARAM_THREAD_COUNT_BUMPLIMIT] = bumplimit_count
66 params[PARAM_THREAD_COUNT_ARCHIVE] = archive_count
67 params[PARAM_THREAD_COUNT] = total_count
68
55 return params
69 return params
56
70
57 def get_reverse_url(self):
71 def get_reverse_url(self):
General Comments 0
You need to be logged in to leave comments. Login now