]> git.openstreetmap.org Git - rails.git/blob - app/views/api/notes/_note.gpx.builder
Merge remote-tracking branch 'upstream/pull/4705'
[rails.git] / app / views / api / notes / _note.gpx.builder
1 xml.wpt("lon" => note.lon, "lat" => note.lat) do
2   xml.time note.created_at.to_fs(:iso8601)
3   xml.name t("notes.show.title", :id => note.id)
4
5   xml.desc do
6     xml.cdata! render(:partial => "description", :object => note, :formats => [:html])
7   end
8
9   xml.link("href" => note_url(note, :only_path => false))
10
11   xml.extensions do
12     xml.id note.id
13     xml.url api_note_url(note, :format => params[:format])
14
15     if note.closed?
16       xml.reopen_url reopen_api_note_url(note, :format => params[:format])
17     else
18       xml.comment_url comment_api_note_url(note, :format => params[:format])
19       xml.close_url close_api_note_url(note, :format => params[:format])
20     end
21
22     xml.date_created note.created_at
23     xml.status note.status
24
25     xml.date_closed note.closed_at if note.closed?
26   end
27 end