<html>
<head>
<%= javascript_include_tag 'main.js' %>
- <!--[if IE]><%= javascript_include_tag 'pngfix.js' %><![endif]--> <!-- thanks, microsoft! -->
+ <!--[if lt IE 7]><%= javascript_include_tag 'pngfix.js' %><![endif]--> <!-- thanks, microsoft! -->
<%= javascript_include_tag 'tile.js' %>
<%= javascript_include_tag 'site.js' %>
</div>
<span id="greeting">
- <% if @user %>
- Welcome, <%= link_to @user.display_name, {:controller => 'user', :action => 'view', :display_name => @user.display_name}, {:id => 'loginanchor'}%> |
- <%= link_to 'logout', {:controller => 'user', :action => 'logout', :next_controller => @controller.controller_name, :next_action => @controller.action_name}, {:id => 'loginanchor'}%>
+ <% 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.get_new_messages.length > 0 %>
+ <%= link_to "inbox (#{@user.get_new_messages.length})", {: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 %>
- <%= link_to 'log in', {:controller => 'user', :action => 'login', :next_controller => @controller.controller_name, :next_action => @controller.action_name}, {:id => 'loginanchor'}%> |
+ <%= link_to 'log in', {:controller => 'user', :action => 'login', :referer => request.request_uri}, {:id => 'loginanchor'}%> |
<%= link_to 'sign up', {:controller => 'user', :action => 'new'}, {:id => 'registeranchor'} %>
<% end %>
</span>
<div id="logo">
<center>
<h1>OpenStreetMap</h1>
- <img src="/images/osm_logo.png" width="120" height="120"/><br/>
+ <%= link_to(image_tag("osm_logo.png", :size => "120x120", :border => 0), :controller => 'site', :action => 'index') %><br/>
<nobr><h2>The Free Wiki World Map</h2></nobr>
</center>
</div>