-
- <% if common_details.visible? %>
-
<%= t 'browse.common_details.edited_at' %>
- <% else %>
-
<%= t 'browse.common_details.deleted_at' %>
- <% end %>
-
<%= l common_details.timestamp %>
-
-
- <% if common_details.changeset.user.data_public? %>
-
- <% if common_details.visible? %>
-
<%= t 'browse.common_details.edited_by' %>
- <% else %>
-
<%= t 'browse.common_details.deleted_by' %>
- <% end %>
-
<%= link_to h(common_details.changeset.user.display_name), :controller => "user", :action => "view", :display_name => common_details.changeset.user.display_name %>
-
+
+ <% if common_details.changeset.tags['comment'].present? %>
+ <%= linkify(h(common_details.changeset.tags['comment'])) %>
+ <% else %>
+ <%= t 'browse.no_comment' %>
<% end %>
+
-
-
<%= t 'browse.common_details.version' %>
-
<%= h(common_details.version) %>
-
+
+ <%=
+ t "browse.#{common_details.visible? ? :edited : :deleted}_by_html",
+ :time => distance_of_time_in_words_to_now(common_details.timestamp),
+ :user => changeset_user_link(common_details.changeset),
+ :title => l(common_details.timestamp)
+ %>
+
-
-
<%= t 'browse.common_details.in_changeset' %>
-
<%= link_to common_details.changeset_id, :action => :changeset, :id => common_details.changeset_id %>
-
+
+ <%= t 'browse.version' %>
+ #<%= h(common_details.version) %>
+ ·
+ <%= t 'browse.in_changeset' %>
+ #<%= link_to common_details.changeset_id, :action => :changeset, :id => common_details.changeset_id %>
+
- <% if common_details.changeset.tags['comment'].present? %>
-
-
<%= t 'browse.common_details.changeset_comment' %>
-
<%= linkify(h(common_details.changeset.tags['comment'])) %>
-
- <% end %>
+<% if @type == "node" %>
+
+ Location:
+ <%= link_to(content_tag(:span, number_with_delimiter(common_details.lat), :class => "latitude") + ", " + content_tag(:span, number_with_delimiter(common_details.lon), :class => "longitude"), {:controller => 'site', :action => 'index', :lat => h(common_details.lat), :lon => h(common_details.lon), :zoom => "18"}) %>
-<%= render :partial => "tag_details", :object => common_details %>
+<% end %>
+
+<%= render :partial => "tag_details", :object => common_details.tags %>
diff --git a/app/views/browse/_map.html.erb b/app/views/browse/_map.html.erb
deleted file mode 100644
index ed703665d1..0000000000
--- a/app/views/browse/_map.html.erb
+++ /dev/null
@@ -1,78 +0,0 @@
-
- <% if map.instance_of? Changeset or (map.instance_of? Node and map.version > 1) or map.visible? %>
-
- <% content_for :head do %>
- <%= javascript_include_tag "browse" %>
- <% end %>
-
- <%
- if map.instance_of? Changeset
- bbox = map.bbox.to_unscaled
- data = {
- :type => "changeset",
- :id => map.id,
- :minlon => bbox.min_lon,
- :minlat => bbox.min_lat,
- :maxlon => bbox.max_lon,
- :maxlat => bbox.max_lat
- }
- elsif map.instance_of? Note
- data = {
- :type => "note",
- :id => map.id,
- :lon => map.lon,
- :lat => map.lat
- }
- else
- data = {
- :type => map.class.name.downcase,
- :id => map.id,
- :version => map.version,
- :visible => map.visible
- }
- end
- %>
- <%= content_tag "div", "", :id => "small_map", :data => data %>
-
<%= t 'browse.map.loading' %>
-
-
- -
- <% if map.instance_of? Note -%>
- <%= link_to t("browse.map.larger.area"),
- root_path(:notes => "yes"),
- :id => "area_larger_map",
- :class => "geolink bbox" %>
- <% else -%>
- <%= link_to t("browse.map.larger.area"),
- root_path(:box => "yes"),
- :id => "area_larger_map",
- :class => "geolink bbox" %>
- <% end -%>
-
- -
- <%= render :partial => 'layouts/edit_menu',
- :locals => { :link_text => t("browse.map.edit.area"),
- :link_class => 'bbox' } %>
-
-
-
- <% unless map.instance_of? Changeset %>
-
- -
- <%= link_to t("browse.map.larger." + map.class.to_s.downcase),
- root_path,
- :id => "object_larger_map",
- :class => "geolink object" %>
-
- -
- <%= render :partial => 'layouts/edit_menu',
- :locals => { :link_text => t("browse.map.edit." + map.class.to_s.downcase),
- :link_class => 'object' } %>
-
-
- <% end %>
-
- <% else %>
- <%= t 'browse.map.deleted' %>
- <% end %>
-
diff --git a/app/views/browse/_navigation.html.erb b/app/views/browse/_navigation.html.erb
deleted file mode 100644
index 0856044c80..0000000000
--- a/app/views/browse/_navigation.html.erb
+++ /dev/null
@@ -1,43 +0,0 @@
-<% type = (@next || @prev).class.name.downcase %>
-
- <% if @next_by_user or @prev_by_user %>
-
- <% end %>
diff --git a/app/views/browse/_node.html.erb b/app/views/browse/_node.html.erb
new file mode 100644
index 0000000000..2c2cdd4c0e
--- /dev/null
+++ b/app/views/browse/_node.html.erb
@@ -0,0 +1,23 @@
+<% if node.redacted? %>
+
+ <%= t 'browse.redacted.message_html',
+ :type => t('browse.redacted.type.node'),
+ :version => node.version,
+ :redaction_link => link_to(t('browse.redacted.redaction',
+ :id => node.redaction.id), node.redaction) %>
+
+<% else %>
+
+ <%= render :partial => "common_details", :object => node %>
+
+ <% unless node.ways.empty? and node.containing_relation_members.empty? %>
+
<%= t 'browse.part_of' %>
+
+ <% node.ways.each do |way| %>
+ - <%= link_to h(printable_name(way)), { :action => "way", :id => way.id.to_s }, :class => link_class('way', way), :title => link_title(way) %>
+ <% end %>
+ <%= render :partial => "containing_relation", :collection => node.containing_relation_members %>
+
+ <% end %>
+
+<% end %>
diff --git a/app/views/browse/_node_details.html.erb b/app/views/browse/_node_details.html.erb
deleted file mode 100644
index 8dec338d69..0000000000
--- a/app/views/browse/_node_details.html.erb
+++ /dev/null
@@ -1,28 +0,0 @@
-
-<% if node_details.redacted? %>
-
- <%= t 'browse.redacted.message_html', :type => t('browse.redacted.type.node'), :redaction_link => link_to(t('browse.redacted.redaction', :id => node_details.redaction.id), node_details.redaction), :version => node_details.version %>
-
-<% else %>
- <%= render :partial => "common_details", :object => node_details %>
-
- <% if node_details.visible -%>
-
-
<%= t 'browse.node_details.coordinates' %>
-
<%= link_to(content_tag(:span, number_with_delimiter(node_details.lat), :class => "latitude") + ", " + content_tag(:span, number_with_delimiter(node_details.lon), :class => "longitude"), {:controller => 'site', :action => 'index', :lat => h(node_details.lat), :lon => h(node_details.lon), :zoom => "18"}) %>
-
- <% end -%>
-
- <% unless node_details.ways.empty? and node_details.containing_relation_members.empty? %>
-
-
<%= t 'browse.node_details.part_of' %>
-
- <% node_details.ways.each do |way| %>
- - <%= link_to h(printable_name(way)), { :action => "way", :id => way.id.to_s }, :class => link_class('way', way), :title => link_title(way) %>
- <% end %>
- <%= render :partial => "containing_relation", :collection => node_details.containing_relation_members %>
-
-
- <% end %>
-<% end %>
-
diff --git a/app/views/browse/_paging_nav.html.erb b/app/views/browse/_paging_nav.html.erb
index f236b44650..67f1c75a3b 100644
--- a/app/views/browse/_paging_nav.html.erb
+++ b/app/views/browse/_paging_nav.html.erb
@@ -1,14 +1,5 @@
-
-<% current_page = pages.current_page %>
-
-<%= t'browse.paging_nav.showing_page' %>
-<%= current_page.number %> (<%= current_page.first_item %><%
-if (current_page.first_item < current_page.last_item) # if more than 1 trace on page
- %>-<%= current_page.last_item %><%
-end %>
-<%= t'browse.paging_nav.of'%> <%= pages.item_count %>)
-
<% if pages.page_count > 1 %>
-| <%= raw pagination_links_each(pages, {}) { |n| link_to_page(n, page_param) } %>
+
+ <%= raw pagination_links_each(pages, {}) { |n| link_to(n, page_param => n) } %>
+
<% end %>
-
\ No newline at end of file
diff --git a/app/views/browse/_relation.html.erb b/app/views/browse/_relation.html.erb
new file mode 100644
index 0000000000..6befb8aae2
--- /dev/null
+++ b/app/views/browse/_relation.html.erb
@@ -0,0 +1,23 @@
+<% if relation.redacted? %>
+
+ <%= t 'browse.redacted.message_html',
+ :type => t('browse.redacted.type.relation'),
+ :version => relation.version,
+ :redaction_link => link_to(t('browse.redacted.redaction',
+ :id => relation.redaction.id), relation.redaction) %><
+
+<% else %>
+
+ <%= render :partial => "common_details", :object => relation %>
+
+ <% unless relation.relation_members.empty? %>
+
<%= t'browse.relation.members' %>
+
<%= render :partial => "relation_member", :collection => relation.relation_members %>
+ <% end %>
+
+ <% unless relation.containing_relation_members.empty? %>
+
<%= t'browse.part_of' %>
+
<%= render :partial => "containing_relation", :collection => relation.containing_relation_members %>
+ <% end %>
+
+<% end %>
diff --git a/app/views/browse/_relation_details.html.erb b/app/views/browse/_relation_details.html.erb
deleted file mode 100644
index 1c0f4c93c0..0000000000
--- a/app/views/browse/_relation_details.html.erb
+++ /dev/null
@@ -1,23 +0,0 @@
-
-<% if relation_details.redacted? %>
-
- <%= t 'browse.redacted.message_html', :type => t('browse.redacted.type.relation'), :redaction_link => link_to(t('browse.redacted.redaction', :id => relation_details.redaction.id), relation_details.redaction), :version => relation_details.version %><
-
-<% else %>
- <%= render :partial => "common_details", :object => relation_details %>
-
- <% unless relation_details.relation_members.empty? %>
-
-
<%= t'browse.relation_details.members' %>
-
<%= render :partial => "relation_member", :collection => relation_details.relation_members %>
-
- <% end %>
-
- <% unless relation_details.containing_relation_members.empty? %>
-
-
<%= t'browse.relation_details.part_of' %>
-
<%= render :partial => "containing_relation", :collection => relation_details.containing_relation_members %>
-
- <% end %>
-<% end %>
-
diff --git a/app/views/browse/_tag.html.erb b/app/views/browse/_tag.html.erb
index 2983318320..b9296fa487 100644
--- a/app/views/browse/_tag.html.erb
+++ b/app/views/browse/_tag.html.erb
@@ -1 +1,4 @@
-
<%= format_key(tag[0]) %> = <%= format_value(tag[0], tag[1]) %>
\ No newline at end of file
+
+ <%= format_key(tag[0]) %>
+ <%= format_value(tag[0], tag[1]) %>
+
diff --git a/app/views/browse/_tag_details.html.erb b/app/views/browse/_tag_details.html.erb
index 9d0a2af546..090a23e7c3 100644
--- a/app/views/browse/_tag_details.html.erb
+++ b/app/views/browse/_tag_details.html.erb
@@ -1,6 +1,6 @@
-<% unless tag_details.tags.empty? %>
-
-
<%= t'browse.tag_details.tags' %>
-
<%= render :partial => "tag", :collection => tag_details.tags.sort %>
-
-<% end %>
\ No newline at end of file
+<% unless tag_details.empty? %>
+
<%= t 'browse.tag_details.tags' %>
+
+ <%= render :partial => "tag", :collection => tag_details.sort %>
+
+<% end %>
diff --git a/app/views/browse/_way.html.erb b/app/views/browse/_way.html.erb
new file mode 100644
index 0000000000..fd419586fb
--- /dev/null
+++ b/app/views/browse/_way.html.erb
@@ -0,0 +1,35 @@
+<% if way.redacted? %>
+
+ <%= t 'browse.redacted.message_html',
+ :type => t('browse.redacted.type.way'),
+ :version => way.version,
+ :redaction_link => link_to(t('browse.redacted.redaction',
+ :id => way.redaction.id), way.redaction) %>
+
+<% else %>
+
+ <%= render :partial => "common_details", :object => way %>
+
+ <% unless way.way_nodes.empty? %>
+
<%= t'browse.way.nodes' %>
+
+ <% way.way_nodes.each do |wn| %>
+ -
+ <%= link_to h(printable_name(wn.node)), { :action => "node", :id => wn.node_id.to_s }, :class => link_class('node', wn.node), :title => link_title(wn.node) %>
+ <% related_ways = wn.node.ways.reject { |w| w.id == wn.way_id } %>
+ <% if related_ways.size > 0 then %>
+ (<%= raw t 'browse.way.also_part_of', :count => related_ways.size, :related_ways => related_ways.map { |w| link_to(h(printable_name(w)), { :action => "way", :id => w.id.to_s }, :class => link_class('way', w), :title => link_title(w) ) }.to_sentence %>)
+ <% end %>
+
+ <% end %>
+
+ <% end %>
+
+ <% unless way.containing_relation_members.empty? %>
+
<%= t'browse.part_of' %>
+
+ <%= render :partial => "containing_relation", :collection => way.containing_relation_members %>
+
+ <% end %>
+
+<% end %>
diff --git a/app/views/browse/_way_details.html.erb b/app/views/browse/_way_details.html.erb
deleted file mode 100644
index 6bff887b3c..0000000000
--- a/app/views/browse/_way_details.html.erb
+++ /dev/null
@@ -1,34 +0,0 @@
-
-<% if way_details.redacted? %>
-
- <%= t 'browse.redacted.message_html', :type => t('browse.redacted.type.way'), :redaction_link => link_to(t('browse.redacted.redaction', :id => way_details.redaction.id), way_details.redaction), :version => way_details.version %>
-
-<% else %>
- <%= render :partial => "common_details", :object => way_details %>
-
- <% unless way_details.way_nodes.empty? %>
-
-
<%= t'browse.way_details.nodes' %>
-
- <% way_details.way_nodes.each do |wn| %>
- -
- <%= link_to h(printable_name(wn.node)), { :action => "node", :id => wn.node_id.to_s }, :class => link_class('node', wn.node), :title => link_title(wn.node) %>
- <% related_ways = wn.node.ways.reject { |w| w.id == wn.way_id } %>
- <% if related_ways.size > 0 then %>
- (<%= raw t 'browse.way_details.also_part_of', :count => related_ways.size, :related_ways => related_ways.map { |w| link_to(h(printable_name(w)), { :action => "way", :id => w.id.to_s }, :class => link_class('way', w), :title => link_title(w) ) }.to_sentence %>)
- <% end %>
-
- <% end %>
-
-
- <% end %>
-
- <% unless way_details.containing_relation_members.empty? %>
-
-
<%= t'browse.way_details.part_of' %>
-
- <%= render :partial => "containing_relation", :collection => way_details.containing_relation_members %>
-
- <% end %>
-<% end %>
-
diff --git a/app/views/browse/changeset.html.erb b/app/views/browse/changeset.html.erb
index 96a5280a53..736abf12fb 100644
--- a/app/views/browse/changeset.html.erb
+++ b/app/views/browse/changeset.html.erb
@@ -1,18 +1,72 @@
-<% content_for :head do %>
-<%= stylesheet_link_tag 'browse' %>
-<% end %>
+<% set_title(t('browse.changeset.title', :id => @changeset.id)) %>
-<% content_for :heading do %>
-
<%= t 'browse.changeset.changeset', :id => @changeset.id %>
-
- - <%= link_to(t('browse.changeset.changesetxml'), :controller => "changeset", :action => "read") %>
- - <%= link_to(t('browse.changeset.osmchangexml'), :controller => "changeset", :action => "download") %>
-
-<% end %>
+
+
+ <%= t('browse.changeset.title', :id => @changeset.id) %>
+
+
+
+
<%= @changeset.tags['comment'].to_s.presence || t('browse.no_comment') %>
+
<%= changeset_details(@changeset) %>
+
+ <%= render :partial => "tag_details", :object => @changeset.tags.except('comment') %>
-<%= render :partial => "navigation" %>
+ <% unless @ways.empty? %>
+
+ <%= type_and_paginated_count('way', @way_pages) %>
+ <%= render :partial => 'paging_nav', :locals => { :pages => @way_pages, :page_param => "way_page" } %>
+
+
+ <% @ways.each do |way| %>
+ - <%= link_to h(printable_name(way, true)), { :action => "way", :id => way.way_id.to_s }, :class => link_class('way', way), :title => link_title(way) %>
+ <% end %>
+
+ <% end %>
-<% if @changeset.has_valid_bbox? %>
-<%= render :partial => "map", :object => @changeset %>
+ <% unless @relations.empty? %>
+
+ <%= type_and_paginated_count('relation', @relation_pages) %>
+ <%= render :partial => 'paging_nav', :locals => { :pages => @relation_pages, :page_param => "relation_page" } %>
+
+
+ <% @relations.each do |relation| %>
+ - <%= link_to h(printable_name(relation, true)), { :action => "relation", :id => relation.relation_id.to_s }, :class => link_class('relation', relation), :title => link_title(relation) %>
+ <% end %>
+
+ <% end %>
+
+ <% unless @nodes.empty? %>
+
+ <%= type_and_paginated_count('node', @node_pages) %>
+ <%= render :partial => 'paging_nav', :locals => { :pages => @node_pages, :page_param => "node_page"} %>
+
+
+ <% @nodes.each do |node| %>
+ - <%= link_to h(printable_name(node, true)), { :action => "node", :id => node.node_id.to_s }, :class => link_class('node', node), :title => link_title(node) %>
+ <% end %>
+
+ <% end %>
+
+
+<% if @next_by_user || @prev_by_user %>
+
+ <% if @prev_by_user %>
+ <%= link_to "<< #{@prev_by_user.id}", :id => @prev_by_user.id %>
+ ·
+ <% end %>
+ <%=
+ user = (@prev_by_user || @next_by_user).user.display_name
+ link_to user, :controller => "changeset", :action => "list", :display_name => user
+ %>
+ <% if @next_by_user %>
+ ·
+ <%= link_to "#{@next_by_user.id} >>", :id => @next_by_user.id %>
+ <% end %>
+
<% end %>
-<%= render :partial => "changeset_details", :object => @changeset %>
\ No newline at end of file
+
+
+ <%= link_to(t('browse.changeset.changesetxml'), :controller => "changeset", :action => "read") %>
+ ·
+ <%= link_to(t('browse.changeset.osmchangexml'), :controller => "changeset", :action => "download") %>
+
diff --git a/app/views/browse/feature.html.erb b/app/views/browse/feature.html.erb
new file mode 100644
index 0000000000..1e0f118d83
--- /dev/null
+++ b/app/views/browse/feature.html.erb
@@ -0,0 +1,14 @@
+<% set_title(t("browse.#{@type}.title", :name => printable_name(@feature))) %>
+
+
+
+ <%= t("browse.#{@type}.title", :name => printable_name(@feature)) %>
+
+
+<%= render :partial => @type, :object => @feature %>
+
+
+ <%= link_to(t('browse.download_xml'), :controller => @type, :action => "read") %>
+ ·
+ <%= link_to(t('browse.view_history'), :action => "#{@type}_history") %>
+
diff --git a/app/views/browse/history.html.erb b/app/views/browse/history.html.erb
new file mode 100644
index 0000000000..fa483bfb06
--- /dev/null
+++ b/app/views/browse/history.html.erb
@@ -0,0 +1,14 @@
+<% set_title(t("browse.#{@type}.history_title", :name => printable_name(@feature))) %>
+
+
+
+ <%= t("browse.#{@type}.history_title", :name => printable_name(@feature)) %>
+
+
+<%= render :partial => @type, :collection => @feature.send("old_#{@type}s").reverse %>
+
+
+ <%= link_to(t('browse.download_xml'), :controller => "old_#{@type}", :action => "history") %>
+ ·
+ <%= link_to(t('browse.view_details'), :action => @type) %>
+
diff --git a/app/views/browse/new_note.html.erb b/app/views/browse/new_note.html.erb
new file mode 100644
index 0000000000..49922494e2
--- /dev/null
+++ b/app/views/browse/new_note.html.erb
@@ -0,0 +1,18 @@
+<% set_title(t "browse.note.new_note") %>
+
+
+
+ <%= t "browse.note.new_note" %>
+
+
+
+
<%= t('javascripts.notes.new.intro') %>
+
+
diff --git a/app/views/browse/node.html.erb b/app/views/browse/node.html.erb
deleted file mode 100644
index f41562a7fe..0000000000
--- a/app/views/browse/node.html.erb
+++ /dev/null
@@ -1,27 +0,0 @@
-<%
-@name = printable_name @node
-@title = t('browse.node.node') + ' | ' + @name
-%>
-<% content_for :head do %>
-<%= stylesheet_link_tag 'browse' %>
-<% end %>
-
-<% content_for :heading do %>
-
<%= t'browse.node.node_title', :node_name => @name %>
-
- - <%= link_to(t('browse.node.download_xml'), :controller => "node", :action => "read") %>
- - <%= link_to(t('browse.node.view_history'), :action => "node_history") %>
- <% if @node.visible -%>
- - <%= link_to(t('browse.node.edit'), :controller => "site", :action => "edit", :lat => @node.lat, :lon => @node.lon, :zoom => 18, :node => @node.id) %>
- <% end -%>
-
-<% end %>
-<%= render :partial => "navigation" %>
-
-<% if @node.visible -%>
-<%= render :partial => "map", :object => @node %>
-<% end -%>
-
-
- <%= render :partial => "node_details", :object => @node %>
-
\ No newline at end of file
diff --git a/app/views/browse/node_history.html.erb b/app/views/browse/node_history.html.erb
deleted file mode 100644
index e37f0e037f..0000000000
--- a/app/views/browse/node_history.html.erb
+++ /dev/null
@@ -1,25 +0,0 @@
-<%
-@name = printable_name @node
-@title = t('browse.node_history.node_history') + ' | ' + @name
-%>
-<% content_for :head do %>
-<%= stylesheet_link_tag 'browse' %>
-<% end %>
-
-<% content_for :heading do %>
-
<%= raw t'browse.node_history.node_history_title', :node_name => link_to(h(@name), :action => "node", :id => @node.id) %>
-
- - <%= link_to(t('browse.node_history.download_xml'), :controller => "old_node", :action => "history") %>
- - <%= link_to(t('browse.node_history.view_details'), :action => "node") %>
-
-<% end %>
-
-<% if @node.visible -%>
- <%= render :partial => "map", :object => @node %>
-<% end -%>
-
-
- <% @node.old_nodes.reverse.each do |node| %>
- <%= render :partial => "node_details", :object => node %>
- <% end %>
-
diff --git a/app/views/browse/not_found.html.erb b/app/views/browse/not_found.html.erb
index f536ef9ffe..a8974b4747 100644
--- a/app/views/browse/not_found.html.erb
+++ b/app/views/browse/not_found.html.erb
@@ -6,4 +6,7 @@
'changeset' => I18n.t('browse.not_found.type.changeset'),
};
%>
-
<%= t'browse.not_found.sorry', :type=> browse_not_found_type[@type] , :id => params[:id] %>
+
+
+
+ <%= t'browse.not_found.sorry', :type=> browse_not_found_type[@type] , :id => params[:id] %>
diff --git a/app/views/browse/note.html.erb b/app/views/browse/note.html.erb
index 31fd00f014..5ab29e0d1d 100644
--- a/app/views/browse/note.html.erb
+++ b/app/views/browse/note.html.erb
@@ -1,67 +1,57 @@
-<% content_for :head do %>
-<%= stylesheet_link_tag 'browse' %>
-<% end %>
+<% set_title(t('browse.note.title', :id => @note.id)) %>
-<% content_for :heading do %>
-
- <%= image_tag "#{@note.status}_note_marker.png", :alt => @note.status %>
- <%= t "browse.note.#{@note.status}_title", :note_name => @note.id %>
-
-<% end %>
+
+
+ <%= t "browse.note.#{@note.status}_title", :note_name => @note.id %>
+
-<%= render :partial => "navigation" %>
-
-<%= render :partial => "map", :object => @note %>
-
-
-
- <% if @note.comments.find { |comment| comment.author.nil? } -%>
-
-
<%= t "javascripts.notes.show.anonymous_warning" %>
+
+
<%= t('browse.note.mine.description') %>
+
+ <%= h(@note.comments.first.body.to_html) %>
- <% end -%>
-
-
-
-
<%= t "browse.note.opened" %>
-
<%= note_event(@note.created_at, @note.author) %>
-
+
+ <%= note_event('open', @note.created_at, @note.author) %>
<% if @note.status == "closed" %>
-
-
<%= t "browse.note.closed" %>
-
<%= note_event(@note.closed_at, @note.comments.last.author) %>
-
- <% elsif @note.comments.length > 1 %>
-
-
<%= t "browse.note.last_modified" %>
-
<%= note_event(@note.updated_at, @note.comments.last.author) %>
-
+
+ <%= note_event(@note.status, @note.closed_at, @note.comments.last.author) %>
<% end %>
-
-
-
-
-
<%= t "browse.node_details.coordinates" %>
-
<%= link_to ("#{number_with_delimiter(@note.lat)}, #{number_with_delimiter(@note.lon)}".html_safe), {:controller => 'site', :action => 'index', :lat => h(@note.lat), :lon => h(@note.lon), :zoom => "18"} %>
-
+ <% if @note.comments.find { |comment| comment.author.nil? } -%>
+
<%= t "javascripts.notes.show.anonymous_warning" %>
+ <% end -%>
+
<% if @note.comments.length > 1 %>
-
-
<%= t "browse.note.comments" %>
+
<% end %>
+ <% if @note.status == "open" %>
+
+ <% else %>
+
+ <% end %>
diff --git a/app/views/browse/relation.html.erb b/app/views/browse/relation.html.erb
deleted file mode 100644
index 3ba3550548..0000000000
--- a/app/views/browse/relation.html.erb
+++ /dev/null
@@ -1,21 +0,0 @@
-<%
-@name = printable_name @relation
-@title = t('browse.relation.relation') + ' | ' + @name
-%>
-<% content_for :head do %>
-<%= stylesheet_link_tag 'browse' %>
-<% end %>
-
-<% content_for :heading do %>
-
<%= t'browse.relation.relation_title', :relation_name => @name %>
-
- - <%= link_to(t('browse.relation.download_xml'), :controller => "relation", :action => "read") %>
- - <%= link_to(t('browse.relation.view_history'), :action => "relation_history") %>
-
-<% end %>
-<%= render :partial => "navigation" %>
-<%= render :partial => "map", :object => @relation %>
-
-
- <%= render :partial => "relation_details", :object => @relation %>
-
\ No newline at end of file
diff --git a/app/views/browse/relation_history.html.erb b/app/views/browse/relation_history.html.erb
deleted file mode 100644
index e0640d9007..0000000000
--- a/app/views/browse/relation_history.html.erb
+++ /dev/null
@@ -1,22 +0,0 @@
-<%
-@name = printable_name @relation
-@title = t('browse.relation_history.relation_history') + ' | ' + @name
-%>
-<% content_for :head do %>
-<%= stylesheet_link_tag 'browse' %>
-<% end %>
-
-<% content_for :heading do %>
-
<%= raw t'browse.relation_history.relation_history_title', :relation_name => link_to(h(@name), :action => "relation", :id => @relation.id) %>
-
- - <%= link_to(t('browse.relation_history.download_xml'), :controller => "old_relation", :action => "history") %>
- - <%= link_to(t('browse.relation_history.view_details'), :action => "relation") %>
-
-<% end %>
-
-<%= render :partial => "map", :object => @relation %>
-
-<% @relation.old_relations.reverse.each do |relation| %>
- <%= render :partial => "relation_details", :object => relation %>
-<% end %>
-
\ No newline at end of file
diff --git a/app/views/browse/start.html.erb b/app/views/browse/start.html.erb
deleted file mode 100644
index 12012a0299..0000000000
--- a/app/views/browse/start.html.erb
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
diff --git a/app/views/browse/way.html.erb b/app/views/browse/way.html.erb
deleted file mode 100644
index 15a0dcad82..0000000000
--- a/app/views/browse/way.html.erb
+++ /dev/null
@@ -1,23 +0,0 @@
-<%
-@name = printable_name @way
-@title = t('browse.way.way') + ' | ' + @name
-%>
-<% content_for :head do %>
-<%= stylesheet_link_tag 'browse' %>
-<% end %>
-
-<% content_for :heading do %>
-
<%= t'browse.way.way_title', :way_name => @name %>
-
- - <%= link_to(t('browse.way.download_xml'), :controller => "way", :action => "read") %>
- - <%= link_to(t('browse.way.view_history'), :action => "way_history") %>
- - <%= link_to(t('browse.way.edit'), :controller => "site", :action => "edit", :way => @way.id) %>
-
-<% end %>
-
-<%= render :partial => "navigation" %>
-<%= render :partial => "map", :object => @way %>
-
-
- <%= render :partial => "way_details", :object => @way %>
-
\ No newline at end of file
diff --git a/app/views/browse/way_history.html.erb b/app/views/browse/way_history.html.erb
deleted file mode 100644
index 49058edc10..0000000000
--- a/app/views/browse/way_history.html.erb
+++ /dev/null
@@ -1,22 +0,0 @@
-<%
-@name = printable_name @way
-@title = t('browse.way_history.way_history') + ' | ' + @name
-%>
-<% content_for :head do %>
-<%= stylesheet_link_tag 'browse' %>
-<% end %>
-
-<% content_for :heading do %>
-
<%= raw t'browse.way_history.way_history_title', :way_name => link_to(h(@name), :action => "way", :id => @way.id) %>
-
- - <%= link_to(t('browse.way_history.download_xml'), :controller => "old_way", :action => "history") %>
- - <%= link_to(t('browse.way_history.view_details'), :action => "way") %>
-
-<% end %>
-
-<%= render :partial => "map", :object => @way %>
-
-<% @way.old_ways.reverse.each do |way| %>
- <%= render :partial => "way_details", :object => way %>
-<% end %>
-
\ No newline at end of file
diff --git a/app/views/changeset/_bbox.atom.builder b/app/views/changeset/_bbox.atom.builder
deleted file mode 100644
index de3b1f1129..0000000000
--- a/app/views/changeset/_bbox.atom.builder
+++ /dev/null
@@ -1 +0,0 @@
-xml.a(bbox.to_s, :href => url_for(:controller => "site", :action => "index", :minlon => bbox.min_lon, :minlat => bbox.min_lat, :maxlon => bbox.max_lon, :maxlat => bbox.max_lat, :box => "yes"))
diff --git a/app/views/changeset/_bbox.html.erb b/app/views/changeset/_bbox.html.erb
deleted file mode 100644
index f9424befd8..0000000000
--- a/app/views/changeset/_bbox.html.erb
+++ /dev/null
@@ -1 +0,0 @@
-<%= link_to bbox.to_s, :controller => "site", :action => "index", :minlon => bbox.min_lon, :minlat => bbox.min_lat, :maxlon => bbox.max_lon, :maxlat => bbox.max_lat, :box => "yes" %>
diff --git a/app/views/changeset/_changeset.html.erb b/app/views/changeset/_changeset.html.erb
index 3e4871ec06..5c5ad670b6 100644
--- a/app/views/changeset/_changeset.html.erb
+++ b/app/views/changeset/_changeset.html.erb
@@ -12,39 +12,19 @@
end
%>
-<%= content_tag "ul", :class => 'changeset_item', :id => "changeset_#{changeset.id}", :data => {:changeset => changeset_data} do %>
-
-
-
- <%=
- link_to(changeset.id,
- {:controller => 'browse', :action => 'changeset', :id => changeset.id},
- {:title => t('changeset.changeset.view_changeset_details')})
- %>
-
-
-
- <% if changeset.closed_at > DateTime.now %> <%= t'changeset.changeset.still_editing' %>
- <% else %><%= l changeset.closed_at, :format => :long %><% end %>
-
-
- <%if showusername %>
-
- <% if changeset.user.data_public? %>
- <%= link_to h(changeset.user.display_name), :controller => "changeset", :action => "list", :display_name => changeset.user.display_name %>
- <% else %>
- <%= t'changeset.changeset.anonymous' %>
- <% end %>
-
- <% end %>
-
-
-
-
+<%= content_tag "li", :id => "changeset_#{changeset.id}", :data => {:changeset => changeset_data} do %>
+
+
+ <%= changeset_details(changeset) %>
+ ·
+ #<%= changeset.id %>
+
<% end %>
diff --git a/app/views/changeset/_changeset_paging_nav.html.erb b/app/views/changeset/_changeset_paging_nav.html.erb
deleted file mode 100644
index 46b4635c88..0000000000
--- a/app/views/changeset/_changeset_paging_nav.html.erb
+++ /dev/null
@@ -1,15 +0,0 @@
-
\ No newline at end of file
diff --git a/app/views/changeset/_changesets.html.erb b/app/views/changeset/_changesets.html.erb
deleted file mode 100644
index fe8da2b383..0000000000
--- a/app/views/changeset/_changesets.html.erb
+++ /dev/null
@@ -1,4 +0,0 @@
-<% showusername = true if showusername.nil? %>
-
- <%= render :partial => 'changeset', :locals => {:showusername => showusername}, :collection => @edits unless @edits.nil? %>
-
diff --git a/app/views/changeset/_map.html.erb b/app/views/changeset/_map.html.erb
deleted file mode 100644
index 9730059eed..0000000000
--- a/app/views/changeset/_map.html.erb
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
diff --git a/app/views/changeset/_user.html.erb b/app/views/changeset/_user.html.erb
deleted file mode 100644
index 0e95076504..0000000000
--- a/app/views/changeset/_user.html.erb
+++ /dev/null
@@ -1 +0,0 @@
-<%= link_to user.display_name, :controller => "user", :action => "view", :display_name => user.display_name %>
diff --git a/app/views/changeset/history.html.erb b/app/views/changeset/history.html.erb
new file mode 100644
index 0000000000..77118b4b4b
--- /dev/null
+++ b/app/views/changeset/history.html.erb
@@ -0,0 +1,30 @@
+<% content_for :auto_discovery_link_tag do -%>
+ <% unless params[:friends] or params[:nearby] -%>
+ <%= auto_discovery_link_tag :atom, params.merge(:max_id => nil, :xhr => nil, :action => :feed) %>
+ <% end -%>
+<% end -%>
+
+<%
+ if params[:friends] and @user
+ set_title(t 'changeset.list.title_friend')
+ @heading = t 'changeset.list.title_friend'
+ elsif params[:nearby] and @user
+ set_title(t 'changeset.list.title_nearby')
+ @heading = t 'changeset.list.title_nearby'
+ elsif params[:display_name]
+ set_title(t 'changeset.list.title_user', :user => params[:display_name])
+ @heading = t('changeset.list.title_user', :user => link_to(params[:display_name], :controller => "user", :action => "view", :display_name => params[:display_name])).html_safe
+ else
+ set_title(t 'changeset.list.title')
+ @heading = t 'changeset.list.title'
+ end
+%>
+
+
+
+ <%= @heading %>
+
+
+
+ <%= image_tag "searching.gif", :class => "loader" %>
+
diff --git a/app/views/changeset/list.atom.builder b/app/views/changeset/list.atom.builder
index 591f269b61..619dc4a082 100644
--- a/app/views/changeset/list.atom.builder
+++ b/app/views/changeset/list.atom.builder
@@ -4,12 +4,6 @@ atom_feed(:language => I18n.locale, :schema_date => 2009,
"xmlns:georss" => "http://www.georss.org/georss") do |feed|
feed.title @title
- feed.subtitle :type => 'xhtml' do |xhtml|
- xhtml.p do |p|
- p << @description
- end
- end
-
feed.updated @edits.map {|e| [e.created_at, e.closed_at].max }.max
feed.icon "http://#{SERVER_URL}/favicon.ico"
feed.logo "http://#{SERVER_URL}/images/mag_map-rss2.0.png"
@@ -46,16 +40,16 @@ atom_feed(:language => I18n.locale, :schema_date => 2009,
xhtml.style "th { text-align: left } tr { vertical-align: top }"
xhtml.table do |table|
table.tr do |tr|
- tr.th t("browse.changeset_details.created_at")
+ tr.th t("browse.created")
tr.td l(changeset.created_at)
end
table.tr do |tr|
- tr.th t("browse.changeset_details.closed_at")
+ tr.th t("browse.closed")
tr.td l(changeset.closed_at)
end
if changeset.user.data_public?
table.tr do |tr|
- tr.th t("browse.changeset_details.belongs_to")
+ tr.th t("browse.changeset.belongs_to")
tr.td do |td|
td.a h(changeset.user.display_name), :href => url_for(:controller => "user", :action => "view", :display_name => changeset.user.display_name, :only_path => false)
end
diff --git a/app/views/changeset/list.html.erb b/app/views/changeset/list.html.erb
index ee8610574b..68bdf1e23f 100644
--- a/app/views/changeset/list.html.erb
+++ b/app/views/changeset/list.html.erb
@@ -1,37 +1,15 @@
-<% content_for :head do -%>
- <%= javascript_include_tag "changeset" %>
-<% end -%>
-
-<% content_for :heading do %>
-
-
<%= @heading %>
-
- - <%= raw(@description) %>
- <% unless params[:friends] or params[:nearby] -%>
- - <%= atom_link_to params.merge({ :page => nil, :action => :feed }) %>
- <% end -%>
-
-
-<% end %>
-
-<%= render :partial => 'changeset_paging_nav' %>
-
-<% if @edits.size > 0 %>
-
- <%= render :partial => 'map' %>
-
-
- <%= render :partial => 'changesets', :locals => { :showusername => !params.has_key?(:display_name) } %>
+<% if @edits.present? %>
+
+ <%= render :partial => 'changeset', :collection => @edits %>
+
+
+ <%= link_to t('changeset.list.load_more'), url_for(params.merge(:max_id => @edits.last.id - 1)), :class => "button load_more" %>
+ <%= image_tag "searching.gif", :class => "loader", :style => "display: none;" %>
- <%= render :partial => 'changeset_paging_nav' %>
-<% elsif @user and @user.display_name == params[:display_name] %>
-
<%= t('changeset.list.empty_user_html') %>
+<% elsif params[:bbox] %>
+
<%= t(params[:max_id] ? 'changeset.list.no_more_area' : 'changeset.list.empty_area') %>
+<% elsif params[:display_name] %>
+
<%= t(params[:max_id] ? 'changeset.list.no_more_user' : 'changeset.list.empty_user') %>
<% else %>
-
<%= t('changeset.list.empty_anon_html') %>
+
<%= t(params[:max_id] ? 'changeset.list.no_more' : 'changeset.list.empty') %>
<% end %>
-
-<% unless params[:friends] or params[:nearby] -%>
- <% content_for :head do -%>
- <%= auto_discovery_link_tag :atom, params.merge({ :page => nil, :action => :feed }) %>
- <% end -%>
-<% end -%>
\ No newline at end of file
diff --git a/app/views/diary_entry/comments.html.erb b/app/views/diary_entry/comments.html.erb
index fd90b75014..9dc800cff5 100644
--- a/app/views/diary_entry/comments.html.erb
+++ b/app/views/diary_entry/comments.html.erb
@@ -18,7 +18,7 @@
<% end -%>
-
- - <%= link_to t('diary_entry.comments.older_comments') , { :page => @comment_pages.current.next} if @comment_pages.current.next %>
- - <%= link_to t('diary_entry.comments.newer_comments'), { :page => @comment_pages.current.previous } if @comment_pages.current.previous %>
-
+
+ <%= link_to t('diary_entry.comments.older_comments') , { :page => @comment_pages.current.next} if @comment_pages.current.next %>
+ <%= link_to t('diary_entry.comments.newer_comments'), { :page => @comment_pages.current.previous } if @comment_pages.current.previous %>
+
diff --git a/app/views/diary_entry/list.html.erb b/app/views/diary_entry/list.html.erb
index 2939ec7e62..0767bd402f 100644
--- a/app/views/diary_entry/list.html.erb
+++ b/app/views/diary_entry/list.html.erb
@@ -3,7 +3,7 @@
<% if @this_user %>
<%= user_image @this_user %>
<% end %>
-
<%= h(@title) %>
+
<%= h(@title) %>
<% unless params[:friends] or params[:nearby] -%>
diff --git a/app/views/export/start.html.erb b/app/views/export/start.html.erb
deleted file mode 100644
index 0bc1ac5bb7..0000000000
--- a/app/views/export/start.html.erb
+++ /dev/null
@@ -1,48 +0,0 @@
-<%= form_tag :controller => "export", :action => "finish" do %>
- <%= hidden_field_tag 'format', 'osm' %>
-
-
-
- <%= text_field_tag('maxlat', nil, :size => 10, :class => "export_bound") %>
-
- <%= text_field_tag('minlon', nil, :size => 10, :class => "export_bound") %>
- <%= text_field_tag('maxlon', nil, :size => 10, :class => "export_bound") %>
-
- <%= text_field_tag('minlat', nil, :size => 10, :class => "export_bound") %>
-
-
<%= t'export.start.manually_select' %>
-
-
-
-
<%= t'export.start.licence' %>
-
-
-
<%= raw t'export.start.export_details' %>
-
-
-
-
<%= t'export.start.too_large.heading' %>
-
-
-
-
-
-
- <%= submit_tag t('export.start.export_button'), :id => "export_commit" %>
-
-<% end %>
diff --git a/app/views/geocoder/results.html.erb b/app/views/geocoder/results.html.erb
index 3c471076cf..d990b7f0ec 100644
--- a/app/views/geocoder/results.html.erb
+++ b/app/views/geocoder/results.html.erb
@@ -2,16 +2,14 @@
<%= t 'geocoder.results.no_results' %>
<% else %>
+ <% @results.each do |result| %>
+ <%= result_to_html(result) %>
+ <% end %>
+
<% if @more_params %>
-
- <%= link_to t('geocoder.results.more_results'), url_for(@more_params), :class => "button" %>
-
- <%= image_tag "searching.gif", :class => ["search_searching", "hidden"] %>
+ <%= link_to t('geocoder.results.more_results'), url_for(@more_params), :class => "button load_more" %>
+ <%= image_tag "searching.gif", :class => "loader", :style => "display: none;" %>
<% end %>
<% end %>
diff --git a/app/views/geocoder/search.html.erb b/app/views/geocoder/search.html.erb
index 6e25588b62..ac655147a9 100644
--- a/app/views/geocoder/search.html.erb
+++ b/app/views/geocoder/search.html.erb
@@ -1,9 +1,10 @@
+
+
+ <%= t('site.sidebar.search_results') %>
+
<% @sources.each do |source| %>
-
<%= raw(t "geocoder.search.title.#{source}") %>
-
">
- <%= image_tag "searching.gif", :class => "search_searching" %>
+
<%= raw(t "geocoder.search.title.#{source}") %>
+
">
+ <%= image_tag "searching.gif", :class => "loader" %>
-
<% end %>
diff --git a/app/views/layouts/_content.html.erb b/app/views/layouts/_content.html.erb
new file mode 100644
index 0000000000..a4d93cc0ec
--- /dev/null
+++ b/app/views/layouts/_content.html.erb
@@ -0,0 +1,19 @@
+
+ <% if content_for? :content %>
+ <%= yield :content %>
+ <% else %>
+ <%= render :partial => "layouts/flash", :locals => { :flash => flash } %>
+ <% if content_for? :heading %>
+
+
+ <%= yield :heading %>
+
+
+ <% end %>
+
+ <% end %>
+
diff --git a/app/views/layouts/_edit_menu.html.erb b/app/views/layouts/_edit_menu.html.erb
deleted file mode 100644
index b7d9d7fdfe..0000000000
--- a/app/views/layouts/_edit_menu.html.erb
+++ /dev/null
@@ -1,19 +0,0 @@
-
diff --git a/app/views/layouts/_flash.html.erb b/app/views/layouts/_flash.html.erb
index a3cbbc2072..51ef3fe415 100644
--- a/app/views/layouts/_flash.html.erb
+++ b/app/views/layouts/_flash.html.erb
@@ -1,11 +1,20 @@
<% if flash[:error] %>
-
<%=image_tag("notice.png", :class => "small_icon", :border=>0)%><%= raw flash[:error] %>
+
+ <%= image_tag("notice.png", :class => "small_icon", :border => 0) %>
+ <%= raw flash[:error] %>
+
<% end %>
<% if flash[:warning] %>
-
<%=image_tag("notice.png", :class => "small_icon", :border=>0)%><%= raw flash[:warning] %>
+
+ <%= image_tag("notice.png", :class => "small_icon", :border => 0) %>
+ <%= raw flash[:warning] %>
+
<% end %>
<% if flash[:notice] %>
-
<%=image_tag("notice.png", :class => "small_icon", :border=>0)%><%= raw flash[:notice] %>
+
+ <%= image_tag("notice.png", :class => "small_icon", :border => 0) %>
+ <%= raw flash[:notice] %>
+
<% end %>
diff --git a/app/views/layouts/_head.html.erb b/app/views/layouts/_head.html.erb
index 0a4fb143fb..13f7070816 100644
--- a/app/views/layouts/_head.html.erb
+++ b/app/views/layouts/_head.html.erb
@@ -1,9 +1,10 @@
+
<%= javascript_include_tag "application" %>
- <%= stylesheet_link_tag "small-#{dir}", :media => "only screen and (max-width:641px)" %>
- <%= stylesheet_link_tag "large-#{dir}", :media => "screen and (min-width: 642px)" %>
+ <%= stylesheet_link_tag "small-#{dir}", :media => "only screen and (max-width:721px)" %>
+ <%= stylesheet_link_tag "large-#{dir}", :media => "screen and (min-width: 722px)" %>
<%= stylesheet_link_tag "print-#{dir}", :media => "print" %>
<%= stylesheet_link_tag "leaflet-all", :media => "screen, print" %>
<% if t('license_page.legal_babble', :locale => I18n.locale) != t('license_page.legal_babble', :locale => :en) %>
-
<%= t 'license_page.native.title' %>
+
<%= t 'license_page.native.title' %>
<%= raw t 'license_page.native.text',
:native_link => link_to(t('license_page.native.native_link'),
@@ -19,7 +19,7 @@
<% else %>
<% if t('license_page.legal_babble', :locale => @locale) != t('license_page.legal_babble', :locale => :en) %>
-
<%= t 'license_page.foreign.title' %>
+
<%= t 'license_page.foreign.title' %>
<%= raw t 'license_page.foreign.text',
:english_original_link => link_to(t('license_page.foreign.english_link'),
@@ -31,7 +31,7 @@
<% end %>
<% end %>
-
<%= t "license_page.legal_babble.title_html", :locale => @locale %>
+
<%= t "license_page.legal_babble.title_html", :locale => @locale %>
<% end %>
diff --git a/app/views/site/edit.html.erb b/app/views/site/edit.html.erb
index 761975466b..ae313e1f26 100644
--- a/app/views/site/edit.html.erb
+++ b/app/views/site/edit.html.erb
@@ -1,21 +1,13 @@
-<% if STATUS == :database_offline or STATUS == :api_offline %>
-
<%= t 'layouts.osm_offline' %>
-
-<% elsif STATUS == :database_readonly or STATUS == :api_readonly %>
-
<%= t 'layouts.osm_read_only' %>
-
-<% elsif !@user.data_public? %>
-
<%= t 'site.edit.not_public' %>
-
<%= raw t 'site.edit.not_public_description', :user_page => (link_to t('site.edit.user_page_link'), {:controller => 'user', :action => 'account', :display_name => @user.display_name, :anchor => 'public'}) %>
-
<%= raw t 'site.edit.anon_edits', :link => link_to(t('site.edit.anon_edits_link_text'), t('site.edit.anon_edits_link')) %>
-<% else %>
-<% content_for :head do %>
- <%= javascript_include_tag "edit" %>
-<% end %>
-
-<%= render :partial => 'home_link' %>
-<%= render :partial => 'sidebar' %>
-<%= render :partial => 'search' %>
-
-<%= render :partial => preferred_editor %>
+<% content_for :content do %>
+ <% if STATUS == :database_offline or STATUS == :api_offline %>
+
<%= t 'layouts.osm_offline' %>
+ <% elsif STATUS == :database_readonly or STATUS == :api_readonly %>
+
<%= t 'layouts.osm_read_only' %>
+ <% elsif !@user.data_public? %>
+
<%= t 'site.edit.not_public' %>
+
<%= raw t 'site.edit.not_public_description', :user_page => (link_to t('site.edit.user_page_link'), {:controller => 'user', :action => 'account', :display_name => @user.display_name, :anchor => 'public'}) %>
+
<%= raw t 'site.edit.anon_edits', :link => link_to(t('site.edit.anon_edits_link_text'), t('site.edit.anon_edits_link')) %>
+ <% else %>
+ <%= render :partial => preferred_editor %>
+ <% end %>
<% end %>
diff --git a/app/views/site/export.html.erb b/app/views/site/export.html.erb
new file mode 100644
index 0000000000..1765072070
--- /dev/null
+++ b/app/views/site/export.html.erb
@@ -0,0 +1,48 @@
+<% set_title(t('export.title')) %>
+
+
+
+ <%= t 'export.title' %>
+
+
+<%= form_tag({:controller => "export", :action => "finish"}, :class => "export_form") do %>
+ <%= hidden_field_tag 'format', 'osm' %>
+
+
+
+
<%= t'export.start.licence' %>
+
<%= raw t 'export.start.export_details' %>
+
+
+
+
+ <%= submit_tag t('export.start.export_button'), :id => "export_commit" %>
+
+<% end %>
diff --git a/app/views/site/help.html.erb b/app/views/site/help.html.erb
new file mode 100644
index 0000000000..a1b1adb922
--- /dev/null
+++ b/app/views/site/help.html.erb
@@ -0,0 +1,18 @@
+<% content_for :heading do %>
+
<%= t "help_page.title" %>
+<% end %>
+
+
<%= t "help_page.introduction" %>
+
+<% ['welcome', 'help', 'wiki'].each do |site| %>
+ <% unless site == 'welcome' && !@user %>
+
+
+
<%= t "help_page.#{site}.description" %>
+
+ <% end %>
+<% end %>
diff --git a/app/views/site/id.html.erb b/app/views/site/id.html.erb
index fde4a07cd3..fa47bb00ce 100644
--- a/app/views/site/id.html.erb
+++ b/app/views/site/id.html.erb
@@ -33,24 +33,15 @@
});
id.map().on('move.embed', parent.$.throttle(250, function() {
- var extent = id.map().extent(),
- zoom = ~~id.map().zoom(),
- center = id.map().center();
+ var zoom = ~~id.map().zoom(),
+ center = id.map().center(),
+ llz = { lon: center[0], lat: center[1], zoom: zoom };
- parent.updatelinks({
- lon: center[0],
- lat: center[1]
- },
- zoom,
- null,
- [[extent[0][1],
- extent[0][0]],
- [extent[1][1],
- extent[1][0]]]);
+ parent.updatelinks(llz, zoom);
// Manually resolve URL to avoid iframe JS context weirdness.
// http://bl.ocks.org/jfirebaugh/5439412
- var hash = parent.OSM.formatHash({ lon: center[0], lat: center[1], zoom: zoom });
+ var hash = parent.OSM.formatHash(llz);
if (hash !== parent.location.hash) {
parent.location.replace(parent.location.href.replace(/(#.*|$)/, hash));
}
diff --git a/app/views/site/index.html.erb b/app/views/site/index.html.erb
index 73e1382d30..7603bb1bdd 100644
--- a/app/views/site/index.html.erb
+++ b/app/views/site/index.html.erb
@@ -1,33 +1,4 @@
-<% content_for :head do %>
- <%= javascript_include_tag "index" %>
-<% end %>
-
-<%= render :partial => 'home_link' %>
-<%= render :partial => 'sidebar' %>
-<%= render :partial => 'search' %>
-
-
-
-
-
-
-
-
-
-
-
-
- <%= t'site.index.license.license_url' %> |
- <%= t'site.index.license.project_url' %> |
-
-
- <%= t'site.index.license.copyright' %> |
-
-
-
-
+<%
+ set_title()
+ content_for(:content_class) { "overlay-sidebar" }
+%>
diff --git a/app/views/site/welcome.html.erb b/app/views/site/welcome.html.erb
index da775e3393..4edcf361eb 100644
--- a/app/views/site/welcome.html.erb
+++ b/app/views/site/welcome.html.erb
@@ -3,7 +3,7 @@
<% end %>
<% content_for :heading do %>
-
<%= t "welcome_page.title" %>
+
<%= t "welcome_page.title" %>
<% end %>
<%= t "welcome_page.introduction_html" %>
@@ -51,7 +51,7 @@
<%= t "welcome_page.questions.title" %>
-
<%= t "welcome_page.questions.paragraph_1_html" %>
+
<%= t "welcome_page.questions.paragraph_1_html", :help_url => help_path %>
@@ -64,4 +64,4 @@
<%= t "welcome_page.add_a_note.paragraph_1_html" %>
<%= t "welcome_page.add_a_note.paragraph_2_html", :map_url => root_path %>
-
\ No newline at end of file
+
diff --git a/app/views/user/_contact.html.erb b/app/views/user/_contact.html.erb
index 9d719b52f5..4811389f12 100644
--- a/app/views/user/_contact.html.erb
+++ b/app/views/user/_contact.html.erb
@@ -24,7 +24,7 @@
<% changeset = contact.changesets.first %>
<% if changeset %>
<%= t('user.view.latest edit', :ago => t('user.view.ago', :time_in_words_ago => time_ago_in_words(changeset.created_at))) %>
- <% comment = changeset.tags['comment'].to_s != '' ? changeset.tags['comment'] : t('changeset.changeset.no_comment') %>
+ <% comment = changeset.tags['comment'].to_s != '' ? changeset.tags['comment'] : t('browse.no_comment') %>
"<%= link_to(comment,
{:controller => 'browse', :action => 'changeset', :id => changeset.id},
{:title => t('changeset.changeset.view_changeset_details')})
diff --git a/app/views/user/account.html.erb b/app/views/user/account.html.erb
index e5cbe22b53..94183ff424 100644
--- a/app/views/user/account.html.erb
+++ b/app/views/user/account.html.erb
@@ -1,5 +1,5 @@
<% content_for :heading do %>
-
<%= t 'user.account.my settings' %>
+
<%= t 'user.account.my settings' %>
- <%= link_to t('user.account.return to profile'), :controller => 'user', :action => 'view', :display_name => @user.display_name %>
- <%= link_to t('user.view.oauth settings'), :controller => 'oauth_clients', :action => 'index' %>
diff --git a/app/views/user/confirm.html.erb b/app/views/user/confirm.html.erb
index 31f29eb642..9fc33094e0 100644
--- a/app/views/user/confirm.html.erb
+++ b/app/views/user/confirm.html.erb
@@ -1,5 +1,5 @@
<% content_for :heading do %>
- <%= t 'user.confirm.heading' %>
+ <%= t 'user.confirm.heading' %>
<% end %>
diff --git a/app/views/user/no_such_user.html.erb b/app/views/user/no_such_user.html.erb
index d472f96b04..062d18fb52 100644
--- a/app/views/user/no_such_user.html.erb
+++ b/app/views/user/no_such_user.html.erb
@@ -1,4 +1,4 @@
<% content_for :heading do %>
- <%= t 'user.no_such_user.heading', :user => h(@not_found_user) %>
+ <%= t 'user.no_such_user.heading', :user => h(@not_found_user) %>
<% end %>
<%= t 'user.no_such_user.body', :user => h(@not_found_user) %>
diff --git a/app/views/user/view.html.erb b/app/views/user/view.html.erb
index fc7b599292..f39bafec73 100644
--- a/app/views/user/view.html.erb
+++ b/app/views/user/view.html.erb
@@ -2,9 +2,9 @@