Merge branch 'master' of https://github.com/tankhiwale/openstreetmap-website
This commit is contained in:
commit
11cd1c9fc1
93 changed files with 1266 additions and 846 deletions
|
@ -2,7 +2,7 @@ json.type "Feature"
|
|||
|
||||
json.geometry do
|
||||
json.type "Point"
|
||||
json.coordinates [ note.lon.to_f, note.lat.to_f ]
|
||||
json.coordinates [note.lon.to_f, note.lat.to_f]
|
||||
end
|
||||
|
||||
json.properties do
|
||||
|
@ -16,12 +16,12 @@ json.properties do
|
|||
json.close_url close_note_url(note, :format => params[:format])
|
||||
end
|
||||
|
||||
json.date_created note.created_at
|
||||
json.date_created note.created_at.to_s
|
||||
json.status note.status
|
||||
json.closed_at note.closed_at if note.closed?
|
||||
json.closed_at note.closed_at.to_s if note.closed?
|
||||
|
||||
json.comments(note.comments) do |comment|
|
||||
json.date comment.created_at
|
||||
json.date comment.created_at.to_s
|
||||
|
||||
if comment.author
|
||||
json.uid comment.author.id
|
|
@ -1,5 +1,5 @@
|
|||
json.type "FeatureCollection"
|
||||
|
||||
json.features(@notes) do |note|
|
||||
json.ingest! render(note)
|
||||
json.partial! note
|
||||
end
|
1
app/views/api/notes/show.json.jbuilder
Normal file
1
app/views/api/notes/show.json.jbuilder
Normal file
|
@ -0,0 +1 @@
|
|||
json.partial! @note
|
|
@ -1 +0,0 @@
|
|||
json.ingest! render(@note)
|
|
@ -0,0 +1,6 @@
|
|||
attrs = {
|
||||
"k" => user_preference.k,
|
||||
"v" => user_preference.v
|
||||
}
|
||||
|
||||
xml.preference(attrs)
|
7
app/views/api/user_preferences/index.xml.builder
Normal file
7
app/views/api/user_preferences/index.xml.builder
Normal file
|
@ -0,0 +1,7 @@
|
|||
xml.instruct!
|
||||
|
||||
xml.osm(OSM::API.new.xml_root_attributes) do |osm|
|
||||
osm.preferences do |preferences|
|
||||
preferences << (render(@user_preferences) || "")
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue