]> git.openstreetmap.org Git - rails.git/blob - app/views/notes/_note.json.jsonify
Merge branch 'master' into notes
[rails.git] / app / views / notes / _note.json.jsonify
1 json.type "Feature"
2
3 json.geometry do
4   json.type "Point"
5   json.coordinates [ note.lon, note.lat ]              
6 end
7
8 json.properties do
9   json.id note.id
10   json.url note_url(note, :format => params[:format])
11   json.comment_url comment_note_url(note, :format => params[:format])
12   json.close_url close_note_url(note, :format => params[:format])
13   json.date_created note.created_at
14   json.nearby  note.nearby_place
15   json.status note.status
16   json.closed_at note.closed_at if note.status == "closed"
17
18   json.comments(note.comments) do |comment|
19     json.date comment.created_at
20     json.uid comment.author_id unless comment.author_id.nil?
21     json.user comment.author_name
22     json.action comment.event
23     json.text comment.body unless comment.body.nil?
24   end
25 end