Project

General

Profile

Patch #5342 ยป app_views_projects_index.xml.builder.patch

patch for app/views/projects/index.xml.builder - Arkaitz Jimenez, 2010-04-17 20:37

View differences:

b.rb 2010-04-17 19:34:19.000000000 +0100
1 1
xml.instruct!
2 2
xml.projects :type => 'array' do
3 3
  @projects.each do |project|
4
          xml.project do
5
            xml.id                                      project.id
6
                        xml.name                                project.name
7
                        xml.identifier  project.identifier
8
                        xml.description project.description
9
                        xml.parent(:id => project.parent_id, :name => project.parent.name) unless project.parent.nil?
10
                        xml.custom_fields do
11
        project.custom_field_values.each do |custom_value|
12
                xml.custom_field custom_value.value, :id => custom_value.custom_field_id, :name => custom_value.custom_field.name
13
        end
14
      end unless project.custom_field_values.empty?
15
      xml.created_on    project.created_on
16
      xml.updated_on    project.updated_on
17
    end
4
      xml.project do
5
          xml.id            project.id
6
          xml.name          project.name
7
          xml.identifier    project.identifier
8
          xml.description   project.description
9
          xml.parent(:id => project.parent_id, :name => project.parent.name) unless project.parent.nil?
10
          xml.custom_fields do
11
              project.custom_field_values.each do |custom_value|
12
                  xml.custom_field custom_value.value, :id => custom_value.custom_field_id, :name => custom_value.custom_field.name
13
              end
14
          end unless project.custom_field_values.empty?
15

  
16
          xml.trackers :type => 'array' do
17
              project.trackers.each do  |tracker|
18
                  xml.tracker do
19
                      xml.id        tracker.id
20
                      xml.name      tracker.name
21
                  end
22
              end
23
          end
24

  
25
          xml.created_on    project.created_on
26
          xml.updated_on    project.updated_on
27
      end
18 28
  end
19 29
end
20 30

  
    (1-1/1)