-<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>
-
- <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 %>
+ <%= t 'layouts.welcome_user', :user_link => (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 t('layouts.inbox', :size => @user.new_messages.size), {:controller => 'message', :action => 'inbox', :display_name => @user.display_name}, {:style => "font-weight: #{@inbox_weight};" } %> |
+ <%= link_to t('layouts.logout'), {:controller => 'user', :action => 'logout', :referer => request.request_uri}, {:id => 'logoutanchor'}%>
+ <% else %>
+ <%= link_to t('layouts.log_in'), {:controller => 'user', :action => 'login', :referer => request.request_uri}, {:id => 'loginanchor'}%> |
+ <%= link_to t('layouts.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 t('layouts.view'), {:controller => 'site', :action => 'index'}, {:id => 'viewanchor', :title => t('layouts.view_tooltip'), :class => viewclass} %></li>
+ <li><%= link_to t('layouts.edit'), {:controller => 'site', :action => 'edit'}, {:id => 'editanchor', :title => t('layouts.edit_tooltip'), :class => editclass} %></li>
+ <li><%= link_to t('layouts.history'), {:controller => 'changeset', :action => 'list_bbox' }, {:id => 'historyanchor', :title => t('layouts.history_tooltip'), :class => historyclass} %></li>
+ <% if params['controller'] == 'site' and (params['action'] == 'index' or params['action'] == 'export') %>
+ <li><%= link_to_remote t('layouts.export'), {:url => {:controller => 'export', :action => 'start'}}, {:id => 'exportanchor', :title => t('layouts.export_tooltip'), :class => exportclass, :href => url_for(:controller => 'site', :action => 'export')} %></li>
+ <% else %>
+ <li><%= link_to t('layouts.export'), {:controller => 'site', :action => 'export'}, {:id => 'exportanchor', :title => t('layouts.export_tooltip'), :class => exportclass} %></li>
+ <% end %>
+ <li><%= link_to t('layouts.gps_traces'), {:controller => 'trace', :action => 'list'}, {:id => 'traceanchor', :title => t('layouts.gps_traces_tooltip'), :class => traceclass} %></li>
+ <li><%= link_to t('layouts.user_diaries'), {:controller => 'diary_entry', :action => 'list', :display_name => nil}, {:id => 'diaryanchor', :title => t('layouts.user_diaries_tooltip'), :class => diaryclass} %></li>
+ </ul>
+ </div>
+ <div id="left">
- </center>
+ <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"><%= t('layouts.tag_line') %></h2>
+ </center>
+ </div>
- </div>
+ <% unless @user %>
+ <div id="intro">
+ <p>
+ <%= t 'layouts.intro_1' %>
+ </p>
+ <p>
+ <%= t 'layouts.intro_2' %>.
+ </p>
+ <p>
+ <%= t 'layouts.intro_3',
+ :ucl => '<a href="http://www.vr.ucl.ac.uk">UCL VR Centre</a>',
+ :bytemark => '<a href="http://www.bytemark.co.uk">bytemark</a>' %>
+ </p>
+ </div>
+ <% end %>
- <%= yield :optionals %>
+ <% if OSM_STATUS == :database_offline or OSM_STATUS == :api_offline %>
+ <div id="alert">
+ <%= t 'layouts.offline' %>
+ </div>
+ <% elsif OSM_STATUS == :database_readonly or OSM_STATUS == :api_readonly %>
+ <div id="alert">
+ <%= t 'layouts.read_only' %>
+ <% end %>
+
+ <% if false %>
+ <div id="donate" class="notice">
+ <%= t 'layouts.donate', :link => "<a href=\"http://donate.openstreetmap.org/\">#{t('layouts.donate_link_text')}</a>" %>
+ </div>
+ <% end %>
- <div id="cclogo">
- <center>
+ <div id="left_menu" class="left_menu">
+ <a href="<%= t 'layouts.help_wiki_url' %>"><%= t 'layouts.help_wiki' %></a><br />
+ <a href="http://www.opengeodata.org/"><%= t 'layouts.news_blog' %></a><br />
+ <a href="<%= t 'layouts.shop_url' %>"><%= t 'layouts.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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ROvdgIONth+8kSK//Y/4ihuE4Ymvzn5ceE3S/iBSQQMjyvb+s2TWbQYDwcp129OPIbD9epdr4tJOUNiSojw7BHwYRiPh58S1xGlFgHFXwrEBb3dgNbMUa+u4qectsMAXpVHnD9wIyfmHMYIBmjCCAZYCAQEwgZQwgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tAgEAMAkGBSsOAwIaBQCgXTAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0wNjA4MjYwODQ2NDdaMCMGCSqGSIb3DQEJBDEWBBTyC1ZchvuTMtcYeudPPSP/w8HiEDANBgkqhkiG9w0BAQEFAASBgJPpBf69pRAJfhzv/MfPiMncuq3TSlvpX7VtG9p4dXzSko4i2lWUDD72r5zdF2NwDgZ6avf630PutgpOzYJQ525If1xU2olc9DWI43UZTqY+FArgFuCJ8VnkPsy9mcbXPoSjLRqNwrsA2yoETxMISO3ASELzELJTJgpPk4bU57eZ-----END PKCS7-----">
- </form>
+ <div id="sotm" class="notice">
+ <%= link_to image_tag("sotm.png", :alt => t('layouts.sotm'), :title => t('layouts.sotm'), :border => "0"), "http://www.stateofthemap.org/register" %>
+ </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="<%= t 'layouts.alt_donation' %>" title="<%= t 'layouts.alt_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>