]> git.openstreetmap.org Git - rails.git/blob - app/views/layouts/map.html.erb
Overlay-style minimized sidebar
[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 :content do %>
20   <div id="sidebar" class="minimized">
21     <%= form_tag search_path, :id => "search_form" do %>
22       <%= submit_tag t('site.search.submit_text') %>
23       <div id='query_wrapper'>
24         <%= text_field_tag :query, params[:query],
25                            :placeholder => t('site.search.search') %>
26         <%= link_to t('site.search.where_am_i'), '#', { :id => "describe_location", :title => t('site.search.where_am_i_title') } %>
27       </div>
28     <% end %>
29
30     <% if STATUS == :database_offline or STATUS == :api_offline %>
31       <p class="error"><%= t 'layouts.osm_offline' %></p>
32     <% elsif STATUS == :database_readonly or STATUS == :api_readonly %>
33       <p class="error"><%= t 'layouts.osm_read_only' %></p>
34     <% end %>
35
36     <div id="sidebar_content">
37       <%= render :partial => "layouts/flash" %>
38       <%= yield %>
39     </div>
40   </div>
41
42   <noscript>
43     <div id="noscript">
44       <p><%= t 'site.index.js_1' %></p>
45       <p><%= t 'site.index.js_2' %></p>
46     </div>
47   </noscript>
48
49   <div id="map-ui">
50   </div>
51
52   <div id="map" tabindex="2">
53   </div>
54
55   <div id="attribution">
56     <table width="100%">
57       <tr>
58         <td class="attribution_license"><%= t 'site.index.license.license_url' %></td>
59         <td class="attribution_project"><%= t 'site.index.license.project_url' %></td>
60       </tr>
61       <tr>
62         <td colspan="2" class="attribution_notice"><%= t 'site.index.license.copyright' %></td>
63       </tr>
64     </table>
65   </div>
66 <% end %>
67
68 <%= render :template => 'layouts/site' %>