Move max value of issues counter to settings
This commit is contained in:
parent
abecde92f5
commit
fff98f2afb
3 changed files with 6 additions and 3 deletions
|
@ -26,9 +26,9 @@ module IssuesHelper
|
||||||
end
|
end
|
||||||
|
|
||||||
def open_issues_count
|
def open_issues_count
|
||||||
count = Issue.visible_to(current_user).open.limit(100).size
|
count = Issue.visible_to(current_user).open.limit(Settings.max_issues_count).size
|
||||||
if count > 99
|
if count >= Settings.max_issues_count
|
||||||
tag.span("99+", :class => "badge count-number")
|
tag.span("#{Settings.max_issues_count - 1}+", :class => "badge count-number")
|
||||||
elsif count.positive?
|
elsif count.positive?
|
||||||
tag.span(count, :class => "badge count-number")
|
tag.span(count, :class => "badge count-number")
|
||||||
end
|
end
|
||||||
|
|
|
@ -77,6 +77,7 @@ Config.setup do |config|
|
||||||
required(:tracepoints_per_page).filled(:int?)
|
required(:tracepoints_per_page).filled(:int?)
|
||||||
required(:max_number_of_way_nodes).filled(:int?)
|
required(:max_number_of_way_nodes).filled(:int?)
|
||||||
required(:max_number_of_relation_members).filled(:int?)
|
required(:max_number_of_relation_members).filled(:int?)
|
||||||
|
required(:max_issues_count).filled(:int?)
|
||||||
required(:api_timeout).filled(:int?)
|
required(:api_timeout).filled(:int?)
|
||||||
required(:imagery_blacklist).maybe(:array?)
|
required(:imagery_blacklist).maybe(:array?)
|
||||||
required(:status).filled(:str?, :included_in? => ALLOWED_STATUS)
|
required(:status).filled(:str?, :included_in? => ALLOWED_STATUS)
|
||||||
|
|
|
@ -43,6 +43,8 @@ max_note_request_area: 25
|
||||||
default_note_query_limit: 100
|
default_note_query_limit: 100
|
||||||
# Maximum limit on the number of notes returned by the note search api method
|
# Maximum limit on the number of notes returned by the note search api method
|
||||||
max_note_query_limit: 10000
|
max_note_query_limit: 10000
|
||||||
|
# Maximum value of open issues counter for moderators, anything equal or over this value "n" is shown as "(n-1)+"
|
||||||
|
max_issues_count: 100
|
||||||
# Zoom level to use for postcode results from the geocoder
|
# Zoom level to use for postcode results from the geocoder
|
||||||
postcode_zoom: 15
|
postcode_zoom: 15
|
||||||
# Timeout for API calls in seconds
|
# Timeout for API calls in seconds
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue