Option for long text custom fields to be displayed under the description field (#21705).

Based on patch by Marius BALTEANU.

git-svn-id: http://svn.redmine.org/redmine/trunk@16251 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2017-01-25 14:55:36 +00:00
parent 8d713ae6ca
commit b40d66f39f
11 changed files with 116 additions and 44 deletions

View File

@@ -89,7 +89,8 @@ class CustomField < ActiveRecord::Base
'edit_tag_style',
'user_role',
'version_status',
'extensions_allowed'
'extensions_allowed',
'full_width_layout'
def format
@format ||= Redmine::FieldFormat.find(field_format)
@@ -186,6 +187,10 @@ class CustomField < ActiveRecord::Base
format.totalable_supported
end
def full_width_layout?
full_width_layout == '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.