diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2010-11-07 14:15:01 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2010-11-07 14:15:01 +0000 |
commit | 475530e59f65f3e8d24623383512e092b2d02521 (patch) | |
tree | 76e9b403b548ee62b3f5b05fcf9a0c7554add13d /vendor | |
parent | 3b01ea9fa42cec01a17664a64de6f8157d363bec (diff) | |
download | redmine-475530e59f65f3e8d24623383512e092b2d02521.tar.gz redmine-475530e59f65f3e8d24623383512e092b2d02521.zip |
Adds a "visible" option on User and Project custom fields (#1738).
If set to false, the custom field won't be display on user profile/project overview.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4382 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'vendor')
-rw-r--r-- | vendor/plugins/acts_as_customizable/lib/acts_as_customizable.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/vendor/plugins/acts_as_customizable/lib/acts_as_customizable.rb b/vendor/plugins/acts_as_customizable/lib/acts_as_customizable.rb index 01a61bf48..03b36f698 100644 --- a/vendor/plugins/acts_as_customizable/lib/acts_as_customizable.rb +++ b/vendor/plugins/acts_as_customizable/lib/acts_as_customizable.rb @@ -62,6 +62,10 @@ module Redmine @custom_field_values ||= available_custom_fields.collect { |x| custom_values.detect { |v| v.custom_field == x } || custom_values.build(:custom_field => x, :value => nil) } end + def visible_custom_field_values + custom_field_values.select(&:visible?) + end + def custom_field_values_changed? @custom_field_values_changed == true end |