]> git.openstreetmap.org Git - rails.git/commitdiff
user bugs + direct to real 404 tile
authorSteve Coast <steve@asklater.com>
Sat, 7 Apr 2007 21:08:58 +0000 (21:08 +0000)
committerSteve Coast <steve@asklater.com>
Sat, 7 Apr 2007 21:08:58 +0000 (21:08 +0000)
app/views/site/index.rhtml
app/views/user/diary.rhtml
app/views/user/view.rhtml

index 6971e5faa468e43a15ba5c948847b6b59ff095eb..d6c2ed405e0bf9c7c5dfcd91bb0e827380554ff4 100644 (file)
@@ -38,7 +38,7 @@
   function init(){
 
     OpenLayers.Util.onImageLoadError = function() {
-      this.src = "http://<%= SERVER_URL %>/javascript/img/404.png";
+      this.src = "http://www.openstreetmap.org/javascript/img/404.png";
     }
     map = new OpenLayers.Map( "map", 
         {maxExtent: new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34), maxZoomLevel:18, maxResolution:156543, units:'meters', projection: "EPSG:41001"} );
index abe896db90b11fa2003a791574a5cde1ffbbf249..a5a91ee0f7443756e813fa73432e152293f02e34 100644 (file)
@@ -1,5 +1,5 @@
 <h2><%= @this_user.display_name %>'s diary</h2>
-<% if @this_user.id == @user.id %>
+<% if @user and @this_user.id == @user.id %>
   <%= link_to 'new post', :controller => 'diary_entry', :action => 'new', :display_name => @user.display_name %>
 <% end %>
 
index 34a30dd4281b9d29c7c0586e41d7b5ffe6a30302..4c97257d258921127fd16c607bcef25a47c64116 100644 (file)
@@ -1,12 +1,12 @@
 <h2><%= @this_user.display_name %></h2>
-<% if @this_user.id == @user.id %>
+<% if @user and @this_user.id == @user.id %>
   <%= link_to 'go to your account page', :controller => 'user', :action => 'account', :display_name => @user.display_name %><br /><br />
 <% else %>
-  <%= link_to 'send message', :controller => 'user', :action => 'message', :display_name => @user.display_name %><br /><br /> |
-  <%= link_to 'Add as friend', :controller => 'user', :action => 'make_friend', :display_name => @user.display_name %><br /><br />
+  <%= link_to 'send message', :controller => 'user', :action => 'message', :display_name => @this_user.display_name %><br /><br /> |
+  <%= link_to 'Add as friend', :controller => 'user', :action => 'make_friend', :display_name => @this_user.display_name %><br /><br />
 <% end %>
 
-<%= link_to 'diary', :controller => 'user', :action => 'diary', :display_name => @user.display_name %><br /><br />
+<%= link_to 'diary', :controller => 'user', :action => 'diary', :display_name => @this_user.display_name %><br /><br />
 
 <%= simple_format(@this_user.description) %>