@way = Way.find(params[:id], :include => [:way_tags, {:changeset => :user}, {:nodes => [:node_tags, {:ways => :way_tags}]}, :containing_relation_members])
@next = Way.find(:first, :order => "id ASC", :conditions => [ "visible = true AND id > :id", { :id => @way.id }] )
@prev = Way.find(:first, :order => "id DESC", :conditions => [ "visible = true AND id < :id", { :id => @way.id }] )
+
+ # Used for edit link, takes approx middle node of way
+ @midnode = @way.nodes[@way.nodes.length/2]
rescue ActiveRecord::RecordNotFound
@type = "way"
render :action => "not_found", :status => :not_found
<%= render :partial => "way_details", :object => @way %>
<hr />
<%= t'browse.way.download', :download_xml_link => link_to(t('browse.way.download_xml'), :controller => "way", :action => "read"),
- :view_history_link => link_to(t('browse.way.view_history'), :action => "way_history") %>
+ :view_history_link => link_to(t('browse.way.view_history'), :action => "way_history"),
+ :edit_link => link_to(t('browse.way.edit'), :controller => "site", :action => "edit", :way => @way.id, :lat => @midnode.lat, :lon => @midnode.lon, :zoom => 16)
+ %>
</td>
<%= render :partial => "map", :object => @way %>
</tr>
way:
way: "Way"
way_title: "Way: {{way_name}}"
- download: "{{download_xml_link}} or {{view_history_link}}"
+ download: "{{download_xml_link}}, {{view_history_link}} or {{edit_link}}"
download_xml: "Download XML"
view_history: "view history"
+ edit: "edit"
changeset:
changeset_paging_nav:
showing_page: "Showing page"