]> git.openstreetmap.org Git - rails.git/blob - app/views/notes/_note.xml.builder
Merge remote-tracking branch 'osmlab/id-editor-embed'
[rails.git] / app / views / notes / _note.xml.builder
1 xml.note("lon" => note.lon, "lat" => note.lat) do
2   xml.id note.id
3   xml.url note_url(note, :format => params[:format])
4   xml.comment_url comment_note_url(note, :format => params[:format])
5   xml.close_url close_note_url(note, :format => params[:format])
6   xml.date_created note.created_at
7   xml.status note.status
8
9   if note.status == "closed"
10     xml.date_closed note.closed_at
11   end
12
13   xml.comments do
14     note.comments.each do |comment|
15       xml.comment do
16         xml.date comment.created_at
17
18         if comment.author
19           xml.uid comment.author.id
20           xml.user comment.author.display_name
21           xml.user_url user_url(:display_name => comment.author.display_name)
22         end
23
24         if comment.body
25           xml.text comment.body.to_text
26           xml.html comment.body.to_html
27         end
28       end
29     end
30   end
31 end