]> git.openstreetmap.org Git - rails.git/blob - app/views/notes/_note.xml.builder
Fix edit page
[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
5   if note.closed?
6     xml.reopen_url reopen_note_url(note, :format => params[:format])
7   else
8     xml.comment_url comment_note_url(note, :format => params[:format])
9     xml.close_url close_note_url(note, :format => params[:format])
10   end
11
12   xml.date_created note.created_at
13   xml.status note.status
14
15   if note.closed?
16     xml.date_closed note.closed_at
17   end
18
19   xml.comments do
20     note.comments.each do |comment|
21       xml.comment do
22         xml.date comment.created_at
23
24         if comment.author
25           xml.uid comment.author.id
26           xml.user comment.author.display_name
27           xml.user_url user_url(:display_name => comment.author.display_name, :host => SERVER_URL)
28         end
29
30         xml.action comment.event
31
32         if comment.body
33           xml.text comment.body.to_text
34           xml.html comment.body.to_html
35         end
36       end
37     end
38   end
39 end