- <div id="left_menu">
- <a href="http://wiki.openstreetmap.org">Help & Wiki</a><br />
- <a href="http://www.opengeodata.org/">News blog</a><br />
- <a href="http://wiki.openstreetmap.org/index.php/Merchandise">Shop</a><br />
- <center>
-
- <script type="text/javascript"><!--
- var detect = navigator.userAgent.toLowerCase();
- if (detect.indexOf('msie') >= 0) {
- document.write('<script type=\"text/javascript\"> google_ad_client = \"pub-7727744269903103\"; google_ad_width = 125; google_ad_height = 125; google_ad_format = \"125x125_as_rimg\"; google_cpa_choice = \"CAAQveHnzwEaCEiH5iXPqf1SKJe193M\"; </script> <script type=\"text/javascript\" src=\"http://pagead2.googlesyndication.com/pagead/show_ads.js\"> </script>');
- }
-//--></script>
+ <span id="greeting">
+ <% 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', :referer => request.request_uri}, {:id => 'loginanchor'}%> |
+ <%= link_to 'sign up', {:controller => 'user', :action => 'new'}, {:id => 'registeranchor'} %>
+ <% end %>
+ </span>
+
+ <div>
+ <ul id="tabnav">
+ <%
+ viewclass = ''
+ editclass = ''
+ traceclass = ''
+ viewclass = 'active' if params['controller'] == 'site' and params['action'] == 'index'
+ editclass = 'active' if params['controller'] == 'site' and params['action'] == 'edit'
+ editclass = 'active' if params['controller'] == 'campaign'
+ traceclass = 'active' if params['controller'] == 'trace'
+ %>
+ <li><%= link_to 'View', {:controller => 'site', :action => 'index'}, {:id => 'viewanchor', :title => 'view maps', :class => viewclass } %></li>
+ <li><%= link_to 'Edit', {:controller => 'site', :action => 'edit'}, {:id => 'editanchor', :title => 'edit maps', :class => editclass } %></li>
+ <li><%= link_to 'GPS traces', {:controller => 'trace', :action => 'list'}, {:id => 'traceanchor', :title => 'manage traces', :class => traceclass } %></li>
+ </ul>
+ </div>