X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/7441f15b4fd59735ae00a16b47cfcf7eb99260a6..640ea955fe1eb5c4719664e13f6b6bcc5c5ae7f6:/app/helpers/issues_helper.rb diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb index cfde880cd..f9a84ba7d 100644 --- a/app/helpers/issues_helper.rb +++ b/app/helpers/issues_helper.rb @@ -24,4 +24,13 @@ module IssuesHelper I18n.t("issues.helper.reportable_title.note", :note_id => reportable.id) end end + + def open_issues_count + count = Issue.visible_to(current_user).open.limit(100).size + if count > 99 + content_tag(:span, "99+", :class => "count-number") + elsif count > 0 + content_tag(:span, count, :class => "count-number") + end + end end