2010-01-14 23:00:17 +03:00
|
|
|
xml.instruct!
|
|
|
|
xml.projects :type => 'array' do
|
|
|
|
@projects.each do |project|
|
2010-05-01 18:21:59 +04:00
|
|
|
xml.project do
|
|
|
|
xml.id project.id
|
|
|
|
xml.name project.name
|
|
|
|
xml.identifier project.identifier
|
|
|
|
xml.description project.description
|
|
|
|
xml.parent(:id => project.parent_id, :name => project.parent.name) unless project.parent.nil?
|
|
|
|
xml.custom_fields do
|
2010-11-07 17:15:01 +03:00
|
|
|
project.visible_custom_field_values.each do |custom_value|
|
2010-05-01 18:21:59 +04:00
|
|
|
xml.custom_field custom_value.value, :id => custom_value.custom_field_id, :name => custom_value.custom_field.name
|
|
|
|
end
|
2010-01-14 23:00:17 +03:00
|
|
|
end unless project.custom_field_values.empty?
|
2010-05-01 18:21:59 +04:00
|
|
|
xml.created_on project.created_on
|
|
|
|
xml.updated_on project.updated_on
|
2010-01-14 23:00:17 +03:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|