-<html>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
- <%= javascript_include_tag 'main.js' %>
- <!--[if IE]><%= javascript_include_tag 'pngfix.js' %><![endif]--> <!-- thanks, microsoft! -->
- <%= javascript_include_tag 'tile.js' %>
- <%= javascript_include_tag 'site.js' %>
-
- <link rel="stylesheet" type="text/css" href="/stylesheets/site.css" />
- <title>OpenStreetMap</title>
+ <%= javascript_include_tag 'prototype' %>
+ <%= javascript_include_tag 'site' %>
+ <!--[if lt IE 7]><%= javascript_include_tag 'pngfix' %><![endif]--> <!-- thanks, microsoft! -->
+ <%= stylesheet_link_tag 'site' %>
+ <%= stylesheet_link_tag 'print', :media => "print" %>
+ <%= tag("link", { :rel => "search", :type => "application/opensearchdescription+xml", :title => "OpenStreetMap Search", :href => "/opensearch/osm.xml" }) %>
+ <%= tag("meta", { :name => "description", :content => "OpenStreetMap is the free wiki world map." }) %>
+ <%= yield :head %>
+ <title>OpenStreetMap<%= ' | '+ h(@title) if @title %></title>
</head>
<body>
-
<div id="content">
-<% if flash[:notice] %>
- <div id="notice"><%= flash[:notice] %></div>
-<% end %>
-
- <%= yield %>
-
- </div>
-
- <span id="greeting">
- <% if @user %>
- Welcome, <%= @user.display_name %> |
- <%= link_to 'logout', {:controller => 'user', :action => 'logout'}, {:id => 'loginanchor'}%>
- <% else %>
- <%= link_to 'log in', {:controller => 'user', :action => 'login'}, {: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'
- 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>
-
- <div id="left">
+ <% if @notice || flash[:notice] %>
+ <div id="notice"><%= @notice || flash[:notice] %></div>
+ <% end %>
- <div id="logo">
- <center>
- <h1>OpenStreetMap</h1>
- <img src="/images/osm_logo.png" width="120" height="120"/><br/>
- <nobr><h2>The Free Wiki World Map</h2></nobr>
- </center>
- </div>
- <% unless @user %>
- <div id="intro">
- OpenStreetMap is a free editable map of the whole world. It is made by people like you.
- <p/>
- OpenStreetMap allows you to view, edit and use geographical data in a collaborative way from anywhere on Earth.
- <p/>
- OpenStreetMap's hosting is kindly supported by the <a href="http://www.vr.ucl.ac.uk">UCL VR Centre</a> and <a href="http://www.bytemark.co.uk">bytemark</a>.
+ <%= yield %>
</div>
- <% end %>
- <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>
+ <span id="greeting">
+ <% if @user and @user.id %>
+ Welcome, <%= link_to h(@user.display_name), {:controller => 'user', :action => 'view', :display_name => @user.display_name}%> |
+ <% @inbox_weight = 'bold' if @user.new_messages.size > 0 %>
+ <%= 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 %>
+ <%= 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 = ''
+ historyclass = ''
+ exportclass = ''
+ traceclass = ''
+ viewclass = 'active' if params['controller'] == 'site' and params['action'] == 'index'
+ editclass = 'active' if params['controller'] == 'site' and params['action'] == 'edit'
+ historyclass = 'active' if params['controller'] == 'changeset' and params['action'] == 'list_bbox'
+ exportclass = 'active' if params['controller'] == 'site' and params['action'] == 'export'
+ traceclass = 'active' if params['controller'] == 'trace'
+ diaryclass = 'active' if params['controller'] == 'diary_entry'
+ %>
+ <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 'History', {:controller => 'changeset', :action => 'list_bbox' }, {:id => 'historyanchor', :title => 'changeset history', :class => historyclass} %></li>
+ <% if params['controller'] == 'site' and (params['action'] == 'index' or params['action'] == 'export') %>
+ <li><%= link_to_remote 'Export', {:url => {:controller => 'export', :action => 'start'}}, {:id => 'exportanchor', :title => 'export map data', :class => exportclass, :href => url_for(:controller => 'site', :action => 'export')} %></li>
+ <% else %>
+ <li><%= link_to 'Export', {:controller => 'site', :action => 'export'}, {:id => 'exportanchor', :title => 'export map data', :class => exportclass} %></li>
+ <% end %>
+ <li><%= link_to 'GPS Traces', {:controller => 'trace', :action => 'list'}, {:id => 'traceanchor', :title => 'manage traces', :class => traceclass} %></li>
+ <li><%= link_to 'User Diaries', {:controller => 'diary_entry', :action => 'list', :display_name => nil}, {:id => 'diaryanchor', :title => 'view user diaries', :class => diaryclass} %></li>
+ </ul>
+ </div>
- <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>
+ <div id="left">
+ <div id="logo">
+ <center>
+ <h1>OpenStreetMap</h1>
+ <%= link_to(image_tag("osm_logo.png", :size => "120x120", :border => 0), :controller => 'site', :action => 'index') %><br/>
+ <h2 class="nowrap">The Free Wiki World Map</h2>
+ </center>
+ </div>
- </center>
+ <% unless @user %>
+ <div id="intro">
+ <p>
+ OpenStreetMap is a free editable map of the whole world. It
+ is made by people like you.
+ </p>
+ <p>
+ OpenStreetMap allows you to view, edit and use geographical
+ data in a collaborative way from anywhere on Earth.
+ </p>
+ <p>
+ OpenStreetMap's hosting is kindly supported by the
+ <a href="http://www.vr.ucl.ac.uk">UCL VR Centre</a> and
+ <a href="http://www.bytemark.co.uk">bytemark</a>.
+ </p>
+ </div>
+ <% end %>
- </div>
+ <% if OSM_STATUS == :database_offline or OSM_STATUS == :api_offline %>
+ <div id="alert">
+ The OpenStreetMap database is currently offline while
+ essential database maintenance work is carried out.
+ </div>
+ <% elsif OSM_STATUS == :database_readonly or OSM_STATUS == :api_readonly %>
+ <div id="alert">
+ The OpenStreetMap database is currently in read-only mode while
+ essential database maintenance work is carried out.
+ </div>
+ <% end %>
- <%= yield :optionals %>
+ <% if false %>
+ <div id="donate" class="notice">
+ Support OpenStreetMap by
+ <a href="http://donate.openstreetmap.org/">donating</a>
+ to the Hardware Upgrade Fund.
+ </div>
+ <% end %>
- <div id="cclogo">
- <center>
+ <div id="left_menu" class="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 />
+ <%= yield :left_menu %>
+ </div>
- <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
- <input type="hidden" name="cmd" value="_s-xclick">
- <input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but21.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
- <img alt="" border="0" src="https://www.paypal.com/en_GB/i/scr/pixel.gif" width="1" height="1">
- <input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIHTwYJKoZIhvcNAQcEoIIHQDCCBzwCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYCsNDDDDa7OZFojBzDvG4HSPXOiJSO3VNuLoc8HGwsds3LsZYYtv4cPGw7Z/SoVVda+RELM+5FQn0D3Kv7hjA2Z6QdwEkFH2kDDlXCvyPt53ENHkQrzC1KOueRpimsQMH5hl03nvuVXij0hEYlMFqTH0UZr80vyczB+lJU6ZKYtrDELMAkGBSsOAwIaBQAwgcwGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQIZa12CIRB0geAgahqF6Otz0oY0+Wg56fSuEpZvbUmNGEQznjWqBXkJqTkZT0jOwekOrlEi7bNEU8yVIie2u5L1gOhBDSl6rmgpxxVURSa4Jig5qiSioyK5baH6HjXVPQ+MDEWg1gZ4LtjYYtroZ8SBE/1eikQWmG7EOEgU62Vn/jqJJ77/mgS7mdEQhlEWYMiyJBZs35yCB/pK5FUxhZnrquL4sS+2QKHPPOGPDfRc/dnhMKgggOHMIIDgzCCAuygAwIBAgIBADANBgkqhkiG9w0BAQUFADCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3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gNbMUa+u4qectsMAXpVHnD9wIyfmHMYIBmjCCAZYCAQEwgZQwgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tAgEAMAkGBSsOAwIaBQCgXTAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0wNjA4MjYwODQ2NDdaMCMGCSqGSIb3DQEJBDEWBBTyC1ZchvuTMtcYeudPPSP/w8HiEDANBgkqhkiG9w0BAQEFAASBgJPpBf69pRAJfhzv/MfPiMncuq3TSlvpX7VtG9p4dXzSko4i2lWUDD72r5zdF2NwDgZ6avf630PutgpOzYJQ525If1xU2olc9DWI43UZTqY+FArgFuCJ8VnkPsy9mcbXPoSjLRqNwrsA2yoETxMISO3ASELzELJTJgpPk4bU57eZ-----END PKCS7-----">
- </form>
+ <div id="sotm" class="notice">
+ Come to the 2009 OpenStreetMap
+ Conference, <a href="http://www.stateofthemap.org">The State
+ of the Map</a>, July 10-12 in Amsterdam!
+ </div>
- <a href="http://creativecommons.org/licenses/by-sa/2.0/"><img src="/images/cc_button.png" border="0"></a>
+ <%= yield :optionals %>
- </center>
+ <center>
+ <div class="button" style="width: 115px">
+ <a href="http://donate.openstreetmap.org/"><img src="/images/donate.png" border="0" alt="Make a Donation" /></a>
</div>
- </div>
- </body>
- </html>
+ <div id="cclogo" class="button" style="width: 88px">
+ <%= link_to image_tag("cc_button.png", :alt => "CC by-sa 2.0", :border => "0"), "http://creativecommons.org/licenses/by-sa/2.0/" %>
+ </div>
+ </center>
+ </div>
+ </body>
+</html>