summaryrefslogtreecommitdiffstats
path: root/app/views/projects/index.xml.builder
blob: 637ae7ef62c622e7401a80ad03a8b500ec746603 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
xml.instruct!
xml.projects :type => 'array' do
  @projects.each do |project|
	  xml.project :id => project.id do
			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
      	project.custom_field_values.each do |custom_value|
      		xml.custom_field custom_value.value, :id => custom_value.custom_field_id, :name => custom_value.custom_field.name
      	end
      end unless project.custom_field_values.empty?
      xml.created_on 	project.created_on
      xml.updated_on 	project.updated_on
    end
  end
end