]> git.openstreetmap.org Git - rails.git/blob - app/views/layouts/map.html.erb
c6467382a4d6ae3d87ad4a11b4d5f58d912f4065
[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">
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     <a id="ad" href="#">
31       <span class="ad-content">State of the Map 2014</span>
32       <span class="close">dismiss</span>
33     </a>
34
35     <div id="sidebar_content">
36       <% if STATUS == :database_offline or STATUS == :api_offline %>
37         <p class="error"><%= t 'layouts.osm_offline' %></p>
38       <% elsif STATUS == :database_readonly or STATUS == :api_readonly %>
39         <p class="error"><%= t 'layouts.osm_read_only' %></p>
40       <% end %>
41
42       <%= render :partial => "layouts/flash" %>
43
44       <%= yield %>
45     </div>
46   </div>
47
48   <noscript>
49     <div id="noscript">
50       <p><%= t 'site.index.js_1' %></p>
51       <p><%= t 'site.index.js_2' %></p>
52     </div>
53   </noscript>
54
55   <div id="map-ui">
56   </div>
57
58   <div id="map" tabindex="2">
59   </div>
60
61   <div id="attribution">
62     <table width="100%">
63       <tr>
64         <td class="attribution_license"><%= t 'site.index.license.license_url' %></td>
65         <td class="attribution_project"><%= t 'site.index.license.project_url' %></td>
66       </tr>
67       <tr>
68         <td colspan="2" class="attribution_notice"><%= t 'site.index.license.copyright' %></td>
69       </tr>
70     </table>
71   </div>
72 <% end %>
73
74 <%= render :template => 'layouts/site' %>