]> git.openstreetmap.org Git - rails.git/commitdiff
Restore "Go to Home Location"
authorJohn Firebaugh <john.firebaugh@gmail.com>
Wed, 6 Nov 2013 00:00:41 +0000 (16:00 -0800)
committerJohn Firebaugh <john.firebaugh@gmail.com>
Wed, 6 Nov 2013 00:00:41 +0000 (16:00 -0800)
app/views/layouts/map.html.erb
app/views/site/_home_link.html.erb [deleted file]

index 8be2aff81de3f91a9252feb5c79398d0409b954a..d6ac18a66d8f884410d1cacff5fbe3b675a78206 100644 (file)
@@ -4,6 +4,18 @@
 
 <% content_for(:body_class) { "map-layout" } %>
 
+<% if @user and !@user.home_lon.nil? and !@user.home_lat.nil? %>
+  <% content_for :greeting do %>
+    <%= link_to t("layouts.home"),
+                "#",
+                :id => "homeanchor",
+                :class => "set_position",
+                :data => { :lat => @user.home_lat,
+                           :lon => @user.home_lon,
+                           :zoom => 15 } %>
+  <% end %>
+<% end %>
+
 <% content_for :content do %>
   <div id="sidebar">
     <%= form_tag search_path, :id => "search_form" do %>
diff --git a/app/views/site/_home_link.html.erb b/app/views/site/_home_link.html.erb
deleted file mode 100644 (file)
index e907b3f..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-<% if @user and !@user.home_lon.nil? and !@user.home_lat.nil? %>
-  <% content_for :greeting do %>
-    <%= link_to t("layouts.home"),
-                "#",
-                :id => "homeanchor",
-                :class => "set_position",
-                :data => { :lat => @user.home_lat,
-                           :lon => @user.home_lon,
-                           :zoom => 15 } %>
-  <% end %>
-<% end %>