mirror of
https://github.com/redmine/redmine.git
synced 2025-11-10 07:16:03 +01:00
Add an option to render Integer and Float custom fields with thousands delimiters (#39997).
Patch by Go MAEDA (user:maeda). git-svn-id: https://svn.redmine.org/redmine/trunk@22935 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -100,7 +100,9 @@ class CustomField < ApplicationRecord
|
||||
'user_role',
|
||||
'version_status',
|
||||
'extensions_allowed',
|
||||
'full_width_layout')
|
||||
'full_width_layout',
|
||||
'thousands_delimiter'
|
||||
)
|
||||
|
||||
def copy_from(arg, options={})
|
||||
return if arg.blank?
|
||||
@@ -225,6 +227,10 @@ class CustomField < ApplicationRecord
|
||||
text_formatting == 'full'
|
||||
end
|
||||
|
||||
def thousands_delimiter?
|
||||
thousands_delimiter == '1'
|
||||
end
|
||||
|
||||
# Returns a ORDER BY clause that can used to sort customized
|
||||
# objects by their value of the custom field.
|
||||
# Returns nil if the custom field can not be used for sorting.
|
||||
|
||||
Reference in New Issue
Block a user