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