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