]> git.openstreetmap.org Git - rails.git/blob - app/views/layouts/site.html.erb
15eb1d6318a0b21ab24c145b28587736bbbbd506
[rails.git] / app / views / layouts / site.html.erb
1 <!DOCTYPE html>
2 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<%= I18n.locale %>" lang="<%= I18n.locale %>" dir="<%= t'html.dir' %>">
3   <%= render :partial => "layouts/head" %>
4   <body class="<%= params[:controller] %> <%= params[:controller] %>-<%= params[:action] %>">
5     <div id="small-title">
6       <%= link_to(image_tag("osm_logo.png", :size => "16x16", :border => 0, :alt => t('layouts.logo.alt_text')), root_path) %>
7       <h1><%= t 'layouts.project_name.h1' %></h1>
8     </div>
9     <div id="content">
10       <%= render :partial => "layouts/flash", :locals => { :flash => flash } %>
11       <%= yield %>
12     </div>
13     <div id='top-bar'>
14       <span id="greeting">
15          <% if @user and @user.id %>
16            <span id="full-greeting"><%= raw(t 'layouts.welcome_user', :user_link => (link_to h(@user.display_name), user_path(:display_name => @user.display_name), :title => t('layouts.welcome_user_link_tooltip'))) %></span> 
17            <span id="small-greeting"><%= link_to t('layouts.welcome_user_link_tooltip'), user_path(:display_name => @user.display_name) %></span> | 
18            <%= yield :greeting %>
19            <%= render :partial => "layouts/inbox" %> |
20            <%= link_to t('layouts.logout'), logout_path(:session => request.session_options[:id], :referer => request.fullpath), {:id => 'logoutanchor', :title => t('layouts.logout_tooltip')}%>
21          <% else %>
22            <%= link_to t('layouts.log_in'), login_path(:referer => request.fullpath), {:id => 'loginanchor', :title => t('layouts.log_in_tooltip')} %> |
23            <%= link_to t('layouts.sign_up'), user_new_path, {:id => 'registeranchor', :title => t('layouts.sign_up_tooltip')} %>
24          <% end %>
25       </span>
26       <ul id="tabnav">
27         <li><%= link_to t('layouts.view'), root_path, {
28           :id => 'viewanchor',
29           :title => t('layouts.view_tooltip'),
30           :class => 'geolink llz layers'
31         } %></li>
32         <li><%= link_to h(t('layouts.edit')) + content_tag(:span, "▾", :class => "menuicon"), edit_path, {
33           :id => 'editanchor',
34           :title => t('javascripts.site.edit_tooltip'),
35           :data => { :minzoom => 13 },
36           :class => 'geolink llz object disabled'
37         } %></li>
38         <li><%= link_to t('layouts.history'), browse_changesets_path, {
39           :id => 'historyanchor',
40           :data => { :minzoom => 11 },
41           :title => t('javascripts.site.history_tooltip'),
42           :class => 'geolink bbox'
43         } %></li>
44         <li><%= link_to t('layouts.export'), export_path, {
45           :id => 'exportanchor',
46           :title => t('layouts.export_tooltip'),
47           :class => 'geolink llz layers'
48         } %></li>
49       </ul>
50     </div>
51     <div id="editmenu" class="menu">
52       <ul>
53         <% Editors::ALL_EDITORS.each do |editor| %>
54           <li><%= link_to t('layouts.edit_with',
55             :editor => t("editor.#{editor}.description")),
56             edit_path(:editor => editor), {
57             :id => editor + 'anchor',
58             :class => "geolink llz object"
59           } %></li>
60         <% end %>
61         <%= yield :editmenu %>
62       </ul>
63     </div>
64     <script type="text/javascript">
65       createMenu("editanchor", "editmenu", "left");
66     </script>
67     <div id="left">
68       <div id="logo">
69         <%= link_to(image_tag("osm_logo.png",
70           :size => "120x120",
71           :alt => t('layouts.logo.alt_text')),
72           root_path) %><br/>
73         <h1><%= t 'layouts.project_name.h1' %></h1>
74         <h2 class="nowrap"><%= t('layouts.tag_line') %></h2>
75       </div>
76       <%= yield :optionals %>
77       <% unless @user %>
78       <div class="sidebar-copy intro">
79         <p><%= t 'layouts.intro_1' %></p>
80         <p>
81         <%= t 'layouts.intro_2_html',
82           :download => link_to(t('layouts.intro_2_download'), "http://planet.openstreetmap.org/"),
83           :use => link_to(t('layouts.intro_2_use'), t('layouts.intro_2_use_url')),
84           :license => link_to(t('layouts.intro_2_license'), copyright_path),
85           :create_account => link_to(t('layouts.intro_2_create_account'), user_new_path)
86         %>
87         </p>
88       </div>
89       <% end %>
90       <% if STATUS == :database_offline or STATUS == :api_offline %>
91       <div class="sidebar-alert">
92         <p><%= t 'layouts.osm_offline' %></p>
93       </div>
94       <% elsif STATUS == :database_readonly or STATUS == :api_readonly %>
95       <div class="sidebar-alert">
96         <p><%= t 'layouts.osm_read_only' %></p>
97       </div>
98       <% end %>
99       <% if false %>
100       <div class="sidebar-notice">
101         <p><%= raw t 'layouts.donate', :link => "<a href=\"http://donate.openstreetmap.org/\">#{t('layouts.donate_link_text')}</a>" %></p>
102       </div>
103       <% end %>
104       <div id="left_menu" class="left_menu">
105         <ul>
106           <li><%= t'layouts.help' %>
107             <ul>
108             <li><%= link_to(t('layouts.help_centre'), t('layouts.help_url'), :title => t('layouts.help_title')) %></li>
109             <li><%= link_to(t('layouts.documentation'), t('layouts.wiki_url'), :title => t('layouts.documentation_title')) %></li>
110             <li><%= link_to t('layouts.copyright'), copyright_path %></li>
111             </ul>
112           </li>
113           <li><%= t'layouts.community' %>
114             <ul>
115             <li><a href="http://blogs.openstreetmap.org/" title="<%= t 'layouts.community_blogs_title' %>"><%= t 'layouts.community_blogs' %></a></li>
116             <li><a href="http://www.osmfoundation.org" title="<%= t 'layouts.foundation_title' %>"><%= t 'layouts.foundation' %></a></li>
117             <li><%= link_to(t('layouts.user_diaries'), diary_path, {
118               :title => t('layouts.user_diaries_tooltip')
119             }) %></li>
120             </ul>
121           </li>
122           <li><%= link_to t('layouts.gps_traces'), traces_path, {
123             :id => 'traceanchor',
124             :title => t('layouts.gps_traces_tooltip')
125           } %></li>
126           <%= yield :left_menu %>
127         </ul>
128       </div>
129       <div id="sotm">
130         <%= link_to image_tag("sotmpdx.png",
131           :alt => t('layouts.sotm2012'),
132           :title => t('layouts.sotm2012'),
133           :border => "0"), "http://stateofthemap.us/" %>
134       </div>
135       <div class="donate">
136         <a href="http://donate.openstreetmap.org/" title="<%= h(t('layouts.make_a_donation.title')) %>"><%= h(t('layouts.make_a_donation.text')) %></a>
137       </div>
138       <div class='sidebar-copy'>
139         <p class='deemphasize'><%= t 'layouts.partners_html',
140           :ucl => link_to(t('layouts.partners_ucl'), "http://www.vr.ucl.ac.uk"),
141           :ic => link_to(t('layouts.partners_ic'), "http://www.imperial.ac.uk/"),
142           :bytemark => link_to(t('layouts.partners_bytemark'), "http://www.bytemark.co.uk"),
143           :partners => link_to(t('layouts.partners_partners'), t('layouts.partners_url')) %>
144         </p>
145       </div>
146     </div>
147     <% if defined?(PIWIK_LOCATION) and defined?(PIWIK_SITE) -%>
148     <noscript><p><img src="<%= request.protocol %><%= PIWIK_LOCATION %>/piwik.php?idsite=<%= PIWIK_SITE %>" style="border:0" alt="" /></p></noscript>
149     <% end -%>
150   </body>
151 </html>