]> git.openstreetmap.org Git - rails.git/blob - app/views/layouts/map.html.erb
Convert search to pushState
[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 <% content_for :content do %>
8   <div id="sidebar">
9     <%= form_tag search_path, :id => "search_form" do %>
10       <%= submit_tag t('site.search.submit_text') %>
11       <div id='query_wrapper'>
12         <%= text_field_tag :query, params[:query],
13                            :placeholder => t('site.search.search') %>
14         <%= link_to t('site.search.where_am_i'), '#', { :id => "describe_location", :title => t('site.search.where_am_i_title') } %>
15       </div>
16     <% end %>
17
18     <div id="sidebar_content">
19       <% if STATUS == :database_offline or STATUS == :api_offline %>
20         <p class="alert"><%= t 'layouts.osm_offline' %></p>
21       <% elsif STATUS == :database_readonly or STATUS == :api_readonly %>
22         <p class="alert"><%= t 'layouts.osm_read_only' %></p>
23       <% end %>
24
25       <%= yield %>
26     </div>
27   </div>
28
29   <noscript>
30     <div id="noscript">
31       <p><%= t 'site.index.js_1' %></p>
32       <p><%= t 'site.index.js_2' %></p>
33     </div>
34   </noscript>
35
36   <div id="map-ui">
37   </div>
38
39   <div id="map" tabindex="2">
40   </div>
41
42   <div id="attribution">
43     <table width="100%">
44       <tr>
45         <td class="attribution_license"><%= t 'site.index.license.license_url' %></td>
46         <td class="attribution_project"><%= t 'site.index.license.project_url' %></td>
47       </tr>
48       <tr>
49         <td colspan="2" class="attribution_notice"><%= t 'site.index.license.copyright' %></td>
50       </tr>
51     </table>
52   </div>
53 <% end %>
54
55 <%= render :template => 'layouts/site' %>