]> git.openstreetmap.org Git - rails.git/blob - app/views/layouts/map.html.erb
Merge branch 'comments'
[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="sotm">
34       <a href="http://www.stateofthemap.org/?l=en"><%= image_tag "sotm.png" %></a>
35       <h2>
36         <a><span class="icon close"></span></a>
37         <a href="http://www.stateofthemap.org/?l=en"><%= t 'layouts.sotm_header' %></a>
38       </h2>
39       <p><a href="http://www.stateofthemap.org/?l=en">
40         <%= t 'layouts.sotm_line_1' %>
41       <br />
42         <%= t 'layouts.sotm_line_2' %>
43       <br />
44         <%= t 'layouts.sotm_line_3' %>
45       </a></p>
46     </div>
47
48     <div id="flash">
49       <%= render :partial => "layouts/flash" %>
50     </div>
51
52     <div id="browse_status"></div>
53
54     <div id="sidebar_loader" style="display: none;">
55       <img alt="<%= t('browse.start_rjs.loading') %>" class="loader" src="<%= image_path("searching.gif") %>">
56     </div>
57
58     <div id="sidebar_content">
59       <%= yield %>
60     </div>
61
62     <% unless @user %>
63       <div class="welcome">
64         <h2><a><span class="icon close"></span></a><%= t 'layouts.intro_header' %></h2>
65         <p><%= t 'layouts.intro_text' %></p>
66         <a class="button learn-more" href="<%= about_path %>"><%= t('layouts.learn_more') %></a>
67         <a class="button sign-up" href="<%= user_new_path %>"><%= t('layouts.start_mapping') %></a>
68       </div>
69     <% end %>
70   </div>
71
72   <noscript>
73     <div id="noscript">
74       <p><%= t 'site.index.js_1' %></p>
75       <p><%= t 'site.index.js_2' %></p>
76     </div>
77   </noscript>
78
79   <div id="map-ui">
80   </div>
81
82   <div id="map" tabindex="2">
83   </div>
84
85   <div id="attribution">
86     <table width="100%">
87       <tr>
88         <td class="attribution_license"><%= t 'site.index.license.license_url' %></td>
89         <td class="attribution_project"><%= t 'site.index.license.project_url' %></td>
90       </tr>
91       <tr>
92         <td colspan="2" class="attribution_notice"><%= t 'site.index.license.copyright' %></td>
93       </tr>
94     </table>
95   </div>
96 <% end %>
97
98 <%= render :template => 'layouts/site' %>