]> git.openstreetmap.org Git - rails.git/blob - app/views/layouts/site.rhtml
Use correct key for z15 and greater.
[rails.git] / app / views / layouts / site.rhtml
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
3   <head>
4     <%= javascript_include_tag 'prototype' %>
5     <%= javascript_include_tag 'site' %>
6     <!--[if lt IE 7]><%= javascript_include_tag 'pngfix' %><![endif]--> <!-- thanks, microsoft! -->
7     <%= stylesheet_link_tag 'site' %>
8     <%= stylesheet_link_tag 'print', :media => "print" %>
9     <%= tag("link", { :rel => "search", :type => "application/opensearchdescription+xml", :title => "OpenStreetMap Search", :href => "/opensearch/osm.xml" }) %>
10     <%= yield :head %>
11     <title>OpenStreetMap<%= ' | '+ h(@title) if @title %></title>
12   </head>
13   <body>
14     <div id="content">
15       <% if @notice || flash[:notice] %>
16         <div id="notice"><%= @notice || flash[:notice] %></div>
17       <% end %>
18
19       <%= yield %>
20     </div>
21
22     <span id="greeting">
23       <% if @user and @user.id %>
24         Welcome, <%= link_to h(@user.display_name), {:controller => 'user', :action => 'view', :display_name => @user.display_name}%> | 
25         <% @inbox_weight = 'bold' if @user.new_messages.size > 0 %>
26         <%= yield :greeting %>
27         <%= link_to "inbox (#{@user.new_messages.size})", {:controller => 'message', :action => 'inbox', :display_name => @user.display_name}, {:style => "font-weight: #{@inbox_weight};" } %> |
28         <%= link_to 'logout', {:controller => 'user', :action => 'logout', :referer => request.request_uri}, {:id => 'logoutanchor'}%>
29       <% else %>
30         <%= link_to 'log in', {:controller => 'user', :action => 'login', :referer => request.request_uri}, {:id => 'loginanchor'}%> |
31         <%= link_to 'sign up', {:controller => 'user', :action => 'new'}, {:id => 'registeranchor'} %>
32       <% end %>
33     </span>
34
35     <div>
36       <ul id="tabnav">
37         <%
38         viewclass = ''
39         editclass = ''
40         exportclass = ''
41         traceclass = ''
42         viewclass = 'active' if params['controller'] == 'site' and params['action'] == 'index' 
43         editclass = 'active' if params['controller'] == 'site' and params['action'] == 'edit' 
44         exportclass = 'active' if params['controller'] == 'site' and params['action'] == 'export'
45         traceclass = 'active' if params['controller'] == 'trace'
46         diaryclass = 'active' if params['controller'] == 'diary_entry'
47         %>
48         <li><%= link_to 'View', {:controller => 'site', :action => 'index'}, {:id => 'viewanchor', :title => 'view maps', :class => viewclass} %></li>
49         <li><%= link_to 'Edit', {:controller => 'site', :action => 'edit'}, {:id => 'editanchor', :title => 'edit maps', :class => editclass} %></li>
50         <% if params['controller'] == 'site' and (params['action'] == 'index' or params['action'] == 'export') %>
51         <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>
52         <% else %>
53         <li><%= link_to 'Export', {:controller => 'site', :action => 'export'}, {:id => 'exportanchor', :title => 'export map data', :class => exportclass} %></li>
54         <% end %>
55         <li><%= link_to 'GPS Traces', {:controller => 'trace', :action => 'list'}, {:id => 'traceanchor', :title => 'manage traces', :class => traceclass} %></li>
56         <li><%= link_to 'User Diaries', {:controller => 'diary_entry', :action => 'list', :display_name => nil}, {:id => 'diaryanchor', :title => 'view user diaries', :class => diaryclass} %></li>
57       </ul>
58     </div>
59
60     <div id="left">
61
62       <div id="logo">
63         <center>
64           <h1>OpenStreetMap</h1>
65           <%= link_to(image_tag("osm_logo.png", :size => "120x120", :border => 0), :controller => 'site', :action => 'index') %><br/>
66           <h2 class="nowrap">The Free Wiki World Map</h2>
67         </center>
68       </div>
69
70       <% unless @user %>
71       <div id="intro">
72         <p>
73           OpenStreetMap is a free editable map of the whole world. It
74           is made by people like you.
75         </p>
76         <p>
77           OpenStreetMap allows you to view, edit and use geographical
78           data in a collaborative way from anywhere on Earth.
79         </p>
80         <p>
81           OpenStreetMap's hosting is kindly supported by the
82           <a href="http://www.vr.ucl.ac.uk">UCL VR Centre</a> and
83           <a href="http://www.bytemark.co.uk">bytemark</a>.
84         </p>
85       </div>
86       <% end %>
87
88       <% if OSM_STATUS == :database_offline or OSM_STATUS == :api_offline %>
89       <div id="alert">
90         The OpenStreetMap database is currently offline while
91         essential database maintenance work is carried out.
92       </div>
93       <% elsif OSM_STATUS == :api_readonly %>
94       <div id="alert">
95         The OpenStreetMap database is currently in read-only mode while
96         essential database maintenance work is carried out.
97       </div>
98       <% end %>
99
100       <% if false %>
101       <div id="donate" class="notice">
102         Support OpenStreetMap by
103         <a href="http://donate.openstreetmap.org/">donating</a>
104         to the Hardware Upgrade Fund.
105       </div>
106       <% end %>
107
108       <div id="left_menu" class="left_menu">
109         <a href="http://wiki.openstreetmap.org">Help &amp; Wiki</a><br />
110         <a href="http://www.opengeodata.org/">News blog</a><br />
111         <a href="http://wiki.openstreetmap.org/index.php/Merchandise">Shop</a><br />
112         <%= yield :left_menu %>
113       </div>
114
115       <div id="sotm" class="notice">
116         Come to the 2009 OpenStreetMap
117         Conference, <a href="http://www.stateofthemap.org">The State
118         of the Map</a>, July 10-12 in Amsterdam!
119       </div>
120
121       <%= yield :optionals %>
122
123       <center>
124         <div class="button" style="width: 115px">
125           <a href="http://donate.openstreetmap.org/"><img src="/images/donate.png" border="0" alt="Make a Donation" /></a>
126         </div>
127
128         <div id="cclogo" class="button" style="width: 88px">
129           <a href="http://creativecommons.org/licenses/by-sa/2.0/"><img src="/images/cc_button.png" border="0" alt="" /></a>
130         </div>
131       </center>
132     </div>
133   </body>
134 </html>