From: John Firebaugh Date: Thu, 4 Oct 2012 23:52:45 +0000 (-0700) Subject: Eliminate interpolation in changeset JS X-Git-Tag: live~5901 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/7ef803f86d7804701bebb15a8cbd9fa55f74059d?hp=b5ca3b12d12c2e2dbcbf474bdb576622cacb184e Eliminate interpolation in changeset JS --- diff --git a/app/views/changeset/_changeset.html.erb b/app/views/changeset/_changeset.html.erb index 88447dde6..ec4bef0ad 100644 --- a/app/views/changeset/_changeset.html.erb +++ b/app/views/changeset/_changeset.html.erb @@ -1,6 +1,18 @@ -<% cl = cycle('table0', 'table1') %> +<% + changeset_data = {:id => changeset.id} - + if changeset.has_valid_bbox? + bbox = changeset.bbox.to_unscaled + changeset_data[:bbox] = { + :minlon => bbox.min_lon, + :minlat => bbox.min_lat, + :maxlon => bbox.max_lon, + :maxlat => bbox.max_lat + } + end +%> + +<%= content_tag "tr", :class => cycle('table0', 'table1'), :id => "tr-changeset-#{changeset.id}", :data => {:changeset => changeset_data} do %> <%= id_link = link_to(changeset.id, @@ -35,7 +47,7 @@ <%= t'changeset.changeset.no_comment' %> <% end %> - +<% end %>