Include tags with exactly 1000 posts when shortening

This commit is contained in:
Toks
2013-07-14 00:19:02 -04:00
parent 6363e23f6c
commit 7141ba8129
2 changed files with 2 additions and 2 deletions

View File

@@ -148,7 +148,7 @@
var $link = $("<a/>").addClass("tag-type-" + tag.category).text(tag.label);
var count;
if (tag.post_count > 1000) {
if (tag.post_count >= 1000) {
count = Math.floor(tag.post_count / 1000) + "k";
} else {
count = tag.post_count;

View File

@@ -115,7 +115,7 @@ private
html << %{<a class="search-tag" href="#{path}?tags=#{u(tag)}">#{h(humanized_tag)}</a> }
unless options[:name_only]
if counts[tag].to_i > 1_000
if counts[tag].to_i >= 1_000
post_count = "#{counts[tag].to_i / 1_000}k"
else
post_count = counts[tag].to_s