Bug 583093, tweaking the scale of tags
This commit is contained in:
Родитель
9132d3f2da
Коммит
5dcd5e033f
|
@ -36,7 +36,7 @@ def range_convert(value, old_min, old_max, new_min, new_max):
|
||||||
@register.function
|
@register.function
|
||||||
def tag_link(tag, min_count, max_count):
|
def tag_link(tag, min_count, max_count):
|
||||||
"""create the tag cloud link with the poper tagLevel class"""
|
"""create the tag cloud link with the poper tagLevel class"""
|
||||||
factor = range_convert(tag.tagstat.num_addons, min_count, max_count, 1, 10)
|
factor = range_convert(tag.tagstat.num_addons, 0, max_count, 1, 10)
|
||||||
hyperlink = u'<a class="tagLevel%d tag" href="%s">%s</a>'
|
hyperlink = u'<a class="tagLevel%d tag" href="%s">%s</a>'
|
||||||
return hyperlink % (factor,
|
return hyperlink % (factor,
|
||||||
remora_url('/tag/' + tag.tag_text),
|
remora_url('/tag/' + tag.tag_text),
|
||||||
|
|
Загрузка…
Ссылка в новой задаче