]> git.openstreetmap.org Git - rails.git/blob - app/views/browse/_map.html.erb
Add /user_blocks/ to robots.txt disallow
[rails.git] / app / views / browse / _map.html.erb
1 <iframe id="linkloader" style="display: none">
2 </iframe>
3
4 <div id="browse_map">
5   <% if map.instance_of? Changeset or (map.instance_of? Node and map.version > 1) or map.visible %>
6
7   <% content_for :head do %>
8     <%= javascript_include_tag "browse" %>
9   <% end %>
10
11   <%
12      if map.instance_of? Changeset
13        bbox = map.bbox.to_unscaled
14        data = {
15          :type   => "changeset",
16          :id     => map.id,
17          :minlon => bbox.min_lon,
18          :minlat => bbox.min_lat,
19          :maxlon => bbox.max_lon,
20          :maxlat => bbox.max_lat
21        }
22      else
23        data = {
24          :type    => map.class.name.downcase,
25          :id      => map.id,
26          :version => map.version,
27          :visible => map.visible
28        }
29      end
30   %>
31   <%= content_tag "div", "", :id => "small_map", :data => data %>
32   <span id="loading"><%= t 'browse.map.loading' %></span>
33
34   <%= link_to t("browse.map.larger.area"),
35               root_path(:box => "yes"),
36               :id => "area_larger_map",
37               :class => "geolink bbox" %>
38   <br />
39   <%= link_to h(t("browse.map.edit.area")) + content_tag(:span, "▾", :class => "menuicon"),
40               edit_path,
41               :id => "area_edit",
42               :data => { :editor => preferred_editor },
43               :class => "geolink bbox" %>
44
45   <% unless map.instance_of? Changeset %>
46     <br />
47     <%= link_to t("browse.map.larger." + map.class.to_s.downcase),
48                 root_path,
49                 :id => "object_larger_map",
50                 :class => "geolink object" %>
51     <br />
52     <%= link_to h(t("browse.map.edit." + map.class.to_s.downcase)) + content_tag(:span, "▾", :class => "menuicon"),
53                 edit_path,
54                 :id => "object_edit",
55                 :data => { :editor => preferred_editor },
56                 :class => "geolink object" %>
57   <% end %>
58
59   <% else %>
60     <%= t 'browse.map.deleted' %>
61   <% end %>
62 </div>
63
64 <div id="area_edit_menu" class="menu">
65   <ul>
66     <% Editors::RECOMMENDED_EDITORS.each do |editor| %>
67       <li><%= link_to t('layouts.edit_with', :editor => t("editor.#{editor}.description")),
68                       edit_path(:editor => editor),
69                       :data => {:editor => editor},
70                       :class => "geolink bbox" %></li>
71     <% end %>
72   </ul>
73 </div>
74
75 <div id="object_edit_menu" class="menu">
76   <ul>
77     <% Editors::RECOMMENDED_EDITORS.each do |editor| %>
78       <li><%= link_to t('layouts.edit_with', :editor => t("editor.#{editor}.description")),
79                       edit_path(:editor => editor),
80                       :data => {:editor => editor},
81                       :class => "geolink object" %></li>
82     <% end %>
83   </ul>
84 </div>