]> git.openstreetmap.org Git - rails.git/commitdiff
Rename the ugly "id_iframe" to just plain "id"
authorTom Hughes <tom@compton.nu>
Tue, 7 May 2013 13:50:31 +0000 (14:50 +0100)
committerTom Hughes <tom@compton.nu>
Tue, 7 May 2013 13:50:31 +0000 (14:50 +0100)
app/controllers/site_controller.rb
app/views/site/_id.html.erb
app/views/site/id.html.erb [moved from app/views/site/id_iframe.html.erb with 100% similarity]
config/routes.rb

index 744b653993e0853cdeb4d09a1782584fa2be47b7..0e26185a1e34325a5fecb87ec3d50856e7a18a7a 100644 (file)
@@ -66,7 +66,7 @@ class SiteController < ApplicationController
     render :text => RichText.new(params[:format], params[:text]).to_html
   end
 
     render :text => RichText.new(params[:format], params[:text]).to_html
   end
 
-  def id_iframe
-    render "id_iframe", :layout => false
+  def id
+    render "id", :layout => false
   end
 end
   end
 end
index c31ea23dc1b1426c0c8e466d3cf8db691fd99026..fe9d569aa74a946435b2654d8f3630abbc19c3a5 100644 (file)
@@ -19,7 +19,7 @@
       hash = '#map=' + (coord.zoom || 17) + '/' + coord.lon + '/' + coord.lat
     }
 
       hash = '#map=' + (coord.zoom || 17) + '/' + coord.lon + '/' + coord.lat
     }
 
-    $('#id-embed').attr('src', 'id_iframe' + hash);
+    $('#id-embed').attr('src', '<%= id_url %>' + hash);
   </script>
 <% else %>
   <script type="text/javascript">alert("<%= t 'site.edit.id_not_configured' %>")</script>
   </script>
 <% else %>
   <script type="text/javascript">alert("<%= t 'site.edit.id_not_configured' %>")</script>
index 99dca52ffcf8b491c9196f33fd9a29846d9be86e..f53f208617d9ab8cb7f12e8e89b1260687369809 100644 (file)
@@ -131,7 +131,7 @@ OpenStreetMap::Application.routes.draw do
   match '/logout' => 'user#logout', :via => [:get, :post]
   match '/offline' => 'site#offline', :via => :get
   match '/key' => 'site#key', :via => :get
   match '/logout' => 'user#logout', :via => [:get, :post]
   match '/offline' => 'site#offline', :via => :get
   match '/key' => 'site#key', :via => :get
-  match '/id_iframe' => 'site#id_iframe', :via => :get
+  match '/id' => 'site#id', :via => :get
   match '/user/new' => 'user#new', :via => :get
   match '/user/terms' => 'user#terms', :via => [:get, :post]
   match '/user/save' => 'user#save', :via => :post
   match '/user/new' => 'user#new', :via => :get
   match '/user/terms' => 'user#terms', :via => [:get, :post]
   match '/user/save' => 'user#save', :via => :post