<% if @user and @user.id %>
Welcome, <%= link_to @user.display_name, {:controller => 'user', :action => 'view', :display_name => @user.display_name}%> |
<% @inbox_weight = 'bold' if @user.new_messages.size > 0 %>
- <% if !@user.home_lon.nil? and !@user.home_lat.nil? %>
- <%= link_to 'home', {:controller => 'site', :action => 'index', :lon => @user.home_lon, :lat => @user.home_lat, :zoom => '10'} %> |
- <% end %>
+ <%= yield :greeting %>
<%= link_to "inbox (#{@user.new_messages.size})", {:controller => 'message', :action => 'inbox', :display_name => @user.display_name}, {:style => "font-weight: #{@inbox_weight};" } %> |
<%= link_to 'logout', {:controller => 'user', :action => 'logout', :referer => request.request_uri}, {:id => 'logoutanchor'}%>
<% else %>
essential database maintenance work is carried out.
</p>
<% else %>
+<% content_for :greeting do %>
+<% if !@user.home_lon.nil? and !@user.home_lat.nil? %>
+<%= link_to_function 'home', "setPosition(#{@user.home_lat}, #{@user.home_lon}, 10)" %> |
+<% end %>
+<% end %>
+
<%= render :partial => 'search', :locals => { :onopen => "resizeMap();", :onclose => "resizeMap();" } %>
<% session[:token] = @user.tokens.create.token unless session[:token] %>
+<% content_for :greeting do %>
+<%= link_to_function 'home', "setPosition(#{@user.home_lat}, #{@user.home_lon}, 10)" %> |
+<% end %>
+
<% content_for :left_menu do %>
<%= link_to "Map key", "http://wiki.openstreetmap.org/index.php/Map_Key" %>
<% end %>