Mercurial > hg > soundsoftware-site
comparison app/helpers/custom_fields_helper.rb @ 119:8661b858af72
* Update to Redmine trunk rev 4705
author | Chris Cannam |
---|---|
date | Thu, 13 Jan 2011 14:12:06 +0000 |
parents | 513646585e45 |
children | cbce1fd3b1b7 |
comparison
equal
deleted
inserted
replaced
39:150ceac17a8d | 119:8661b858af72 |
---|---|
102 | 102 |
103 # Return an array of custom field formats which can be used in select_tag | 103 # Return an array of custom field formats which can be used in select_tag |
104 def custom_field_formats_for_select | 104 def custom_field_formats_for_select |
105 Redmine::CustomFieldFormat.as_select | 105 Redmine::CustomFieldFormat.as_select |
106 end | 106 end |
107 | |
108 # Renders the custom_values in api views | |
109 def render_api_custom_values(custom_values, api) | |
110 api.array :custom_fields do | |
111 custom_values.each do |custom_value| | |
112 api.custom_field :id => custom_value.custom_field_id, :name => custom_value.custom_field.name do | |
113 api.value custom_value.value | |
114 end | |
115 end | |
116 end unless custom_values.empty? | |
117 end | |
107 end | 118 end |