openstreetmap-website/app/views/layouts/map.html.erb
2013-10-13 14:46:08 -07:00

57 lines
1.6 KiB
Text

<% content_for :head do %>
<%= javascript_include_tag "index" %>
<% end %>
<% content_for(:body_class) { "map-layout" } %>
<% content_for :content do %>
<div id="sidebar">
<%= form_tag search_path, :id => "search_form" do %>
<%= submit_tag t('site.search.submit_text') %>
<div id='query_wrapper'>
<%= text_field_tag :query, params[:query],
:placeholder => t('site.search.search') %>
<%= link_to t('site.search.where_am_i'), '#', { :id => "describe_location", :title => t('site.search.where_am_i_title') } %>
</div>
<% end %>
<div id="sidebar_content">
<% if STATUS == :database_offline or STATUS == :api_offline %>
<p class="error"><%= t 'layouts.osm_offline' %></p>
<% elsif STATUS == :database_readonly or STATUS == :api_readonly %>
<p class="error"><%= t 'layouts.osm_read_only' %></p>
<% end %>
<%= render :partial => "layouts/flash" %>
<%= yield %>
</div>
</div>
<noscript>
<div id="noscript">
<p><%= t 'site.index.js_1' %></p>
<p><%= t 'site.index.js_2' %></p>
</div>
</noscript>
<div id="map-ui">
</div>
<div id="map" tabindex="2">
</div>
<div id="attribution">
<table width="100%">
<tr>
<td class="attribution_license"><%= t 'site.index.license.license_url' %></td>
<td class="attribution_project"><%= t 'site.index.license.project_url' %></td>
</tr>
<tr>
<td colspan="2" class="attribution_notice"><%= t 'site.index.license.copyright' %></td>
</tr>
</table>
</div>
<% end %>
<%= render :template => 'layouts/site' %>