Include tags with exactly 1000 posts when shortening
This commit is contained in:
@@ -148,7 +148,7 @@
|
|||||||
var $link = $("<a/>").addClass("tag-type-" + tag.category).text(tag.label);
|
var $link = $("<a/>").addClass("tag-type-" + tag.category).text(tag.label);
|
||||||
|
|
||||||
var count;
|
var count;
|
||||||
if (tag.post_count > 1000) {
|
if (tag.post_count >= 1000) {
|
||||||
count = Math.floor(tag.post_count / 1000) + "k";
|
count = Math.floor(tag.post_count / 1000) + "k";
|
||||||
} else {
|
} else {
|
||||||
count = tag.post_count;
|
count = tag.post_count;
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ private
|
|||||||
html << %{<a class="search-tag" href="#{path}?tags=#{u(tag)}">#{h(humanized_tag)}</a> }
|
html << %{<a class="search-tag" href="#{path}?tags=#{u(tag)}">#{h(humanized_tag)}</a> }
|
||||||
|
|
||||||
unless options[:name_only]
|
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"
|
post_count = "#{counts[tag].to_i / 1_000}k"
|
||||||
else
|
else
|
||||||
post_count = counts[tag].to_s
|
post_count = counts[tag].to_s
|
||||||
|
|||||||
Reference in New Issue
Block a user