diff --git a/boards/templates/boards/all_threads.html b/boards/templates/boards/all_threads.html --- a/boards/templates/boards/all_threads.html +++ b/boards/templates/boards/all_threads.html @@ -79,17 +79,7 @@

{{ tag.get_description|safe }}

{% endif %}

- {% with active_count=tag.get_active_thread_count bumplimit_count=tag.get_bumplimit_thread_count archived_count=tag.get_archived_thread_count %} - {% if active_count %} - ● {{ active_count }}  - {% endif %} - {% if bumplimit_count %} - ◍ {{ bumplimit_count }}  - {% endif %} - {% if archived_count %} - ○ {{ archived_count }}  - {% endif %} - {% endwith %} + ● {{ tag_thread_count_active }} + {{ tag_thread_count_bumplimit }} + {{ tag_thread_count_archive }} = {{ tag_thread_count }}
♥ {{ tag.get_post_count }}

{% if tag.get_all_parents %} diff --git a/boards/views/tag_threads.py b/boards/views/tag_threads.py --- a/boards/views/tag_threads.py +++ b/boards/views/tag_threads.py @@ -14,6 +14,10 @@ PARAM_IS_FAVORITE = 'is_favorite' PARAM_IS_HIDDEN = 'is_hidden' PARAM_RANDOM_IMAGE_POST = 'random_image_post' PARAM_RELATED_TAGS = 'related_tags' +PARAM_THREAD_COUNT = 'tag_thread_count' +PARAM_THREAD_COUNT_ACTIVE = 'tag_thread_count_active' +PARAM_THREAD_COUNT_BUMPLIMIT = 'tag_thread_count_bumplimit' +PARAM_THREAD_COUNT_ARCHIVE = 'tag_thread_count_archive' __author__ = 'neko259' @@ -52,6 +56,16 @@ class TagView(AllThreadsView, Dispatcher params[PARAM_RANDOM_IMAGE_POST] = tag.get_random_image_post() params[PARAM_RELATED_TAGS] = tag.get_related_tags() + active_count = tag.get_active_thread_count() + bumplimit_count = tag.get_bumplimit_thread_count() + archive_count = tag.get_archived_thread_count() + total_count = active_count + bumplimit_count + archive_count + + params[PARAM_THREAD_COUNT_ACTIVE] = active_count + params[PARAM_THREAD_COUNT_BUMPLIMIT] = bumplimit_count + params[PARAM_THREAD_COUNT_ARCHIVE] = archive_count + params[PARAM_THREAD_COUNT] = total_count + return params def get_reverse_url(self):