]> git.openstreetmap.org Git - rails.git/blob - app/views/layouts/site.html.erb
Use leaflet css for print
[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="<%= 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", :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, :editor => preferred_editor },
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           :data => { :url => url_for(:controller => :export, :action => :start) },
48           :class => 'geolink llz layers'
49         } %></li>
50       </ul>
51     </div>
52     <div id="editmenu" class="menu">
53       <ul>
54         <% Editors::RECOMMENDED_EDITORS.each do |editor| %>
55           <li><%= link_to t('layouts.edit_with',
56             :editor => t("editor.#{editor}.description")),
57             edit_path(:editor => editor), {
58             :data => { :editor => editor },
59             :class => "geolink llz object"
60           } %></li>
61         <% end %>
62         <%= yield :editmenu %>
63       </ul>
64     </div>
65     <script type="text/javascript">
66       createMenu("editanchor", "editmenu", "left");
67     </script>
68     <div id="left">
69       <div id="logo">
70         <%= link_to(image_tag("osm_logo.png",
71           :size => "120x120",
72           :alt => t('layouts.logo.alt_text')),
73           root_path) %>
74         <h1><%= t 'layouts.project_name.h1' %></h1>
75         <h2 class="nowrap"><%= t('layouts.tag_line') %></h2>
76       </div>
77       <%= yield :optionals %>
78       <% unless @user %>
79       <div class="sidebar-copy intro">
80         <p><%= t 'layouts.intro_1' %></p>
81         <p>
82         <%= t 'layouts.intro_2_html',
83           :download => link_to(t('layouts.intro_2_download'), "http://planet.openstreetmap.org/"),
84           :use => link_to(t('layouts.intro_2_use'), t('layouts.intro_2_use_url')),
85           :license => link_to(t('layouts.intro_2_license'), copyright_path),
86           :create_account => link_to(t('layouts.intro_2_create_account'), user_new_path)
87         %>
88         </p>
89       </div>
90       <% end %>
91       <% if STATUS == :database_offline or STATUS == :api_offline %>
92       <div class="sidebar-alert">
93         <p><%= t 'layouts.osm_offline' %></p>
94       </div>
95       <% elsif STATUS == :database_readonly or STATUS == :api_readonly %>
96       <div class="sidebar-alert">
97         <p><%= t 'layouts.osm_read_only' %></p>
98       </div>
99       <% end %>
100       <% if false %>
101       <div class="sidebar-notice">
102         <p><%= raw t 'layouts.donate', :link => "<a href=\"http://donate.openstreetmap.org/\">#{t('layouts.donate_link_text')}</a>" %></p>
103       </div>
104       <% end %>
105       <ul id="left_menu" class="left_menu">
106         <li>
107           <h4><%= t'layouts.help' %></h4>
108           <ul>
109             <li><%= link_to(t('layouts.help_centre'), t('layouts.help_url'), :title => t('layouts.help_title')) %></li>
110             <li><%= link_to(t('layouts.documentation'), t('layouts.wiki_url'), :title => t('layouts.documentation_title')) %></li>
111             <li><%= link_to t('layouts.copyright'), copyright_path %></li>
112           </ul>
113         </li>
114         <li>
115           <h4><%= t'layouts.community' %></h4>
116           <ul>
117             <li><a href="http://blogs.openstreetmap.org/" title="<%= t 'layouts.community_blogs_title' %>"><%= t 'layouts.community_blogs' %></a></li>
118             <li><a href="http://www.osmfoundation.org" title="<%= t 'layouts.foundation_title' %>"><%= t 'layouts.foundation' %></a></li>
119             <li><%= link_to(t('layouts.user_diaries'), diary_path, {
120               :title => t('layouts.user_diaries_tooltip')
121             }) %></li>
122           </ul>
123         </li>
124         <li>
125           <h4><%= link_to t('layouts.gps_traces'), traces_path, {
126             :id => 'traceanchor',
127             :title => t('layouts.gps_traces_tooltip')
128           } %></h4>
129         </li>
130         <%= yield :left_menu %>
131       </ul>
132       <a title="<%= h(t('layouts.make_a_donation.title')) %>" href="http://donate.openstreetmap.org/" class="donate">
133         <span class='donate-icon'></span><p><%= h(t('layouts.make_a_donation.text')) %></p>
134       </a>
135       <div class='sidebar-copy'>
136         <p class='deemphasize'><%= t 'layouts.partners_html',
137           :ucl => link_to(t('layouts.partners_ucl'), "http://www.vr.ucl.ac.uk"),
138           :ic => link_to(t('layouts.partners_ic'), "http://www.imperial.ac.uk/"),
139           :bytemark => link_to(t('layouts.partners_bytemark'), "http://www.bytemark.co.uk"),
140           :partners => link_to(t('layouts.partners_partners'), t('layouts.partners_url')) %>
141         </p>
142       </div>
143     </div>
144     <% if defined?(PIWIK_LOCATION) and defined?(PIWIK_SITE) -%>
145     <noscript><p><img src="<%= request.protocol %><%= PIWIK_LOCATION %>/piwik.php?idsite=<%= PIWIK_SITE %>" style="border:0" alt="" /></p></noscript>
146     <% end -%>
147   </body>
148 </html>