]> git.openstreetmap.org Git - rails.git/blob - app/views/notes/_note.gpx.builder
Refactor diary entry tests to use User factory
[rails.git] / app / views / notes / _note.gpx.builder
1 xml.wpt("lon" => note.lon, "lat" => note.lat) do
2   xml.time note.created_at.to_s(:iso8601)
3   xml.name t("browse.note.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" => browse_note_url(note, :only_path => false))
10
11   xml.extensions do
12     xml.id note.id
13     xml.url note_url(note, :format => params[:format])
14
15     if note.closed?
16       xml.reopen_url reopen_note_url(note, :format => params[:format])
17     else
18       xml.comment_url comment_note_url(note, :format => params[:format])
19       xml.close_url close_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