]> git.openstreetmap.org Git - rails.git/blob - app/views/layouts/map.html.erb
Merge branch 'contextmenu'
[rails.git] / app / views / layouts / map.html.erb
1 <% content_for :head do %>
2   <%= javascript_include_tag "index" %>
3 <% end %>
4
5 <% content_for(:body_class) { "map-layout" } %>
6
7 <% if @user and !@user.home_lon.nil? and !@user.home_lat.nil? %>
8   <% content_for :greeting do %>
9     <%= link_to t("layouts.home"),
10                 "#",
11                 :id => "homeanchor",
12                 :class => "set_position",
13                 :data => { :lat => @user.home_lat,
14                            :lon => @user.home_lon,
15                            :zoom => 15 } %>
16   <% end %>
17 <% end %>
18
19 <% content_for :header do %>
20   <%= render :partial => "layouts/search", :locals => { :autofocus => false } %>
21 <% end %>
22
23 <% content_for :content do %>
24   <div id="sidebar">
25     <%= render :partial => "layouts/search", :locals => { :autofocus => true } %>
26
27     <% if STATUS == :database_offline or STATUS == :api_offline %>
28       <p class="error"><%= t 'layouts.osm_offline' %></p>
29     <% elsif STATUS == :database_readonly or STATUS == :api_readonly %>
30       <p class="error"><%= t 'layouts.osm_read_only' %></p>
31     <% end %>
32
33     <div id="flash">
34       <%= render :partial => "layouts/flash" %>
35     </div>
36
37     <div id="browse_status"></div>
38
39     <div id="sidebar_loader" style="display: none;">
40       <img alt="<%= t('browse.start_rjs.loading') %>" class="loader" src="<%= image_path("searching.gif") %>">
41     </div>
42
43     <div id="sidebar_content">
44       <%= yield %>
45     </div>
46
47     <% unless @user %>
48       <div class="welcome">
49         <h2><%= t 'layouts.intro_header' %></h2>
50         <div class="close-wrap"><span class="icon close"></span></div>
51         <p><%= t 'layouts.intro_text' %></p>
52         <p><%= t 'layouts.partners_html',
53                :ucl => link_to(t('layouts.partners_ucl'), "http://www.bartlett.ucl.ac.uk"),
54                :ic => link_to(t('layouts.partners_ic'), "http://www.imperial.ac.uk/"),
55                :bytemark => link_to(t('layouts.partners_bytemark'), "http://www.bytemark.co.uk"),
56                :partners => link_to(t('layouts.partners_partners'), "https://hardware.openstreetmap.org/thanks/") %>
57         </p>
58         <a class="button learn-more" href="<%= about_path %>"><%= t('layouts.learn_more') %></a>
59         <a class="button sign-up" href="<%= user_new_path %>"><%= t('layouts.start_mapping') %></a>
60       </div>
61     <% end %>
62
63     <div id="banner">
64       <%= render :partial => "layouts/banner" %>
65     </div>
66   </div>
67
68   <noscript>
69     <div id="noscript">
70       <p><%= t 'site.index.js_1' %></p>
71       <p><%= t 'site.index.js_2' %></p>
72     </div>
73   </noscript>
74
75   <div id="map-ui">
76   </div>
77
78   <div id="map" tabindex="2">
79   </div>
80
81   <div id="attribution">
82     <table>
83       <tr>
84         <td class="attribution_license"><%= t 'site.index.license.license_url' %></td>
85         <td class="attribution_project"><%= t 'site.index.license.project_url' %></td>
86       </tr>
87       <tr>
88         <td colspan="2" class="attribution_notice"><%= t 'site.index.license.copyright' %></td>
89       </tr>
90     </table>
91   </div>
92 <% end %>
93
94 <%= render :template => 'layouts/site' %>