Move the notes api methods into a controller in the api namespace
This commit is contained in:
parent
4b4c5aac2f
commit
b4dbf6233c
23 changed files with 1508 additions and 1479 deletions
|
@ -98,6 +98,28 @@ en:
|
|||
remote:
|
||||
name: "Remote Control"
|
||||
description: "Remote Control (JOSM or Merkaartor)"
|
||||
api:
|
||||
notes:
|
||||
comment:
|
||||
opened_at_html: "Created %{when} ago"
|
||||
opened_at_by_html: "Created %{when} ago by %{user}"
|
||||
commented_at_html: "Updated %{when} ago"
|
||||
commented_at_by_html: "Updated %{when} ago by %{user}"
|
||||
closed_at_html: "Resolved %{when} ago"
|
||||
closed_at_by_html: "Resolved %{when} ago by %{user}"
|
||||
reopened_at_html: "Reactivated %{when} ago"
|
||||
reopened_at_by_html: "Reactivated %{when} ago by %{user}"
|
||||
rss:
|
||||
title: "OpenStreetMap Notes"
|
||||
description_area: "A list of notes, reported, commented on or closed in your area [(%{min_lat}|%{min_lon}) -- (%{max_lat}|%{max_lon})]"
|
||||
description_item: "An rss feed for note %{id}"
|
||||
opened: "new note (near %{place})"
|
||||
commented: "new comment (near %{place})"
|
||||
closed: "closed note (near %{place})"
|
||||
reopened: "reactivated note (near %{place})"
|
||||
entry:
|
||||
comment: Comment
|
||||
full: Full note
|
||||
browse:
|
||||
created: "Created"
|
||||
closed: "Closed"
|
||||
|
@ -2331,26 +2353,6 @@ en:
|
|||
next: "Next »"
|
||||
previous: "« Previous"
|
||||
notes:
|
||||
comment:
|
||||
opened_at_html: "Created %{when} ago"
|
||||
opened_at_by_html: "Created %{when} ago by %{user}"
|
||||
commented_at_html: "Updated %{when} ago"
|
||||
commented_at_by_html: "Updated %{when} ago by %{user}"
|
||||
closed_at_html: "Resolved %{when} ago"
|
||||
closed_at_by_html: "Resolved %{when} ago by %{user}"
|
||||
reopened_at_html: "Reactivated %{when} ago"
|
||||
reopened_at_by_html: "Reactivated %{when} ago by %{user}"
|
||||
rss:
|
||||
title: "OpenStreetMap Notes"
|
||||
description_area: "A list of notes, reported, commented on or closed in your area [(%{min_lat}|%{min_lon}) -- (%{max_lat}|%{max_lon})]"
|
||||
description_item: "An rss feed for note %{id}"
|
||||
opened: "new note (near %{place})"
|
||||
commented: "new comment (near %{place})"
|
||||
closed: "closed note (near %{place})"
|
||||
reopened: "reactivated note (near %{place})"
|
||||
entry:
|
||||
comment: Comment
|
||||
full: Full note
|
||||
mine:
|
||||
title: "Notes submitted or commented on by %{user}"
|
||||
heading: "%{user}'s notes"
|
||||
|
|
|
@ -90,7 +90,7 @@ OpenStreetMap::Application.routes.draw do
|
|||
get "swf/trackpoints" => "swf#trackpoints"
|
||||
|
||||
# Map notes API
|
||||
resources :notes, :except => [:new, :edit, :update], :constraints => { :id => /\d+/ }, :defaults => { :format => "xml" } do
|
||||
resources :notes, :except => [:new, :edit, :update], :constraints => { :id => /\d+/ }, :defaults => { :format => "xml" }, :controller => "api/notes" do
|
||||
collection do
|
||||
get "search"
|
||||
get "feed", :defaults => { :format => "rss" }
|
||||
|
@ -103,11 +103,11 @@ OpenStreetMap::Application.routes.draw do
|
|||
end
|
||||
end
|
||||
|
||||
post "notes/addPOIexec" => "notes#create"
|
||||
post "notes/closePOIexec" => "notes#close"
|
||||
post "notes/editPOIexec" => "notes#comment"
|
||||
get "notes/getGPX" => "notes#index", :format => "gpx"
|
||||
get "notes/getRSSfeed" => "notes#feed", :format => "rss"
|
||||
post "notes/addPOIexec" => "api/notes#create"
|
||||
post "notes/closePOIexec" => "api/notes#close"
|
||||
post "notes/editPOIexec" => "api/notes#comment"
|
||||
get "notes/getGPX" => "api/notes#index", :format => "gpx"
|
||||
get "notes/getRSSfeed" => "api/notes#feed", :format => "rss"
|
||||
end
|
||||
|
||||
# Data browsing
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue