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