Merge remote-tracking branch 'upstream/pull/2118'
This commit is contained in:
commit
d021f7b625
16 changed files with 85 additions and 85 deletions
|
@ -7,7 +7,7 @@ class Ability
|
|||
can [:trackpoints, :map, :changes, :capabilities, :permissions], :api
|
||||
can [:relation, :relation_history, :way, :way_history, :node, :node_history,
|
||||
:changeset, :note, :new_note, :query], :browse
|
||||
can [:index, :feed, :read, :download, :query], Changeset
|
||||
can [:index, :feed, :show, :download, :query], Changeset
|
||||
can :index, ChangesetComment
|
||||
can :search, :direction
|
||||
can [:index, :permalink, :edit, :help, :fixthemap, :offline, :export, :about, :preview, :copyright, :key, :id], :site
|
||||
|
@ -23,9 +23,9 @@ class Ability
|
|||
can [:index, :show, :data, :georss, :picture, :icon], Trace
|
||||
can [:terms, :api_users, :login, :logout, :new, :create, :save, :confirm, :confirm_resend, :confirm_email, :lost_password, :reset_password, :show, :api_read, :auth_success, :auth_failure], User
|
||||
can [:index, :show, :blocks_on, :blocks_by], UserBlock
|
||||
can [:read, :nodes], Node
|
||||
can [:read, :full, :ways, :ways_for_node], Way
|
||||
can [:read, :full, :relations, :relations_for_node, :relations_for_way, :relations_for_relation], Relation
|
||||
can [:index, :show], Node
|
||||
can [:index, :show, :full, :ways_for_node], Way
|
||||
can [:index, :show, :full, :relations_for_node, :relations_for_way, :relations_for_relation], Relation
|
||||
can [:history, :version], OldNode
|
||||
can [:history, :version], OldWay
|
||||
can [:history, :version], OldRelation
|
||||
|
|
|
@ -42,7 +42,7 @@ class ChangesetsController < ApplicationController
|
|||
##
|
||||
# Return XML giving the basic info about the changeset. Does not
|
||||
# return anything about the nodes, ways and relations in the changeset.
|
||||
def read
|
||||
def show
|
||||
changeset = Changeset.find(params[:id])
|
||||
|
||||
render :xml => changeset.to_xml(params[:include_discussion].presence).to_s
|
||||
|
|
|
@ -26,7 +26,7 @@ class NodesController < ApplicationController
|
|||
end
|
||||
|
||||
# Dump the details on a node given in params[:id]
|
||||
def read
|
||||
def show
|
||||
node = Node.find(params[:id])
|
||||
|
||||
response.last_modified = node.timestamp
|
||||
|
@ -63,7 +63,7 @@ class NodesController < ApplicationController
|
|||
end
|
||||
|
||||
# Dump the details on many nodes whose ids are given in the "nodes" parameter.
|
||||
def nodes
|
||||
def index
|
||||
raise OSM::APIBadUserInput, "The parameter nodes is required, and must be of the form nodes=id[,id[,id...]]" unless params["nodes"]
|
||||
|
||||
ids = params["nodes"].split(",").collect(&:to_i)
|
||||
|
|
|
@ -22,7 +22,7 @@ class RelationsController < ApplicationController
|
|||
render :plain => relation.id.to_s
|
||||
end
|
||||
|
||||
def read
|
||||
def show
|
||||
relation = Relation.find(params[:id])
|
||||
response.last_modified = relation.timestamp
|
||||
if relation.visible
|
||||
|
@ -123,7 +123,7 @@ class RelationsController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
def relations
|
||||
def index
|
||||
raise OSM::APIBadUserInput, "The parameter relations is required, and must be of the form relations=id[,id[,id...]]" unless params["relations"]
|
||||
|
||||
ids = params["relations"].split(",").collect(&:to_i)
|
||||
|
|
|
@ -22,7 +22,7 @@ class WaysController < ApplicationController
|
|||
render :plain => way.id.to_s
|
||||
end
|
||||
|
||||
def read
|
||||
def show
|
||||
way = Way.find(params[:id])
|
||||
|
||||
response.last_modified = way.timestamp
|
||||
|
@ -82,7 +82,7 @@ class WaysController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
def ways
|
||||
def index
|
||||
unless params["ways"]
|
||||
raise OSM::APIBadUserInput, "The parameter ways is required, and must be of the form ways=id[,id[,id...]]"
|
||||
end
|
||||
|
|
|
@ -137,7 +137,7 @@
|
|||
<% end %>
|
||||
|
||||
<div class='secondary-actions'>
|
||||
<%= link_to(t('.changesetxml'), :controller => "changesets", :action => "read") %>
|
||||
<%= link_to(t('.changesetxml'), :controller => "changesets", :action => "show") %>
|
||||
·
|
||||
<%= link_to(t('.osmchangexml'), :controller => "changesets", :action => "download") %>
|
||||
</div>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<%= render :partial => @type, :object => @feature %>
|
||||
|
||||
<div class='secondary-actions'>
|
||||
<%= link_to(t('browse.download_xml'), :controller => @type.pluralize, :action => "read") %>
|
||||
<%= link_to(t('browse.download_xml'), :controller => @type.pluralize, :action => :show) %>
|
||||
·
|
||||
<%= link_to(t('browse.view_history'), :action => "#{@type}_history") %>
|
||||
</div>
|
||||
|
|
|
@ -17,7 +17,7 @@ atom_feed(:language => I18n.locale, :schema_date => 2009,
|
|||
@edits.each do |changeset|
|
||||
feed.entry(changeset, :updated => changeset.closed_at, :id => changeset_url(changeset.id, :only_path => false)) do |entry|
|
||||
entry.link :rel => "alternate",
|
||||
:href => changeset_read_url(changeset, :only_path => false),
|
||||
:href => changeset_show_url(changeset, :only_path => false),
|
||||
:type => "application/osm+xml"
|
||||
entry.link :rel => "alternate",
|
||||
:href => changeset_download_url(changeset, :only_path => false),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue