annotate app/views/projects/index.xml.builder @ 350:a1e6dc0e204b
feature_123
Show Overview wiki page, if it exists, instead of (almost) entire overview page
author |
Chris Cannam <chris.cannam@soundsoftware.ac.uk> |
date |
Thu, 31 Mar 2011 16:14:38 +0100 |
parents |
94944d00e43c |
children |
|
rev |
line source |
Chris@0
|
1 xml.instruct!
|
Chris@0
|
2 xml.projects :type => 'array' do
|
Chris@0
|
3 @projects.each do |project|
|
Chris@0
|
4 xml.project do
|
Chris@0
|
5 xml.id project.id
|
Chris@0
|
6 xml.name project.name
|
Chris@0
|
7 xml.identifier project.identifier
|
Chris@0
|
8 xml.description project.description
|
Chris@0
|
9 xml.parent(:id => project.parent_id, :name => project.parent.name) unless project.parent.nil?
|
Chris@0
|
10 xml.custom_fields do
|
chris@37
|
11 project.visible_custom_field_values.each do |custom_value|
|
Chris@0
|
12 xml.custom_field custom_value.value, :id => custom_value.custom_field_id, :name => custom_value.custom_field.name
|
Chris@0
|
13 end
|
Chris@0
|
14 end unless project.custom_field_values.empty?
|
Chris@0
|
15 xml.created_on project.created_on
|
Chris@0
|
16 xml.updated_on project.updated_on
|
Chris@0
|
17 end
|
Chris@0
|
18 end
|
Chris@0
|
19 end
|