Render the links using partial so we can do the appropriate rendering
for HTML and Atom versions and hopefully get the escaping right in the feed. Closes #2135.
This commit is contained in:
parent
c0c506adde
commit
e477f68a6c
5 changed files with 6 additions and 2 deletions
|
@ -281,11 +281,11 @@ class ChangesetController < ApplicationController
|
|||
if bbox
|
||||
conditions = cond_merge conditions, conditions_bbox(bbox)
|
||||
bbox = BoundingBox.from_s(bbox)
|
||||
bbox_link = "<a href='#{url_for(:controller => "site", :action => "index", :minlon => bbox.min_lon, :minlat => bbox.min_lat, :maxlon => bbox.max_lon, :maxlat => bbox.max_lat, :box => "yes")}'>#{bbox.to_s}</a>"
|
||||
bbox_link = render_to_string :partial => "bbox", :object => bbox
|
||||
end
|
||||
|
||||
if user
|
||||
user_link = "<a href='#{url_for(:controller => "user", :action => "view", :display_name => user.display_name)}'>#{user.display_name}</a>"
|
||||
user_link = render_to_string :partial => "user", :object => user
|
||||
end
|
||||
|
||||
if user and bbox
|
||||
|
|
1
app/views/changeset/_bbox.atom.builder
Normal file
1
app/views/changeset/_bbox.atom.builder
Normal file
|
@ -0,0 +1 @@
|
|||
xml.a(bbox.to_s, :href => url_for(:controller => "site", :action => "index", :minlon => bbox.min_lon, :minlat => bbox.min_lat, :maxlon => bbox.max_lon, :maxlat => bbox.max_lat, :box => "yes"))
|
1
app/views/changeset/_bbox.html.erb
Normal file
1
app/views/changeset/_bbox.html.erb
Normal file
|
@ -0,0 +1 @@
|
|||
<%= link_to bbox.to_s, :controller => "site", :action => "index", :minlon => bbox.min_lon, :minlat => bbox.min_lat, :maxlon => bbox.max_lon, :maxlat => bbox.max_lat, :box => "yes" %>
|
1
app/views/changeset/_user.atom.builder
Normal file
1
app/views/changeset/_user.atom.builder
Normal file
|
@ -0,0 +1 @@
|
|||
xml.a(user.display_name, :href => url_for(:controller => "user", :action => "view", :display_name => user.display_name))
|
1
app/views/changeset/_user.html.erb
Normal file
1
app/views/changeset/_user.html.erb
Normal file
|
@ -0,0 +1 @@
|
|||
<%= link_to user.display_name, :controller => "user", :action => "view", :display_name => user.display_name %>
|
Loading…
Add table
Add a link
Reference in a new issue